Hi Bogdan,

        
Ok, now we known that is happening. But, is it logic? or is it a bug in 1.6.4.2 
version?


           Curiously this does not happen with UDP signaling.

        

        Thanks.

        Regards.

Date: Wed, 4 Apr 2012 18:19:04 +0300
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [OpenSIPS-Users] sip message enters on bucle



  


    
  
  
    Jorge,

    

    the message is not looping, it is retransmitting - it is something
    different. OpenSIPS tries to open a new TCP conn to the destination
    (as there is no existing one), but it fails in timeout as you cannot
    open a TCP conn somewhere behind a NAT.

    

    Regards,

    Bogdan

    

    On 04/04/2012 06:06 PM, Jorge Ortea wrote:
    
      
      
        

        Hi Bogdan,

        

        Is correct, Z.Z.Z.Z:5062 is a public adress behind a NAT. I have
        found that opensips haven't this tcp connection, now this
        account has changed the public adress.

        

        But the sip messages keeps in the loop. It's like if Opensips is
        looking for a tcp connection that it hasn't.... ?¿

        

        Thanks.

        Regards.

        

        

        
          Date: Wed, 4 Apr 2012 17:38:31 +0300

          From: [email protected]

          To: [email protected]

          CC: [email protected]

          Subject: Re: [OpenSIPS-Users] sip message enters on bucle

          

          
          
          Hi Jorge,

          

          So opensips tries to send the BYE to Z.Z.Z.Z:5062 via TCP
          (guess based on Route hdrs), but nobody is listening on TCP -
          is this address pointing behind a NAT ? why is not accepting a
          new TCP connection.

          

          On the other side, what you can do is to reduce the timeout on
          TCP connection, so opensips will react sooner:

              http://www.opensips.org/Resources/DocsCoreFcn18#toc78

          

          Regards,

          Bogdan

          

          On 04/04/2012 05:16 PM, Jorge Ortea wrote:
          
            
             

              Hi Bogdan,

              

              Exactly, is ready, OpenSIPS try to reach to destination
              but now the account 2105 haven't the location: 
              Z.Z.Z.Z:5062

              

              In fact, when OpenSIPS try to reach to there, it write in
              log:     (this account uses TLS signaling)

              

              Apr  4 10:14:17 alpha02 /usr/local/sbin/opensips[29503]:
              :::::: BYE - from 911111111 to O2105 - Callid: 
[email protected]
              - Source: X.X.X.152

              Apr  4 10:14:18 alpha02 /usr/local/sbin/opensips[29525]:
              :::::: BYE - from 911111111 to O2105 - Callid: 
[email protected]
              - Source: X.X.X.152

              Apr  4 10:14:19 alpha02 /usr/local/sbin/opensips[29497]:
              :::::: BYE - from 911111111 to O2105 - Callid: 
[email protected]
              - Source: X.X.X.152

              Apr  4 10:14:21 alpha02 /usr/local/sbin/opensips[29487]:
              :::::: BYE - from 911111111 to O2105 - Callid: 
[email protected]
              - Source: X.X.X.152

              Apr  4 10:14:25 alpha02 /usr/local/sbin/opensips[29511]:
              :::::: BYE - from 911111111 to O2105 - Callid: 
