Using asterisk 1.4.11 on a x64_64 AMD powered box. I cannot get any of my snom-360 or 370 phones to register, also trying x-lite from my pc also fails to register.
I can see via netstat that there is a udp open port listening on 5060
I can do a tcpdump on the *server and see the phone send a packet that matches the SIP trace on the phone.
Yet the phone keeps showing network failure, I assume because it doesn’t get a response it understands.
x-lite also tries and shows login times out.
sip.conf contains:
[ul][general]
context=default ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
[authentication]
;[snom]
;type=friend ; Friends place calls and receive calls
;context=from-sip ; Context for incoming calls from this user
;secret=blah
;subscribecontext=localextensions ; Only allow SUBSCRIBE for local extensions
;language=de ; Use German prompts for this user
;host=dynamic ; This peer register with us
;dtmfmode=inband ; Choices are inband, rfc2833, or info
;defaultip=192.168.0.59 ; IP used until peer registers
;mailbox=1234@context,2345 ; Mailbox(-es) for message waiting indicator
;subscribemwi=yes ; Only send notifications if this phone
; subscribes for mailbox notification
;vmexten=voicemail ; dialplan extension to reach mailbox
; sets the Message-Account in the MWI notify message
; defaults to global vmexten which defaults to “asterisk”
;disallow=all
;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!
[Rob]
type=friend
username=Rob
secret=0579
host=192.168.230.55
context=from-sip
dtmfmode=inband ; Choices are inband, rfc2833, or info
mailbox=4560@context,4560 ; Mailbox(-es) for message waiting indicator
subscribemwi=yes ; Only send notifications if this phone
; subscribes for mailbox notification
vmexten=voicemail ; dialplan extension to reach mailbox
; sets the Message-Account in the MWI notify message
; defaults to global vmexten which defaults to "asterisk"
disallow=all
allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!
allow=alaw
bindport=5060
regexten=4560
[1230]
type=friend
username=1230
secret=
host=192.168.230.235
context=from-sip
[/ul]
Fred is the phone I’m trying and 1230 is x-lite.
I’m missing something obvious but for the life of me cannot fathom what it is.
BTW there is no firewall running on the *server and they are all on the same Netgear FS726TP switch.
sip show users:
[ul]asterisk1*CLI> sip show users
Username Secret Accountcode Def.Context ACL NAT
1230 from-sip No RFC3581
Ed 978E from-sip No RFC3581
Fred 978F from-sip No RFC3581
Rob 0579 from-sip No RFC3581
[/ul]
so now what?
Any ideas appreciated.
Sorry about formatting - never seem to get that right.
Hi, not sure what you mean by localnet set up on server - the server ip is 192.168.230.50 and it has no problem communicating with the snom phones via http - both ways.
What do you mean by using the IPs for authentication - In the sip file I define each users device IP rather than use DHCP, for their password at this time i’m using the last four digits of their ethernet address.
ngrep port 5060 shows:
[ul]interface: eth0 (192.168.230.0/255.255.255.0)
filter: (ip) and ( port 5060 )
U 192.168.230.52:2054 -> 192.168.230.50:5060
REGISTER sip:asterisk1 SIP/2.0…Via: SIP/2.0/UDP 192.168.230.52:2054;branch=z9hG4bK-lrguga7qqp3l;rport…From: “Fred” sip:Fred@asterisk1;ta
g=wv5j1mernl…To: “Fred” sip:Fred@asterisk1…Call-ID: 3c267009a875-h1d9t6k9jzeg@snom360-00041323978F…CSeq: 3126 REGISTER…Max-Forwards: 7
0…Contact: sip:Fred@192.168.230.52:2054;line=v08f5dkc;flow-id=1;q=1.0;+sip.instance=“urn:uuid:190f2242-0189-4170-8e07-2e17317638ab”;aud
io;mobility=“fixed”;duplex=“full”;description=“snom360”;actor=“principal”;events=“dialog”;methods=“INVITE,ACK,CANCEL,BYE,REFER,OPTIONS,NOTIF
Y,SUBSCRIBE,PRACK,MESSAGE,INFO”…User-Agent: snom360/6.5.10…Supported: gruu…Allow-Events: dialog…X-Real-IP: 192.168.230.52…WWW-Contact: http://192.168.230.52:80…WWW-Contact: https://192.168.230.52:443…Expires: 3600…Content-Length: 0…
exit
[/ul]
This appears to match what the phone is showing on the SIP trace.
Still not registering as neither asterisk acknowledges the phones presence and the phone does not appear to get a response.
Thanks
First of all, you would do well to ditch the naming convention you’re using.
Make the [sip] definition the extension (as you see with extension 1230).
The phone login username should also be the extension.
If you make the username an alpha word, you won’t be able to dial any of the stations using a touch tone pad. (How do you dial “fred” when all you have are the digits 0-9, *, and #?)
Change the dtmf mode to rfc2833. It’s how SIP phones are generally designed.
Thanks for the suggestions, none of these appear address the issue I’m having. I have done as suggested so now I have:
[sip.conf]
[ul][general]
context=default ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
Did you go into the phones, and setup the user, password, resgistration server, outbound proxy, MWI server, voicemail server, music on hold server, conference server, NTP server, and all the other settings that a phone needs to connect to Asterisk?
The sip.conf files doesn’t make changes to your phones. It’s what the phones themselves have to match in order to be allowed to use the system’s resources.
Think of it more like an email system. If you don’t have an email account on the the email server, you can’t use the server to send and receive messages. Asterisk would be like the email server.
Like any other server, Asterisk need clients. These clients are phones, and the phones themselves need to know about their “accounts”, on the various servers that will supply them all of their phone services.
So you setup the “account” in the Asterisk sip.conf, and then setup the “client” in the phone. Each phone will have differnet settings and setup methods… be sure to check their documentation.
To re-ask the question that Dovid asked, why specify the IP address of the sip.conf file? You don’t have to, and it’s probably better if you don’t. It restricts the login of a particular SIP client, so that it can only login if it has that specific IP address. If your phones are getting an address by DHCP, and it doesn’t match the SIP profile in sip.conf, it won’t work.
No problem with the not so obvious question.
Yes I have changed all the settings on the phone. We are not using a proxy, and MWI can wait until I get the basics working. I have followed the handset manufacturers setup instructions for asterisk.
Not using DHCP as I am not interested in roaming of the handsets, and by specifying the IP I retain some measure of control and security.
Each phone can and is getting its settings from a specific phone file hosted on the *server by apache. This is working fine as I can see the changes once the phone reboots via the phone’s web portal i.e. 192.168.230.52:80.
I have traced the SIP REGISTER udp packet from the phone, and then via tcpdump and ngrep as arriving unaltered at the *server on port 5060.
At that point it appears to get lost, I don’t know how to trace what asterisk is doing once (if) it is getting the register request.
There is nothing leaving the *server destined for the phone, so the phone says network error.
So I’m asking for some ideas of what to check next, preferably from the asterisk CLI…
Well I’ve set the phone for DHCP and modified the sip.conf for host=dynamic.
No difference.
Still does not register, phone still shows network failure.
What command, if any, is available to monitor asterisk’s response to a SIP register request?
I cannot believe how difficult it is to get something basic like this functioning.
I have now spent about 100+ hours trying different set-ups, two re-installs of asterisk, read 100’s of web pages, followed many different step by step instructions, purchased and read most of the book, Asterisk - The future of Telephony and still no joy.
I am not a computer novice, have spent over 20 years in the telecommunications industry, but never come across something so difficult to get going. Compared to this, getting my myth-tv box jumping through hoops was a walk in the park.
I tried a trixbox install and found it didn’t like my hardware combo, so I started with a very basic Centos el5 install, manual install and compilation of asterisk along with all the other bits, following the many different examples on the internet.
I am missing something very basic, I’m sure, but need some guidance about how this SIP REGISTER process works so I can determine what is tripping me up.
HELP
Could this be something as simple as a hardware failure?
Maybe you’ve got a bad Ethernet NIC, or a bad cable or wiring to your switch…
I’ve not seen troubles like yours very often.
The only other piece of advice I might have would be to try setting the phones manually instead of using the configuration file. An explicit setting in the web interface may be different.
Go through EVERYTHING in the setup. Include your Asterisk box in every setting for registration, voicemail, outbound proxy, everything…
You might also check to see if there’s a firmware update for the phones.
I do not believe there is a hardware failure as the box communicates fine on port 80 for apache, also via port 22 for ssh access.
I have also manually loaded the required settings into the phones and upgraded the software on one of the phones - still no joy.
Also as x-lite soft phone running on another workstation also cannot connect to the *server, I am led to think this is strictly an asterisk SIP issue.
I am going to upgrade to the latest version of asterisk and see if that makes any difference…
grasping at any thing at this point.
Still have a question for anyone that knows how to trace progress of a SIP REGISTER request within asterisk???
It appears that nothing comes out of the asterisk box in response to a SIP REGISTER packet.
you asked for wild ass guesses too and I have seen the behavior you are reporting happen on asterisk. in the one observation of this, it was when there were multiple IP addresses bound to the NIC. The SIP phones would try to register to one IP address on the NIC but the reply would come from the other address. This did not affect SSH or HTTP which worked just fine. The fix was to go into sip.conf and iax.conf and change the IP binding from the default 0.0.0.0 [all addresses] to the specific addresses you want to use for SIP & IAX.
May be totally irrelevant to your condition but the symptoms match.
Still no progress.
I now have a clean install of * 1.4.14 with libpri 1.4.1; rhino-2.2.1; zaptel-1.4.6
no errors in compile or install
wiped /etc/asterisk and did a "make samples"
now my sip.conf
[general]
context=congest-sip ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=192.168.230.50 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
allow=all ; Allow all codecs
[5678]
type=friend
username=5678
;secret=fred
host=dynamic
context=from-sip
dtmfmode=rfc2833
[5679]
type=friend
username=5679
;secret=978E
host=192.168.230.51
context=from-sip
[1230]
type=friend
username=1230
;secret=1230
host=dynamic
context=from-sip
dtmfmode=rfc2833
So you will see I have now bound to the ip address explicitly.
Still no joy, either from my phones or from x-lite running on my fc6 workstation.
Looking at various forums, it appears that the *CLI can be set to trace progress, and there is one site where someone posts a listing of the SIP messages that occur during a REGISTER - i.e. the dialog going each way.
How do I get to trace like this?
I know that the initial request is getting to the server and that asterisk is listening on port 5060. Now I need to see what asterisk is doing with this request - how does this occur?
In your new sip.conf file, your secret (sip client password) is commented out. Did you intend that?
The semicolon is used as a comment mark in Asterisk .conf files due to the fact the pound sign (#) is a dtmf key and is likely to be used in dialplan programming.
When starting Asterisk, use:
asterisk -vvvvc
That will put Asterisk in verbose mode. You will see call progress and other system messages on the CLI> screen.
I am aware of commenting out the password/secret - one site suggested trying this - that’s why it like that.
What is of more concern is that I see nothing coming up on the *CLI
I have even tried * -vvvvvgcdr - still nothing comes up - this may be getting close to the problem, asterisk is not actually hearing or responding, nothing coming in on the *CLI.
Are there any global configurations that could be wrong that stop the *server?
I believe that I have rigorously followed the install instructions, so not sure what to check next.
Yet sip show users and sip show peers give me indications that the system is kind of there, but I never see anything else - even sip set debug gives nothing.
I’m real confused…
Well the plot thickens…
If I set the sip.conf file for the x-lite [1230] with port= and then use the *CLI> dial 1230 the call goes through (haven’t checked audio as not set up for this on the workstation). When I hang-up the call from either end it works and hangs up the call.
Then the x-lite tries to register (as it does every minute until registered) and the *CLI shows:
[Nov 26 15:51:55] ERROR[2992]: chan_sip.c:8513 register_verify: Peer '1230' is trying to register, but not configured as host=dynamic
[Nov 26 15:51:55] NOTICE[2992]: chan_sip.c:14943 handle_request_register: Registration from 'RobsWS <sip:1230@asterisk1.ndgonline.net>' failed for '192.168.230.235' - Peer is not supposed to register
so from this it appears the *server only expects SIP REGISTER from those clients that have host=dynamic - great if the documentation told me this!:evil:
So then I change the sip.conf file and make it host=dynamic and hey presto it registers.
Problem is, until I actually make a call (and apparently open a port) to the device, the *server does not see the REGISTER request.
This really looks like a firewall issue - yet I am certain that iptables is not running on either my workstation or the *server, and both the *server and all the phones including x-lite are on the same subnet (192.168.230.0/24).
Go figure…
However this still leaves me with a problem for all my snom-360 phones as they are trying to SIP REGISTER every minute but these requests are not seen by the *server. I tried the same trick that worked with the x-lite but this did not work for the hardware phones.
I really am missing something basic. Is there some other parameter I need to set in sip.conf? All my reading shows that I have the basics in place but no joy
The book Asterisk - The Future of Telephony, second edition does not help, indeed all the online forums and docs I have looked at seem to deal with setting up and helping folk achieve the basic installation of software and setup of particular situations e.g. getting MWI to work…
Where do I go to get an understanding of the sip channel driver and an overview of how asterisk expects this to work.
I note that *server is not considered a sip proxy server, but rather a sip agent or end-point - I sure do not understand the implications of that.
Some suggested reading somewhere??? I am happy to do my home work but so far google and the various forums have not been much help.
Thanks for suggestions thus far, I’ll keep going as I have committed too much to pull back now.
BTW - the
asterisk*CLI>sip show peers
shows my devices and says that the status is Unmonitored for all of them.
What does this mean?
how do I get a phone / peer to be Monitored?
Thanks