[asterisk-dev] asterisk not sending ACK after reinvite

Danish Samad danishsamad at gmail.com
Sat May 19 05:16:07 MST 2007


Hi,

I am faced with this dilema of asterisk not sending an ACK after it receives
200 OK from OpenSER (which is a  response to a reinvite request sent by
asterisk. Here is my setup

Carrier<->OpenSER<->Asterisk1<->Asterisk2

A user is connected with Asterisk1 (through the carrier and OpenSER). On
certain dtmf events the call is forwarded to Asterisk2 using the Dial
command. Canreinvite is set to "yes" in Asterisk1's sip.conf, therefore it
sends reinvites to both Asterisk2 and OpenSER to release RTP.
OpenSER forwards the reinvite to the carrier and relays the 200 OK received
back to Asterisk1 but Asterisk1 never responds back with an ACK. Finally the
transaction on OpenSER times out and a bye message is sent to Asterisk1,
causing both legs to be hungup. If I reset canreinite to no the scenario
works.

The Invite message sent to OpenSER and 200 OK received are shown below:

INVITE sent
-----------
Session Initiation Protocol
    Request-Line: INVITE sip:1234 at 192.168.0.1;transport=udp SIP/2.0
        Method: INVITE
        Resent Packet: False
    Message Header
        Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK67156992;rport
        Route: <sip:192.168.0.2;ftag=as04d1d0dc;lr=on>
        From: "16477239819" <sip:16477239819 at 192.168.0.3>;tag=as04d1d0dc
        To: <sip:12133411419 at 192.168.0.2>;tag=d12f2182-140a6d
        Contact: <sip:16477239819 at 192.168.0.3>
        Call-ID: 7d1f99f5735cdec8743ed3d244a05c99 at 192.168.0.3
        CSeq: 104 INVITE
        User-Agent: Asterisk
        Max-Forwards: 70
        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
        Content-Type: application/sdp
        Content-Length: 245
    "SDP not shown"

200 OK received
---------------

Session Initiation Protocol
    Status-Line: SIP/2.0 200 OK
    Message Header
        Call-ID: 7d1f99f5735cdec8743ed3d244a05c99 at 192.186.0.3
        Contact: <sip:666251612133411419 at 192.168.0.1;transport=udp>
        Content-Length: 232
        Content-Type: application/sdp
        CSeq: 103 INVITE
        From: "16477239819"<sip:16477239819 at 192.186.0.3>;tag=as04d1d0dc
        Record-Route: <sip:192.168.0.2;ftag=as04d1d0dc;lr=on>
        To: <sip:12133411419 at 192.168.0.2>;tag=d12f2182-140a6d
        User-Agent: Quintum/1.0.0
        Via: SIP/2.0/UDP 192.186.0.3:5060;branch=z9hG4bK0f664853;rport=5060
    "SDP not shown"


Now the interesting thing is that if I take out OpenSER and forward directly
to the carrier then it works fine. The 200 OK received from the carrier is
shown below

Session Initiation Protocol
    Status-Line: SIP/2.0 200 OK
        Status-Code: 200
        Resent Packet: False
    Message Header
        Call-ID: 11d8858b42cf83725641484d0f63289d at 192.168.0.3
        Contact: <sip:666251614168404385 at 192.168.0.1>
        Content-Length: 232
        Content-Type: application/sdp
        CSeq: 103 INVITE
        From: "16477239819"<sip:16477239819 at 192.168.0.3>;tag=as41da20f1
        To: <sip:666251614168404385 at 192.168.0.1>;tag=d12f2182-140d2e
        User-Agent: Quintum/1.0.0
        Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK0e1703c7;rport

The differences I notice are
1. OpenSER modifies "rport" at the end of Via to "rport=5060".
2. Openser appending "transport=udp" in Contact.

I am using Asterisk 1.2-18, canreinvite is set to yes and nat is set to no.

I will really appreciate if someone can shed some light on this issue and
help me fix it.

Regards,
Danish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070519/3e80fcb5/attachment.htm


More information about the asterisk-dev mailing list