[email protected]
              - Source: X.X.X.152

              Apr  4 10:14:27 alpha02 /usr/local/sbin/opensips[29503]:
              ERROR:core:tcp_blocking_connect: timeout 10 s elapsed from
              10 s 

              Apr  4 10:14:27 alpha02 /usr/local/sbin/opensips[29503]:
              ERROR:core:tcpconn_connect: tcp_blocking_connect failed 

              Apr  4 10:14:27 alpha02 /usr/local/sbin/opensips[29503]:
              ERROR:core:tcp_send: connect failed 

              Apr  4 10:14:27 alpha02 /usr/local/sbin/opensips[29503]:
              ERROR:tm:msg_send: tcp_send failed 

              Apr  4 10:14:27 alpha02 /usr/local/sbin/opensips[29503]:
              ERROR:tm:t_forward_nonack: sending request failed 

              

              Thus, how can i detect and avoid this ??

              

              Thanks.

              Regards.

              

              

              
                Date: Wed, 4 Apr 2012 14:56:16
                +0300

                From: [email protected]

                To: [email protected]

                CC: [email protected]

                Subject: Re: [OpenSIPS-Users] sip message enters on
                bucle

                

                Hi Jorge,

                

                It looks like Asterisk generates the BYEs and
                retransmits it because there is no reply coming back
                from opensips. Normally the BYE is end 2 end replied (so
                the other end device should generate the reply for BYE).

                But looking at the 477 reply you get from OpenSIPS, I
                suspect that OpenSIPS was trying to forward the BYE
                request (maybe via TCP), got blocked and failed at the
                end - this failure resulted in the 477 reply.

                

                Check the opensips logs to see error when processing the
                BYE.

                

                Regards,

                Bogdan

                

                On 04/04/2012 11:42 AM, Jorge Ortea wrote:
                
                  
                   Hi,

                    

                    I have the follow VoIP platform;  OpenSIPS
                    1.6.4.2-tls + Mediaproxy 2.0 + a pair of Asterisks
                    1.4 (behind SER)

                    

                    It works fine but sometimes a sip message enters on
                    a loop. Asterisk sends 5 sip
                        messages at every
                        turn

                    

                    

                    My logs in OpenSIPS:

                    

                    Apr  4 10:14:17 alpha02
                    /usr/local/sbin/opensips[29503]: :::::: BYE - from
                    911111111 to O2105 - Callid: 
[email protected]
                    - Source: X.X.X.152

                    Apr  4 10:14:18 alpha02
                    /usr/local/sbin/opensips[29525]: :::::: BYE - from
                    911111111 to O2105 - Callid: 
[email protected]
                    - Source: X.X.X.152

                    Apr  4 10:14:19 alpha02
                    /usr/local/sbin/opensips[29497]: :::::: BYE - from
                    911111111 to O2105 - Callid: 
[email protected]
                    - Source: X.X.X.152

                    Apr  4 10:14:21 alpha02
                    /usr/local/sbin/opensips[29487]: :::::: BYE - from
                    911111111 to O2105 - Callid: 
[email protected]
                    - Source: X.X.X.152

                    Apr  4 10:14:25 alpha02
                    /usr/local/sbin/opensips[29511]: :::::: BYE - from
                    911111111 to O2105 - Callid: 
[email protected]
                    - Source: X.X.X.152

                      

                    

                    

                    Sip messages in Asterisk *CLI> 'sip debug':

                    

                    set_destination: Parsing 
<sip:X.X.X.150;r2=on;lr=on;did=e25.7093e044>
                    for address/port to send to

                    set_destination: set destination to X.X.X.150, port
                    5060

                    Reliably Transmitting (no NAT) to X.X.X.150:5060:

                    BYE sip:[email protected]:5062;transport=tls
                    SIP/2.0

                    Via: SIP/2.0/UDP
                    X.X.X.152:5060;branch=z9hG4bK59044fff;rport

                    Route: 
<sip:X.X.X.150;r2=on;lr=on;did=e25.7093e044>,<sip:Y.Y.Y.150:5061;transport=tls;r2=on;lr=on;did=e25.7093e044>

                    From: "911111111" <sip:[email protected]>;tag=as167eb28e

                    To: <sip:[email protected]>;tag=bcd482cd12b8a21i0

                    Call-ID: [email protected]

                    CSeq: 2874 BYE

                    User-Agent: Asterisk PBX

                    Max-Forwards: 70

                    X-Asterisk-HangupCause: Normal Clearing

                    X-Asterisk-HangupCauseCode: 16

                    Content-Length: 0

                    

                    

                    ---

                    Scheduling destruction of SIP dialog 
'[email protected]'
                    in 32000 ms (Method: REFER)

                    Retransmitting #1 (no NAT) to X.X.X.150:5060:

                    BYE sip:[email protected]:5062;transport=tls
                    SIP/2.0

                    Via: SIP/2.0/UDP
                    X.X.X.152:5060;branch=z9hG4bK59044fff;rport

                    Route: 
