When trying to connect a Panasonic TDE to an asterisk box I am getting a warning in the CLI saying “register_verify: Failed to parse contact info” I only get this with Asterisk version 184.108.40.206 or 220.127.116.11, I ran a packet capture during a failure and got the following.
U 192.168.0.101:5060 -> 192.168.0.6:5060
REGISTER sip:192.168.0.6:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK00005d3e;rport.
CSeq: 2 REGISTER.
Authorization: Digest realm=“realm”, nonce=“6lk23jd5”, algorithm=MD5, uri=“sip:192.168.0.6:5060”, username=“PANATDE”, response=“5fdsfwefww7632r2fff2acfb5d23c142”.
U 192.168.0.6:5060 -> 192.168.0.101:5060
SIP/2.0 400 Bad Request.
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK00005d3e;received=192.168.0.101;rport=5060.
CSeq: 2 REGISTER.
Server: Asterisk PBX 18.104.22.168.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO.
Supported: replaces, timer.
Date: Mon, 09 May 2011 08:28:19 GMT.
The same config with asterisk 22.214.171.124 works fine. Any suggestions?
The fault lies on the other side.
If it is a problem with the other side then I am surprised it works on older versions of asterisk.
Also, judging by the CLI warning it is an issue with the Contact header, but we have numerous Panasonic systems connecting to a variety of SIP registrars with that contact header (which is a valid one according to the SIP rfc).
As presented, all your header lines end in “.”. That is not permitted by the syntax.
Older versions may not parse as rigorously.
I can’t find out what “*” means in the Contact header, although it is allowed by the syntax. My guess is it is the same as not having Contact at all. It may be that Asterisk doesn’t understand this.
I wondered that, after I wrote the reply, but I still cant find anything in RFC 3261 that explains that.
It’s section 10.2.2 in the RFC where it is defined.
Oh and I think the “.” is being added by the packet capture software. The box is up and running with asterisk 126.96.36.199 and all packets have the “.” at the end.
this completely breaks support for older Grandstream ATA.
After upgrading Asterisk from 188.8.131.52 to 184.108.40.206.3, every Grandstream ATA286 and BT100 Phones stops working.
Is there a way i can change the behaviour back?
You first need to understand what has broken, and whether it is asterisk being more correct or asterisk being wrong. Once you have found out what is broken, you can probably find the specific SVN revision that broke it and apply that in reverse.
If you can demonstrate a problem in version 1.8, you may be able to get it fixed in that, using the bug tracker, and then back port that patch.
You will be lucky to find anyone to debug it to that level for free, unles they are personally affected.
I know exactliy what is broken. I just dont know, how i can fix it
I’ve done some debuging after upgrading to Asterisk 220.127.116.11.3.
You can find a sip-debug output here: privy.de/~kts/asterisk-debug/asterisk-debug.txt
It seems, that my Phone is sending the Header “Contact: *” which asterisk does not like.
The parts in the code, that is responsible for the check is in chan_sip.c…
A diff betweeen the both version is here: privy.de/~kts/asterisk-debug/ast … g-diff.txt
The responsible part from the diff is here: privy.de/~kts/asterisk-debug/ast … -diff2.txt
I have absolutly no clue about the SIP-Protocol but it seems, that this wildcard is something special?
Does anybody has an idea?
grr, found that bug!
- int single_binding_found;
+ int single_binding_found = 0;
…solves my problem
The bug is still present in 18.104.22.168 but not in 1.8.4!
If it works in the latest 1.8 version, nothing will be done to fix it in other versions. However, for future information, for absolute copyright safety in commercial versions of Asterisk, Digium don’t look at patches unless they are attached to a report on issues.asterisk.org/ by someone who has electronically signed the licence grant on that site.
So, it’s not fixed in 22.214.171.124 ?
If not, can this be fixed, for example, by Grandstream software upgrade?