|Summary:||ASTERISK-06888: Problem with long contact lines|
|Reporter:||Ben Smithurst (bsmithurst)||Labels:|
|Date Opened:||2006-05-03 04:05:49||Date Closed:||2006-05-03 07:46:28|
|Environment:||Attachments:||( 0) contact-buffer-size-patch.txt|
|Description:||It appears that asterisk does properly handle a contact line over 80 characters long, due to a fixed size buffer in parse_register_contact(). We use Jasomi peerpoint servers to handle registrations from users behind NAT, and this generates long contact lines:|
Contact: Ben Smithurst (DECT) <sip:-0TTruimBbC5hi2qwEGtlNZmWFgCfRDGSdSCw@220.127.116.11:5082>;expires=30.
Asterisk then logs an error trying to parse this:
May 3 09:50:36 WARNING: chan_sip.c:1765 get_in_brackets: No closing bracket found in 'Ben Smithurst (DECT) <sip:-0TTruimBbC5hi2qwEGtlNZmWFgCfRDGSdSCw@18.104.22.168:'
May 3 09:50:36 NOTICE: chan_sip.c:6241 parse_register_contact: 'Ben Smithurst (DECT) <sip:-0TTruimBbC5hi2qwEGtlNZmWFgCfRDGSdSCw@22.214.171.124:' is not a valid SIP contact (missing sip:) trying to use anyway
And the 200 OK reply to the REGISTER has the incorrectly parsed contact:
Contact: <Ben Smithurst (DECT) <sip:-0TTruimBbC5hi2qwEGtlNZmWFgCfRDGSdSCw@126.96.36.199:>;expires=60.
The fix for this is trivial - increasing the buffer size to 256 characters has not caused any problems for us yet.
I am quite surprised no-one has seen this issue other than me - but I did search for similar bugs, and the problem has been around for a long time.
|Comments:||By: delvar (delvar) 2006-05-03 05:30:43|
i have had this issue aswell, as stated above i just modified the source to increase the buffer size. seems to work here with no issues.
By: Olle Johansson (oej) 2006-05-03 07:20:28
It surprises me too that no one has seen this before... I will fix this.
By: Olle Johansson (oej) 2006-05-03 07:46:27
Committed to svn 1.2 rev 24381 and trunk.