[asterisk-dev] chan_sip, To tags, Forking Proxy

Stefan Tichy asterisk at pi4tel.de
Sun Jan 7 12:40:51 MST 2007


Hi,

if asterisk initiates a sip call (sends invite) it will extract
the totag from the first response it gets. This is probably a 180
Ringing response from some phone.

Asterisk will ignore any response with different totag from now on
(at least if "predantic=yes" is set in sip.conf, but without
pedantic setting there will be other problems)

If a sip proxy like SER is involved there might be responses from
other UA with other totag and the expected 200 OK response might be
retrieved by one of theese.

--- chan_sip.orig       2006-12-15 11:55:41.000000000 +0100
+++ chan_sip.c  2007-01-07 20:11:37.000000000 +0100
@@ -12055,7 +12055,7 @@
                __sip_ack(p, seqno, 0, sipmethod);
 
        /* Get their tag if we haven't already */
-       if (ast_strlen_zero(p->theirtag) || (resp >= 200)) {
+       if (ast_strlen_zero(p->theirtag) && (resp >= 200)) {
                char tag[128];
 
                gettag(req, "To", tag, sizeof(tag));

This causes asterisk 1.4.0 to ignore totags from 1XX responses and
solves this problems but may create others.

Other ideas?

-- 
Stefan Tichy   <asterisk at pi4tel.de>


More information about the asterisk-dev mailing list