[Home]

Summary:ASTERISK-02388: problem with sip registration (to sipgate.de) with pedantic=yes
Reporter:typ1 (typ1)Labels:
Date Opened:2004-09-11 10:12:52Date Closed:2008-01-15 15:07:33.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pedanticoff.cap
( 1) pedanticon.cap
( 2) sip-pedantic.debug.txt
Description:With enabled pedantic checking in sip.conf i can call custom gateway with "wrong" sip headers implementaion(with spaces) but I can't register ro SER at sipgate.de.



****** ADDITIONAL INFORMATION ******

A patch from file[laptop]@#asterisk included in bugreport 0002411 worked for me just fine...

Seems like bugfix for BUG 0002411 brakes backward
compatibilyti to standart SIP headers!
Comments:By: Mark Spencer (markster) 2004-09-11 11:28:05

Can you please provide a sip debug from the failing and working session?  thanks.

By: Mark Spencer (markster) 2004-09-11 11:29:43

Also can you confirm that the registration works if pedantic sip checking is off?

By: typ1 (typ1) 2004-09-11 17:28:31

I uploaded some debug from registering with and without pedantic chacking...

and yes i can confirm that registration works with pedantic off

By: Mark Spencer (markster) 2004-09-11 19:42:23

What do you see different on the wire between the two?

The server does not appear to provide any response whatsoever to our second register request.  Unless I'm totally misreading this log however, it seems that the "Expires: 120" line has extra data on it (in this case the words "sip reload") is that on the line for real?

By: Mark Spencer (markster) 2004-09-11 21:36:07

I've carefully analyzed the two initial packets (not counting the retransmissions with the strange "sip debug" appended to the expires) and based on the debug and i cannot tell any difference between them, nor can I imagine any reason that there would be, nor can I invision any way in which those packets could cause the other side to send no response whatsoever.

At this point, we need to see what is actually on the wire (e.g. a nicely cooked ethereal debug for the packets in question) and it would be helpful to know what reason SER has for not responding.

By: typ1 (typ1) 2004-09-12 08:27:54

here is some cli output for pedanticon.cap

Asterisk Ready.
Sep 12 15:17:24 WARNING[131080]: chan_sip.c:680 retrans_pkt: Maximum retries exceeded on call 6b8b4567327b23c6643c986966334873@10.150.63.25 for seqno 103 (Critical Request)
Sep 12 15:17:38 NOTICE[131080]: chan_sip.c:3983 sip_reg_timeout: Registration for '8996@iptel.org' timed out, trying again
pinguin*CLI> sip show registry
Host                            Username       Refresh State              
iptel.org:5060                  8996               300 Auth. Sent          
Sep 12 15:17:44 WARNING[131080]: chan_sip.c:680 retrans_pkt: Maximum retries exceeded on call 6b8b4567327b23c6643c986966334873@10.150.63.25 for seqno 105 (Critical Request)
Sep 12 15:17:58 NOTICE[131080]: chan_sip.c:3983 sip_reg_timeout: Registration for '8996@iptel.org' timed out, trying again
Sep 12 15:18:04 WARNING[131080]: chan_sip.c:680 retrans_pkt: Maximum retries exceeded on call 6b8b4567327b23c6643c986966334873@10.150.63.25 for seqno 107 (Critical Request)
Sep 12 15:18:18 NOTICE[131080]: chan_sip.c:3983 sip_reg_timeout: Registration for '8996@iptel.org' timed out, trying again
Sep 12 15:18:24 WARNING[131080]: chan_sip.c:680 retrans_pkt: Maximum retries exceeded on call 6b8b4567327b23c6643c986966334873@10.150.63.25 for seqno 109 (Critical Request)

By: Mark Spencer (markster) 2004-09-12 11:17:41

Actually it appears we *are* receiving 200 OK back, and we're not applying the 200 OK to the transmitted frame.  If you turn on debug in /etc/asterisk/logger.conf (in addition to NOTICE, WARNING, ERROR, etc) are there any more tiddly bits of information that might give us a clue as to why Asteirsk doesn't like SER's 200 OK?

By: Mark Spencer (markster) 2004-09-13 00:03:27

Can you find me on IRC so I can login and take a   look?

By: Olle Johansson (oej) 2004-09-13 01:24:59

Mark, on thin ice here, but a hint: The unique identifier for a SIP dialogue is the Call-ID: plus two tags, the To: tag and the From: tag. From reading the source of find_call(), it doesn't seem that we are checking two tags, only our own.

