“Asterisk can handle multiple SIP session on port 5060 quite nicely.”
good, didn’t know that 5060 will be good for all extensions, good example with http using port 80 for everything, didn’t think of that one
I forwarded whole bunch of SIP ports to asterisk as is usually recommended, it doesn’t hurt anything 5004-5082 (excl port 5038 as it is used for something else sometimes, I suppose) plus RTP range 10000 to 20000
what confused me is that each SIP extension as you set it up in asterisk has one entry in ‘Device Options’ where you specify port - I took that to mean that perhaps if one has more than one SIP extension, one should specify different port for each
I have trunk set up in asterisk for incoming calls from LesNet provider (DID) and that one uses port 5060 - if I look at ‘SIP info’ in asterisk the LesNet trunk is showing there registered on port 5060 - that led me to think that any other regular SIP extension I create in Asterisk should be assigned different port (else why put the provision in each SIP extension to specify port), however now that I think of it I can see that ports can’t be what makes asterisk know which extension to ring when a call comes in… it has to tell by extension number and it either uses port 5060 or it picks some other one if that one is at the moment busy, that’s why it is usually recommended to forward range of SIP ports to asterisk, right? OK that’s settled, I will let my (so far only two) SIP extensions have the port 5060 in extension setup
I only played with ports trying to make them exclusive for each extension/trunk because my SIP remote extension doesn’t work, I started with port 5060 (I think its default port when one makes new SIP extension in asterisk) and if my remote extension would have worked I’d never try to change it
next point: I am not running any proxy at server (asterisk) end, that Milkfish SipExpressRouter (SER) proxy I mentioned is on the router gateway at remote end (it is part of routers firmware) where the Aastra phone is located
to tell the truth, I would dearly not use any Milkfish proxy on the router at those remote locations (when I say remote I mean remote from asterisk location) because I would like to supply all family members with Aastra phones and none of them has any such proxy at their place and the routers they have wouldn’t accept it anyway, ideally I would like to make Aastra phones work without it
this proxy doesn’t register with asterisk, I don’t think it even has provision to enter registration details, the server registration IP (I use FQDN as I have dyndns service at asterisk end) and port is entered in Aastra phone as well as proxy IP which in my case is the router’s IP 192.168.1.1
Aastra phone has two entries for proxy: one is simply called ‘Proxy’ and the other is named ‘Outbound Proxy’ and I found that I have to fill in both with the same IP (the router’s IP) and port 5060 if I want to have the phone show up as registered on the router/proxy
the function of the proxy as I understand it is to help the phones behind it (on LAN) to be able to get properly accross router’s NAT and get reigstered with remote server, as well as being able to have calls working (two way voice)
if there is more than one phone behind this proxy, the proxy checks if a call is between local extensions and if it is, it bounces the call back to LAN to the called extension, when the called extension doesn’t exist on LAN behing the proxy, it lets the call proceed to remote asterisk (which sits on LAN behind firewall and to which the phone originating the call is registered)
per FreePBX guide here, I edited asterisk’s sip_nat.conf to contain the following lines
externhost=xxx.pointclark.net
externrefresh=120
localnet=192.168.1.0/255.255.255.0
(I have dyndns setup with pointclark.net but I also tried with ‘externip=xxxx’ with my current IP wich is dynamic but doesn’t change often and is ok to experiment with as if it was static IP but that makes no difference)
my asterisk installation is PBX in a Flash v1.2 (PIAF) preconfigured from Nerd Vittle (it has Astrisk 1.4 and FPBX 2.41) and he also advises on his website how to properly configure remote SIP extension and he says there to enter the above lines into the sip_custom.conf file (as opposed to sip_nat.conf file that FPBX advises), I tried both, one at a time and also both at the same time (which is what I have now) but it doesn’t seem to make difference
also I don’t have trouble registering tjhe remote phone, the problem is that I cannot make calls, I get ‘Call Failed’ message on Aastra phone and when I check asterisk SIP Info, it shows the registration of the remote SIP extention number with the correct remote IP but it says it is Lagged 3 seconds, sometimes it says Unreachable
when I try to call this remote SIP extension from other working extensions, asterisk tells me ‘the ext # is unavailable’, also in FPBX Panel the remote SIP extension while not completely greyed out (as the other SIP extesion is which is not registered at all, for now I try to make working just one of them) it doesn’t look as brightly lit as the rest of extensions, also on the left where each extension has little white arrow on black background, this remote registered SIP extension has green background, maybe that has to do with the fact that those other extensions are all IAX2 ones
I am quite new to asterisk, maybe you could tell me where I could get pull out of asterisk some technical logs for troubleshooting why this remote SIP extension is lagged (3000 ms on average) and why asterisk has trouble using it
at one point I was able to get one call through but the voice was one way only, it was after I changed port from 5060 to 5064 in the SIP extension setup in Device Options (in asterisk) but that port change might have been just a fluke, a coincidence, that then led me to experiment with port setting in SIP extesions setup in ‘Device Options’ thinking every extension should have unique SIP port there
–
“If you are configuring multiple registrations on the remote phone that could be causing some of the problems”
currently I plan to register the phone to single extension on asterisk, mind you I was somewhat taken aback by finding out that most of the features of your typical SIP phone are a total waste when one uses it with asterisk, it seems those phones are meant to be used without asterisk registering directly to various telephony providers out there which is what the multiple lines are for if I understand it now - however couldn’t one reigster several lines to several different extensions on asterisk and map those extensions to various trunks, might be simpler than trying to figure how to do it with dial plans which seem to be simple initially but when one starts configuring them one gets burried in their deep logic and looses one’s way in a jiffy
currently I am located at the remote phone end in EU while asterisk server is Canada, I have full control over asterisk though via remote access to PC on LAN where asterisk sits, and I have to say if I didn’t have so much time on hand I would have given up long ago, remote sip extesion is true living hell and telephony geeks nightmare, I was thinking of buying more SIP phones, the Aastra’s 57i but I am affraid to plow more money into this hell hole which it turns up to be, even if I have time on hand I’d rather spend it on other things than endless trying to make the phone work