<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Seems it’s really strange issue.
<div><br /></div>
<div>Call was made with api_on_answer variable and in this api lua script was called.</div>
<div>lua script just make curl request with session:execute(«curl», «https://xxxx»)</div>
<div>Only in this case FS not has a problem with accepting BYE.</div>
<div><br /></div>
<div>When I redo curl request with bgapi - all act as designed.</div>
</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
Regards, Igor</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
On Dec 13, 2017, 3:48 PM +0200, Igor Olhovskiy <igorolhovskiy@gmail.com>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Hi all!
<div><br /></div>
<div><br /></div>
<div>Got into issue with one of providers, and can’t get some things...</div>
<div>For what reason FS is not reacting to BYE on external profile?</div>
<div><br /></div>
<div>FS -> Prov<br /></div>
<div>
<div>INVITE sip:3809XXXXXXXX@sip.telecomax.net SIP/2.0</div>
<div>Via: SIP/2.0/UDP 138.68.65.164:5080;rport;branch=z9hG4bKt7cUUFUKyea3r</div>
<div>Max-Forwards: 69</div>
<div>From: "456XXXXXXX" <sip:456XXXXXXX@sip.telecomax.net>;tag=gFjZSmajjg36F</div>
<div>To: <sip:3809XXXXXXXX@sip.telecomax.net></div>
<div>Call-ID: 7825a584-5aab-1236-22a3-525feb2d3359</div>
<div>CSeq: 116249601 INVITE</div>
<div>Contact: <sip:gw+3b179ac8-000f-453a-8059-7922501ae04c@138.68.65.164:5080;transport=udp;gw=3b179ac8-000f-453a-8059-7922501ae04c></div>
<div>User-Agent: FreeSWITCH</div>
<div>Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY</div>
<div>Supported: timer, path, replaces</div>
<div>Allow-Events: talk, hold, conference, refer</div>
<div>Content-Type: application/sdp</div>
<div>Content-Disposition: session</div>
<div>Content-Length: 270</div>
<div>X-Serialnumber: 000413719560</div>
<div>P-Key-Flags: resolution="31x13", keys="4"</div>
<div>X-accountcode: fusion.contactise.com</div>
<div>X-FS-Support: update_display,send_info</div>
<div>Remote-Party-ID: "456XXXXXXX" <sip:456XXXXXXX@sip.telecomax.net>;party=calling;screen=yes;privacy=off</div>
<div><br /></div>
<div>v=0</div>
<div>o=FreeSWITCH 1513140493 1513140494 IN IP4 138.68.65.164</div>
<div>s=FreeSWITCH</div>
<div>c=IN IP4 138.68.65.164</div>
<div>t=0 0</div>
<div>m=audio 30838 RTP/AVP 0 8 101 13</div>
<div>a=rtpmap:0 PCMU/8000</div>
<div>a=rtpmap:8 PCMA/8000</div>
<div>a=rtpmap:101 telephone-event/8000</div>
<div>a=fmtp:101 0-16</div>
<div>a=rtpmap:13 CN/8000</div>
<div>a=ptime:20</div>
<div><br /></div>
<div>FS <- Prov<br /></div>
<div>SIP/2.0 183 Session Progress</div>
<div>Via: SIP/2.0/UDP 138.68.65.164:5080;branch=z9hG4bKUg6KXacQUQ0Nm;received=138.68.65.164;rport=5080</div>
<div>From: "456XXXXXXX" <sip:456XXXXXXX@sip.telecomax.net>;tag=gFjZSmajjg36F</div>
<div>To: <sip:3809XXXXXXXX@sip.telecomax.net>;tag=as5cec60a1</div>
<div>Call-ID: 7825a584-5aab-1236-22a3-525feb2d3359</div>
<div>CSeq: 116249602 INVITE</div>
<div>User-Agent: Free World Web Client</div>
<div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO</div>
<div>Supported: replaces</div>
<div>Contact: <sip:3809XXXXXXXX@80.242.134.195></div>
<div>Content-Type: application/sdp</div>
<div>Content-Length: 268</div>
<div><br /></div>
<div>v=0</div>
<div>o=root 21659 21659 IN IP4 80.242.134.195</div>
<div>s=session</div>
<div>c=IN IP4 80.242.134.195</div>
<div>t=0 0</div>
<div>m=audio 13494 RTP/AVP 0 8 101</div>
<div>a=rtpmap:0 PCMU/8000</div>
<div>a=rtpmap:8 PCMA/8000</div>
<div>a=rtpmap:101 telephone-event/8000</div>
<div>a=fmtp:101 0-16</div>
<div>a=silenceSupp:off - - - -</div>
<div>a=ptime:20</div>
<div>a=sendrecv</div>
<div><br /></div>
<div>FS <- Prov<br /></div>
<div>SIP/2.0 200 OK</div>
<div>Via: SIP/2.0/UDP 138.68.65.164:5080;branch=z9hG4bKUg6KXacQUQ0Nm;received=138.68.65.164;rport=5080</div>
<div>From: "456XXXXXXX" <sip:456XXXXXXX@sip.telecomax.net>;tag=gFjZSmajjg36F</div>
<div>To: <sip:3809XXXXXXXX@sip.telecomax.net>;tag=as5cec60a1</div>
<div>Call-ID: 7825a584-5aab-1236-22a3-525feb2d3359</div>
<div>CSeq: 116249602 INVITE</div>
<div>User-Agent: Free World Web Client</div>
<div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO</div>
<div>Supported: replaces</div>
<div>Contact: <sip:3809XXXXXXXX@80.242.134.195></div>
<div>Content-Type: application/sdp</div>
<div>Content-Length: 268</div>
<div><br /></div>
<div>v=0</div>
<div>o=root 21659 21660 IN IP4 80.242.134.195</div>
<div>s=session</div>
<div>c=IN IP4 80.242.134.195</div>
<div>t=0 0</div>
<div>m=audio 13494 RTP/AVP 0 8 101</div>
<div>a=rtpmap:0 PCMU/8000</div>
<div>a=rtpmap:8 PCMA/8000</div>
<div>a=rtpmap:101 telephone-event/8000</div>
<div>a=fmtp:101 0-16</div>
<div>a=silenceSupp:off - - - -</div>
<div>a=ptime:20</div>
<div>a=sendrecv</div>
<div><br /></div>
<div>FS -> Prov<br /></div>
<div>ACK sip:3809XXXXXXXX@80.242.134.195 SIP/2.0</div>
<div>Via: SIP/2.0/UDP 138.68.65.164:5080;rport;branch=z9hG4bKvSZcZ5vtr0p8F</div>
<div>Max-Forwards: 70</div>
<div>From: "456XXXXXXX" <sip:456XXXXXXX@sip.telecomax.net>;tag=gFjZSmajjg36F</div>
<div>To: <sip:3809XXXXXXXX@sip.telecomax.net>;tag=as5cec60a1</div>
<div>Call-ID: 7825a584-5aab-1236-22a3-525feb2d3359</div>
<div>CSeq: 116249602 ACK</div>
<div>Contact: <sip:gw+3b179ac8-000f-453a-8059-7922501ae04c@138.68.65.164:5080;transport=udp;gw=3b179ac8-000f-453a-8059-7922501ae04c></div>
<div>Proxy-Authorization: Digest username="456XXXXXXX", realm="Free World Web Client", nonce="6d32caff", algorithm=MD5, uri="sip:3809XXXXXXXX@sip.telecomax.net", response="c0aa24f024fc447594290b580bcedbfa"</div>
<div>Content-Length: 0</div>
<div><br /></div>
<div><- This BYE is received, but no react to it in CLI at all.</div>
<div><br /></div>
<div>FS <- Prov<br /></div>
<div>BYE sip:gw+3b179ac8-000f-453a-8059-7922501ae04c@138.68.65.164:5080;transport=udp;gw=3b179ac8-000f-453a-8059-7922501ae04c SIP/2.0</div>
<div>Via: SIP/2.0/UDP 80.242.134.195:5060;branch=z9hG4bK06dce488;rport</div>
<div>From: <sip:3809XXXXXXXX@sip.telecomax.net>;tag=as5cec60a1</div>
<div>To: "456XXXXXXX" <sip:456XXXXXXX@sip.telecomax.net>;tag=gFjZSmajjg36F</div>
<div>Call-ID: 7825a584-5aab-1236-22a3-525feb2d3359</div>
<div>CSeq: 102 BYE</div>
<div>User-Agent: Free World Web Client</div>
<div>Max-Forwards: 70</div>
<div>X-Asterisk-HangupCause: Normal Clearing</div>
<div>X-Asterisk-HangupCauseCode: 16</div>
<div>Content-Length: 0</div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div>I've set up sofia debug all 9 and received this</div>
<div> ------------------------------------------------------------------------</div>
<div>BYE sip:gw+3b179ac8-000f-453a-8059-7922501ae04c@138.68.65.164:5080;transport=udp;gw=3b179ac8-000f-453a-8059-7922501ae04c SIP/2.0</div>
<div> Via: SIP/2.0/UDP 80.242.134.195:5060;branch=z9hG4bK06dce488;rport</div>
<div> From: <sip:3809XXXXXXXX@sip.telecomax.net>;tag=as77b4319c</div>
<div> To: "456XXXXXXX" <sip:456XXXXXXX@sip.telecomax.net>;tag=gFjZSmajjg36F</div>
<div> Call-ID: 7825a584-5aab-1236-22a3-525feb2d3359</div>
<div> CSeq: 102 BYE</div>
<div> User-Agent: Free World Web Client</div>
<div> Max-Forwards: 70</div>
<div> X-Asterisk-HangupCause: Normal Clearing</div>
<div> X-Asterisk-HangupCauseCode: 16</div>
<div> Content-Length: 0</div>
<div><br /></div>
<div> ------------------------------------------------------------------------</div>
<div>tport.c:3023 tport_deliver() tport_deliver(0x7ff1e0004650): msg 0x7ff1e0025700 (536 bytes) from udp/80.242.134.195:5080/sip next=(nil)</div>
<div>nta.c:2880 agent_recv_request() nta: received BYE sip:gw+3b179ac8-000f-453a-8059-7922501ae04c@138.68.65.164:5080;transport=udp;gw=3b179ac8-000f-453a-8059-7922501ae04c SIP/2.0 (CSeq 102)</div>
<div>nta.c:3248 agent_aliases() nta: canonizing sip:gw+3b179ac8-000f-453a-8059-7922501ae04c@138.68.65.164:5080 with contact</div>
<div>nta.c:3060 agent_recv_request() nta: BYE (102) going to existing leg</div>
<div>nua_server.c:102 nua_stack_process_request() nua: nua_stack_process_request: entering</div>
<div>nua_stack.c:271 nua_stack_event() nua(0x7ff204000b60): event i_bye 100 Trying</div>
<div>nua_stack.c:359 nua_application_event() nua: nua_application_event: entering</div>
<div>nta.c:7134 _nta_incoming_timer() nta: timer I fired, terminate 200 response</div>
<div>nta.c:5825 incoming_reclaim_queued() incoming_reclaim_all((nil), (nil), 0x7ff20dc4ac60)</div>
<div>nta.c:7188 _nta_incoming_timer() nta_incoming_timer: 0/0 resent, 0/0 tout, 1/1 term, 1/1 free</div>
<div>nta.c:1289 agent_timer() nta: timer not set</div>
<div>tport.c:2749 tport_wakeup_pri() tport_wakeup_pri(0x7ff1e8004410): events IN</div>
<div>tport.c:2864 tport_recv_event() tport_recv_event(0x7ff1e8004410)</div>
<div>tport.c:3205 tport_recv_iovec() tport_recv_iovec(0x7ff1e8004410) msg 0x7ff1e80c90c0 from (udp/138.68.65.164:5060) has 4 bytes, veclen = 1</div>
<div>tport.c:3023 tport_deliver() tport_deliver(0x7ff1e8004410): bad msg 0x7ff1e80c90c0 (4 bytes) from udp/176.104.56.91:5060/sip next=(nil)</div>
<div>tport.c:2749 tport_wakeup_pri() tport_wakeup_pri(0x7ff1e0004650): events IN</div>
<div>tport.c:2864 tport_recv_event() tport_recv_event(0x7ff1e0004650)</div>
<div>tport.c:3205 tport_recv_iovec() tport_recv_iovec(0x7ff1e0004650) msg 0x7ff1e00582d0 from (udp/138.68.65.164:5080) has 536 bytes, veclen = 1</div>
<div><br /></div>
<div><br /></div>
<div><br /></div>
<div>And this is it….</div>
</div>
<div>Also there is one-way sound, but I think it’s somehow related to this.</div>
<div><br /></div>
<div>FS 1.6.19 (FusionPBX)</div>
</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
Regards, Igor</div>
</blockquote>
</div>
</body>
</html>