The tag addition was done in order to be able to uniquely identify each fork of a SIP dialogue through a SIP proxy.

The code we have in find_call may work for calls, but not for REGISTER with an outbound proxy, I think we're checking the wrong tag here. In order to do this right, we need to save both tags and check both.

And yes, this is pedantic.

By: typ1 (typ1) 2004-09-14 10:13:06

with debug on in logger.conf :
Sep 14 17:06:46 DEBUG[131080]: ##### Testing 195.37.77.99 with 10.150.0.0
Sep 14 17:06:46 DEBUG[131080]: Target address 195.37.77.99 is not local, substituting externip
Sep 14 17:06:46 DEBUG[131080]: That's odd...  Got a response on a call we dont know about.
Sep 14 17:06:47 DEBUG[131080]: ##### Testing 195.37.77.99 with 10.150.0.0
Sep 14 17:06:47 DEBUG[131080]: Target address 195.37.77.99 is not local, substituting externip
Sep 14 17:06:47 DEBUG[131080]: That's odd...  Got a response on a call we dont know about.
Sep 14 17:06:48 DEBUG[131080]: ##### Testing 195.37.77.99 with 10.150.0.0
Sep 14 17:06:48 DEBUG[131080]: Target address 195.37.77.99 is not local, substituting externip
Sep 14 17:06:48 DEBUG[131080]: That's odd...  Got a response on a call we dont know about.
Sep 14 17:06:49 WARNING[131080]: Maximum retries exceeded on call 2663cf9b16894c961db169c636da5eaa@10.150.63.25 for seqno 113 (Critical Request)


I hope that it can help a little...

The server is in LAN behind NAT... and I can't give anyone access to it :(
for testing every iptel account will do... It's not only sipgate problem

By: Mark Spencer (markster) 2004-09-14 19:03:32

Try latest CVS.  This time I look at both tags.  Go SIP, way to add another pointless exception to the normal handling, whoo hoo!

By: robf (robf) 2004-09-14 20:01:07

Latest cvs (chan_sip.c rev 1.502) has a missing semicolon.  Reported as bug ASTERISK-2404.

By: Mark Spencer (markster) 2004-09-14 20:50:03

Okay okay, but does it work now with the fixed one?

By: typ1 (typ1) 2004-09-15 07:05:42

:( No, It doesn't work

Sep 15 14:02:00 NOTICE[131080]: chan_sip.c:4018 sip_reg_timeout: Registration for '1****1@sip.host.ge' timed out, trying again
Sep 15 14:02:00 NOTICE[131080]: chan_sip.c:4018 sip_reg_timeout: Registration for '2****1@10.150.63.28' timed out, trying again
Sep 15 14:02:00 NOTICE[131080]: chan_sip.c:4018 sip_reg_timeout: Registration for '2****0@10.150.63.28' timed out, trying again
Sep 15 14:02:00 NOTICE[131080]: chan_sip.c:4018 sip_reg_timeout: Registration for '1****2@sipgate.de' timed out, trying again
Sep 15 14:02:00 NOTICE[131080]: chan_sip.c:4018 sip_reg_timeout: Registration for '8****12@sipgate.de' timed out, trying again
Sep 15 14:02:00 NOTICE[131080]: chan_sip.c:4018 sip_reg_timeout: Registration for '8**6@iptel.org' timed out, trying again
Sep 15 14:02:00 NOTICE[131080]: chan_sip.c:4018 sip_reg_timeout: Registration for '8**5@iptel.org' timed out, trying again

Why don't you register to IPtel and test it... that way you can test it much easyer and quicker..

By: Mark Spencer (markster) 2004-09-15 15:26:02

Fixed in CVS

By: Digium Subversion (svnbot) 2008-01-15 15:07:27.000-0600

Repository: asterisk
Revision: 3778

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r3778 | markster | 2008-01-15 15:07:26 -0600 (Tue, 15 Jan 2008) | 2 lines

Consider both tags as possible matches (bug ASTERISK-2388)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3778

By: Digium Subversion (svnbot) 2008-01-15 15:07:33.000-0600

Repository: asterisk
Revision: 3786

U   trunk/apps/app_mp3.c
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r3786 | markster | 2008-01-15 15:07:33 -0600 (Tue, 15 Jan 2008) | 2 lines

Update mp3 copyright header, fix pedantic + register in SIP (bug ASTERISK-2388)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3786