[OpenSIPS-Users] sip message enters on bucle

Jorge Ortea darham at hotmail.com
Wed Apr 4 17:06:17 CEST 2012



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: bogdan at opensips.org
To: darham at hotmail.com
CC: users at lists.opensips.org
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: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152
        - Source: X.X.X.152

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

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

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

        Apr  4 10:14:25 alpha02 /usr/local/sbin/opensips[29511]: ::::::
        BYE - from 911111111 to O2105 - Callid: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152
        - 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: bogdan at opensips.org

          To: users at lists.opensips.org

          CC: darham at hotmail.com

          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: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152
              - Source: X.X.X.152

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

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

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

              Apr  4 10:14:25 alpha02 /usr/local/sbin/opensips[29511]:
              :::::: BYE - from 911111111 to O2105 - Callid: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152
              - 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:2105 at Z.Z.Z.Z: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:911111111 at X.X.X.152>;tag=as167eb28e

              To: <sip:O2105 at X.X.X.150>;tag=bcd482cd12b8a21i0

              Call-ID: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152

              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 '5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152'
              in 32000 ms (Method: REFER)

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

              BYE sip:2105 at Z.Z.Z.Z: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:911111111 at X.X.X.152>;tag=as167eb28e

              To: <sip:O2105 at X.X.X.150>;tag=bcd482cd12b8a21i0

              Call-ID: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152

              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:2105 at Z.Z.Z.Z: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:911111111 at X.X.X.152>;tag=as167eb28e

              To: <sip:O2105 at X.X.X.150>;tag=bcd482cd12b8a21i0

              Call-ID: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152

              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:2105 at Z.Z.Z.Z: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:911111111 at X.X.X.152>;tag=as167eb28e

              To: <sip:O2105 at X.X.X.150>;tag=bcd482cd12b8a21i0

              Call-ID: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152

              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:2105 at Z.Z.Z.Z: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:911111111 at X.X.X.152>;tag=as167eb28e

              To: <sip:O2105 at X.X.X.150>;tag=bcd482cd12b8a21i0

              Call-ID: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152

              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:911111111 at X.X.X.152>;tag=as167eb28e

              To: <sip:O2105 at X.X.X.150>;tag=bcd482cd12b8a21i0

              Call-ID: 5b62cc795e6be4ea3fa9a26e543e3622 at X.X.X.152

              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
Users at lists.opensips.org
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 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120404/d689c65f/attachment-0001.htm>


More information about the Users mailing list