Szenario:

UA(Grandstream) => PROXY(SER) => GATEWAY(*) => PSTN


After sending the SIP ACK From Gateway (*)

ACK sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK86c0bd474ea746b5
From: "Me" <sip:[EMAIL PROTECTED]>;tag=0f63d269bc25545d
To: <sip:[EMAIL PROTECTED]>;tag=as05df60b5
Contact: <sip:[EMAIL PROTECTED]>
Call-ID: [EMAIL PROTECTED]
CSeq: 0 ACK
     ^^^
User-Agent: Grandstream 1.0.4.39
Warning: 399 192.168.0.1 "detected firewall/NAT type is full cone"
Max-Forwards: 68
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Content-Length: 0


The * Channels hangs up:

[EMAIL PROTECTED] headers, 0 lines
[EMAIL PROTECTED]> ^MNEW_HANGUP DEBUG: Calling q931_hangup, ourstate Active,
peerstate Connect Request
^@> Protocol Discriminator: Q.931 (8)  len=9
^@> Call Ref: len= 2 (reference 280/0x118) (Originator)
^@> Message type: DISCONNECT (69)
^@> Cause (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0  
Location: Private network serving the local user (1)
^@>                  Ext: 1  Cause: Normal Clearing (16), class = Normal
Event (1) ]
^@    -- Hungup 'Zap/9-1'

Is this a * Problem? Looking into the Sources shows(chan_sip.c):


else if (!strcasecmp(cmd, "ACK")) {
        /* Uhm, I haven't figured out the point of the ACK yet.  Are we
           supposed to retransmit responses until we get an ack? 
           Make sure this is on a valid call */

                __sip_ack(p, seqno, 1);
                if (strlen(get_header(req, "Content-Type"))) {
                        if (process_sdp(p, req))
                                return -1;
                }
                
                if (!p->lastinvite && !strlen(p->randdata))
                    ^^^^^^^^^^^^^^
                        p->needdestroy = 1;

        }

Could it be, that * hangs up while getting zero as p->lastresult (CSeq
== 0 )?
Also it looks like a bug in the grandstreamfirmware sending CSeq zero?

would something like this solve the Problem?

if (!p->lastinvite >= 0 && !strlen(p->randdata))
                   ^^^^^

?

Best Regards
Markus 


_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to