[asterisk-bugs] [JIRA] (ASTERISK-27727) Asterisk not sending BYE packet to correct socket
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Mon Mar 26 12:00:40 CDT 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-27727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=242816#comment-242816 ]
Asterisk Team commented on ASTERISK-27727:
------------------------------------------
Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines
> Asterisk not sending BYE packet to correct socket
> -------------------------------------------------
>
> Key: ASTERISK-27727
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27727
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_sip/General
> Affects Versions: 14.6.0
> Environment: Ubuntu 14.04.5 LTS
> Reporter: Milan Stanojevic
> Assignee: Milan Stanojevic
>
> Hello,
> I'm running into next issue:
> I have SIP clients registered to OpenSIPS server which forwards calls to Asterisk instance and Asterisk will route call either to external PSTN trunk or it will route back to OpenSIPS instance for internal calls (so for internal calls flow would be client A ---> Opensips --> Asterisk --> Opensips --> Client B ).
> Asterisk will communicate with OpenSIPS over one socket in the beginning but after two minutes OpenSIPS closes initial socket and sends packets over another socket (this is default behavior of OpenSIPS - to close TCP socket after 120 seconds) . So when BYE comes to Asterisk after few minutes it is not able to return it back over new socket, rather it tries to send it back via old socket which is closed and sending of that BYE packet fails.
> 1. Here is beginning of INVITE packet coming to Asterisk (asterisk gets this iINVITE from OpenSIPS port 46911):
> <--- SIP read from TCP:$<OpenSIPS_IP>:46911 --->
> INVITE sip:...
> .....
> 2. 100 Trying is returned to that same socket which is fine:
> <--- Transmitting (NAT) to $<OpenSIPS_IP>:46911 --->
> SIP/2.0 100 Trying
> ....
> 3. 180 Ringing also sent to same socket which is fine:
> <--- Transmitting (NAT) to $<OpenSIPS_IP>:46911 --->
> SIP/2.0 180 Ringing
> 4. 200OK also sent to same socket which is fine:
> <--- Reliably Transmitting (NAT) to $<OpenSIPS_IP>:46911 --->
> SIP/2.0 200 OK
> 5. Now call lasts for few minutes (more than 120 seconds after which openSIPS closed initial socket/connection over port 46911) and client B wants to Hangup call : Asterisk receives this BYE packet from new socket:
> <--- SIP read from TCP:$<OpenSIPS_IP>:33586 --->
> BYE ....
> And I see this line on Asterisk CLI :
> Sending to $<OpenSIPS_IP>:33586 (NAT)
> But after that it does not actually send it to new socket (port 33586), rather it tries to send it to old/non-existing socket:
> Reliably Transmitting (NAT) to $<OpenSIPS_IP>:46911:
> BYE ...
> And Asterisk console throws this warning and error (which is obvious since socket with port 46911 does not exist anymore):
> [2018-03-01 20:57:20.731] WARNING[359][C-00000284]: chan_sip.c:3790 __sip_xmit: sip_xmit of 0x7f7ce0032950 (len 562) to $<OpenSIPS_IP>:46911 returned -2: Broken pipe
> [2018-03-01 20:57:20.731] ERROR[359][C-00000284]: chan_sip.c:4279 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
> My sip.conf settings related to OpenSIPS peer:
> [$<name>]
> type=friend
> insecure=port,invite
> host=<$DNS_of_OpenSIPS>
> port=<$port>
> context=<$context_name>
> disallow=all
> allow=alaw
> qualify=yes
> canreinvite=no
> nat=force_rport,comedia
> transport=tcp
> Can someone please advice how I can solve this issue (so that Asterisk route BYE message to new socket instead to try using old/closed one) ?
> Thanks,
> Milan
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list