<sip:X.X.X.150;r2=on;lr=on;did=e25.7093e044>,<sip:Y.Y.Y.150:5061;transport=tls;r2=on;lr=on;did=e25.7093e044>

                    From: "911111111" <sip:[email protected]>;tag=as167eb28e

                    To: <sip:[email protected]>;tag=bcd482cd12b8a21i0

                    Call-ID: [email protected]

                    CSeq: 2874 BYE

                    User-Agent: Asterisk PBX

                    Max-Forwards: 70

                    X-Asterisk-HangupCause: Normal Clearing

                    X-Asterisk-HangupCauseCode: 16

                    Content-Length: 0

                    

                    

                    ---

                    Retransmitting #2 (no NAT) to X.X.X.150:5060:

                    BYE sip:[email protected]:5062;transport=tls
                    SIP/2.0

                    Via: SIP/2.0/UDP
                    X.X.X.152:5060;branch=z9hG4bK59044fff;rport

                    Route: 
<sip:X.X.X.150;r2=on;lr=on;did=e25.7093e044>,<sip:Y.Y.Y.150:5061;transport=tls;r2=on;lr=on;did=e25.7093e044>

                    From: "911111111" <sip:[email protected]>;tag=as167eb28e

                    To: <sip:[email protected]>;tag=bcd482cd12b8a21i0

                    Call-ID: [email protected]

                    CSeq: 2874 BYE

                    User-Agent: Asterisk PBX

                    Max-Forwards: 70

                    X-Asterisk-HangupCause: Normal Clearing

                    X-Asterisk-HangupCauseCode: 16

                    Content-Length: 0

                    

                    

                    ---

                    Retransmitting #3 (no NAT) to X.X.X.150:5060:

                    BYE sip:[email protected]:5062;transport=tls
                    SIP/2.0

                    Via: SIP/2.0/UDP
                    X.X.X.152:5060;branch=z9hG4bK59044fff;rport

                    Route: 
<sip:X.X.X.150;r2=on;lr=on;did=e25.7093e044>,<sip:Y.Y.Y.150:5061;transport=tls;r2=on;lr=on;did=e25.7093e044>

                    From: "911111111" <sip:[email protected]>;tag=as167eb28e

                    To: <sip:[email protected]>;tag=bcd482cd12b8a21i0

                    Call-ID: [email protected]

                    CSeq: 2874 BYE

                    User-Agent: Asterisk PBX

                    Max-Forwards: 70

                    X-Asterisk-HangupCause: Normal Clearing

                    X-Asterisk-HangupCauseCode: 16

                    Content-Length: 0

                    

                    

                    ---

                    Retransmitting #4 (no NAT) to X.X.X.150:5060:

                    BYE sip:[email protected]:5062;transport=tls
                    SIP/2.0

                    Via: SIP/2.0/UDP
                    X.X.X.152:5060;branch=z9hG4bK59044fff;rport

                    Route: 
<sip:X.X.X.150;r2=on;lr=on;did=e25.7093e044>,<sip:Y.Y.Y.150:5061;transport=tls;r2=on;lr=on;did=e25.7093e044>

                    From: "911111111" <sip:[email protected]>;tag=as167eb28e

                    To: <sip:[email protected]>;tag=bcd482cd12b8a21i0

                    Call-ID: [email protected]

                    CSeq: 2874 BYE

                    User-Agent: Asterisk PBX

                    Max-Forwards: 70

                    X-Asterisk-HangupCause: Normal Clearing

                    X-Asterisk-HangupCauseCode: 16

                    Content-Length: 0

                    

                    

                    ---

                    

                    <--- SIP read from X.X.X.150:5060 --->

                    SIP/2.0 477 Send failed (477/TM)

                    Via: SIP/2.0/UDP
                    X.X.X.152:5060;branch=z9hG4bK59044fff;rport=5060

                    From: "911111111" <sip:[email protected]>;tag=as167eb28e

                    To: <sip:[email protected]>;tag=bcd482cd12b8a21i0

                    Call-ID: [email protected]

                    CSeq: 2874 BYE

                    Server: OpenSIPS (1.6.4-2-tls (i386/linux))

                    Content-Length: 0

                    

                    

                    <------------->

                    --- (8 headers 0 lines) ---

                    SIP Response message for INCOMING dialog BYE arrived

                        -- Incoming call: Got SIP response 477 "Send
                    failed (477/TM)" back from X.X.X.150

                    

                    

                    

                    At the end, i have restart the asterisk to solve it.
                    How can I avoid it ?

                    

                    

                    Thanks.

                    Regards.

                    

                    

                  
                  
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

                
                

                

                -- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
              
            
          
          

          

          -- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
        
      
    
    

    

    -- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com                                         
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to