Can't get freeswitch to send BYE packet on hangup
Dear All, Loving freeswitch so far. There's one thing I need help with though. I can't seem to get freeswitch to send BYE packets to my originating call when the hangup happens. At first I tried this in Lua, but the symptoms are still the same with a barebone dialplan: <extension name="bridge_call_test"> <condition field="destination_number" expression="^103"> <action application="answer"/> <action application="sleep" data="5000"/> <action application="hangup"/> </condition> </extension> I also turned siptrace on with the commands: sofia profile internal siptrace on sofia profile external siptrace on All I can get though is a SIP/2.0 200 OK at the beginning of the call, but no BYE at the end: Does anyone have an idea as to what I am missing? 2010-06-21 13:10:20.600232 [INFO] switch_cpp.cpp:1142 username: XXXX, password: XXXXXXXX 2010-06-21 13:10:20.603790 [NOTICE] switch_channel.c:669 New Channel sofia/internal/XXXX@aaaaa [6a2c61cc-4f44-4a33-b6fc- af9728c2f1d2] 2010-06-21 13:10:20.607511 [INFO] mod_dialplan_xml.c:418 Processing XXXX->103 in context default 2010-06-21 13:10:20.618949 [NOTICE] mod_dptools.c:719 Channel [sofia/internal/XXXX@aaaaa] has been answered send 1228 bytes to udp/[192.168.202.67]:5060 at 17:10:20.619691: ------------------------------------------------------------------------ SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.202.67:5060 ;rport=5060;branch=z9hG4bKPjf2d4bf79-38fb-45fe-82bf-13b070750f90 From: sip:XXXX@aaaaa;tag=64797d89-3747-4240-abe0-28cd75241aff To: <sip:103@aaaaa>;tag=8rcH55QDQpmDD Call-ID: 14b9b208-6690-495e-a403-ae7da6ddd07a CSeq: 24285 INVITE Contact: <sip:103@192.168.202.31:5060;transport=udp> User-Agent: FreeSWITCH-mod_sofia/1.0.6-svn-exported Accept: application/sdp Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE Require: timer Supported: timer, precondition, path, replaces Allow-Events: talk, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer Session-Expires: 1800;refresher=uac Min-SE: 120 Content-Type: application/sdp Content-Disposition: session Content-Length: 251 Remote-Party-ID: "103" <sip:103@192.168.202.31 <sip%3A103@192.168.202.31>
;party=calling;privacy=off;screen=no
v=0 o=FreeSWITCH 1277110358 1277110359 IN IP4 192.168.202.31 s=FreeSWITCH c=IN IP4 192.168.202.31 t=0 0 m=audio 29862 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 ------------------------------------------------------------------------ recv 386 bytes from udp/[192.168.202.67]:5060 at 17:10:20.628813: ------------------------------------------------------------------------ ACK sip:103@192.168.202.31:5060;transport=udp SIP/2.0 Via: SIP/2.0/UDP 192.168.202.67:5060 ;rport;branch=z9hG4bKPj65f1608c-62e2-4ca8-973b-8d8daf8a9a6b Max-Forwards: 70 From: sip:XXXX@aaaaa;tag=64797d89-3747-4240-abe0-28cd75241aff To: sip:103@aaaaa;tag=8rcH55QDQpmDD Call-ID: 14b9b208-6690-495e-a403-ae7da6ddd07a CSeq: 24285 ACK Content-Length: 0 ------------------------------------------------------------------------ 2010-06-21 13:10:25.618976 [NOTICE] mod_dptools.c:705 Hangup sofia/internal/XXXX@aaaaa [CS_EXECUTE] [NORMAL_CLEARING] 2010-06-21 13:10:25.629655 [NOTICE] switch_core_session.c:1182 Session 2 (sofia/internal/XXXX@aaaaa) Ended 2010-06-21 13:10:25.629655 [NOTICE] switch_core_session.c:1184 Close Channel sofia/internal/XXXX@aaaaa [CS_DESTROY]
type "sofia loglevel all 9" Then try again I suspect its sending it but getting an error. /b On Jun 21, 2010, at 12:45 PM, Philipp Schrader wrote:
Dear All,
Loving freeswitch so far. There's one thing I need help with though.
Hi Brian, Thanks for your reply, looks like I do get an error. I'm reading it as some DNS issue, but I don't know why it's trying to reach a "_sip._udp." subdomain. Note: 192.168.202.94 is my local dns server incoming_reclaim_all((nil), (nil), 0x4023ee40) nta_incoming_timer: 0/0 resent, 0/0 tout, 1/2 term, 1/2 free nta: timer set next to 55 ms 2010-06-21 15:44:32.489712 [NOTICE] mod_dptools.c:705 Hangup sofia/internal/XXXX@aaaaa.AAAAA [CS_EXECUTE] [NORMAL_CLEARING] nua: nua_bye: entering nua(0x8ae9c0): sent signal r_bye 2010-06-21 15:44:32.504861 [NOTICE] switch_core_session.c:1182 Session 1 (sofia/internal/XXXX@aaaaa.AAAAA) Ended 2010-06-21 15:44:32.504861 [NOTICE] switch_core_session.c:1184 Close Channel sofia/internal/XXXX@aaaaa.AAAAA [CS_DESTROY] nua(0x8ae9c0): recv signal r_bye nua: nua_stack_set_params: entering soa_set_params(static::0x8ab4f0, ...) called soa_terminate(static::0x8ab4f0) called soa_init_offer_answer(static::0x8ab4f0) called nta: selecting scheme sip sres_cache_get(0x701180, NAPTR, "aaaaa.AAAAA.") called nta: for "aaaaa.AAAAA" query "aaaaa.AAAAA" NAPTR sres_query(0x6f32d0, 0x7f25980050d0, NAPTR, "aaaaa.AAAAA") called sres_send_dns_query(0x6f32d0, 0x7f25980057b0) called sres_sofia_update(0x71ecd0, 50, -1) sres_send_dns_query(0x6f32d0, 0x7f25980057b0) id=17457 NAPTR aaaaa.AAAAA (to [192.168.202.94]:53) sres_resolver_receive(0x6f32d0, 50) called AUTHORITY RR received AAAAA. SOA IN 7247 rdlen=48 sres_resolver_receive(0x6f32d0, 0x7f25980057b0) id=17457 (from [192.168.202.94]:53) sres(q=0x7f25980057b0): reporting error NAME_ERR for NAPTR aaaaa.AAAAA sres_cache_get(0x701180, SRV, "_sip._udp.aaaaa.AAAAA.") called nta: for "aaaaa.AAAAA" query "_sip._udp.aaaaa.AAAAA" SRV sres_query(0x6f32d0, 0x7f25980050d0, SRV, "_sip._udp.aaaaa.AAAAA") called sres_send_dns_query(0x6f32d0, 0x7f2598005960) called sres_send_dns_query(0x6f32d0, 0x7f2598005960) id=17458 SRV _sip._udp.aaaaa.AAAAA (to [192.168.202.94]:53) sres_resolver_receive(0x6f32d0, 50) called AUTHORITY RR received AAAAA. SOA IN 7247 rdlen=48 sres_resolver_receive(0x6f32d0, 0x7f2598005960) id=17458 (from [192.168.202.94]:53) sres(q=0x7f2598005960): reporting error NAME_ERR for SRV _sip._udp.aaaaa.AAAAA sres_cache_get(0x701180, A, "aaaaa.AAAAA.") called nta: for "aaaaa.AAAAA" query "aaaaa.AAAAA" A sres_query(0x6f32d0, 0x7f25980050d0, A, "aaaaa.AAAAA") called sres_send_dns_query(0x6f32d0, 0x7f2598005b20) called sres_send_dns_query(0x6f32d0, 0x7f2598005b20) id=17459 A aaaaa.AAAAA (to [192.168.202.94]:53) sres_resolver_receive(0x6f32d0, 50) called AUTHORITY RR received AAAAA. SOA IN 7247 rdlen=48 sres_resolver_receive(0x6f32d0, 0x7f2598005b20) id=17459 (from [192.168.202.94]:53) sres(q=0x7f2598005b20): reporting error NAME_ERR for A aaaaa.AAAAA nua(0x8ae9c0): event r_bye 503 DNS Error nua(0x8ae9c0): call state changed: terminating -> terminated nua(0x8ae9c0): event i_state 503 to BYE nua(0x8ae9c0): event i_terminated 503 to BYE nua(0x8ae9c0): removing session usage soa_destroy(static::0x8ab4f0) called nta_leg_destroy(0x7c2850) nua: terminated session 0x8ae9c0 nua: nua_application_event: entering nua: nua_handle_magic: entering nua: nua_application_event: entering nua: nua_handle_magic: entering nua: nua_handle_bind: entering nua: nua_application_event: entering nua: nua_handle_magic: entering nua: nua_handle_destroy: entering nua(0x8ae9c0): sent signal r_destroy nua(0x8ae9c0): recv signal r_destroy nta_leg_destroy((nil)) nta: timer I fired, terminate 200 response incoming_reclaim_all((nil), (nil), 0x4023ee40) nta_incoming_timer: 0/0 resent, 0/0 tout, 1/1 term, 1/1 free nta: timer set next to 4989 ms nta: timer K fired, terminate BYE (132456400) outgoing_reclaim_all((nil), (nil), 0x4023ee30) nta_outgoing_timer: 0/0 resent, 0/0 tout, 1/1 term, 1/1 free nta: timer not set On Mon, Jun 21, 2010 at 15:25, Brian West <brian@freeswitch.org> wrote:
type "sofia loglevel all 9"
Then try again I suspect its sending it but getting an error.
/b
On Jun 21, 2010, at 12:45 PM, Philipp Schrader wrote:
Dear All,
Loving freeswitch so far. There's one thing I need help with though.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Because its trying to resolve the SRV record for the packet to send the bye and its failing. So the SRV fails as does the A record so the DNS failure results in the bye not being sent. /b On Jun 21, 2010, at 2:54 PM, Philipp Schrader wrote:
Hi Brian,
Thanks for your reply, looks like I do get an error. I'm reading it as some DNS issue, but I don't know why it's trying to reach a "_sip._udp." subdomain. Note: 192.168.202.94 is my local dns server
The question is not related to FS. Learn about DNS SRV records, "_sip._udp." is not a subdomain, it's a SRV record. On Monday 21 June 2010, Philipp Schrader wrote:
Hi Brian,
Thanks for your reply, looks like I do get an error. I'm reading it as some DNS issue, but I don't know why it's trying to reach a "_sip._udp." subdomain. Note: 192.168.202.94 is my local dns server
incoming_reclaim_all((nil), (nil), 0x4023ee40) nta_incoming_timer: 0/0 resent, 0/0 tout, 1/2 term, 1/2 free nta: timer set next to 55 ms 2010-06-21 15:44:32.489712 [NOTICE] mod_dptools.c:705 Hangup sofia/internal/XXXX@aaaaa.AAAAA [CS_EXECUTE] [NORMAL_CLEARING] nua: nua_bye: entering nua(0x8ae9c0): sent signal r_bye 2010-06-21 15:44:32.504861 [NOTICE] switch_core_session.c:1182 Session 1 (sofia/internal/XXXX@aaaaa.AAAAA) Ended 2010-06-21 15:44:32.504861 [NOTICE] switch_core_session.c:1184 Close Channel sofia/internal/XXXX@aaaaa.AAAAA [CS_DESTROY] nua(0x8ae9c0): recv signal r_bye nua: nua_stack_set_params: entering soa_set_params(static::0x8ab4f0, ...) called soa_terminate(static::0x8ab4f0) called soa_init_offer_answer(static::0x8ab4f0) called nta: selecting scheme sip sres_cache_get(0x701180, NAPTR, "aaaaa.AAAAA.") called nta: for "aaaaa.AAAAA" query "aaaaa.AAAAA" NAPTR sres_query(0x6f32d0, 0x7f25980050d0, NAPTR, "aaaaa.AAAAA") called sres_send_dns_query(0x6f32d0, 0x7f25980057b0) called sres_sofia_update(0x71ecd0, 50, -1) sres_send_dns_query(0x6f32d0, 0x7f25980057b0) id=17457 NAPTR aaaaa.AAAAA (to [192.168.202.94]:53) sres_resolver_receive(0x6f32d0, 50) called AUTHORITY RR received AAAAA. SOA IN 7247 rdlen=48 sres_resolver_receive(0x6f32d0, 0x7f25980057b0) id=17457 (from [192.168.202.94]:53) sres(q=0x7f25980057b0): reporting error NAME_ERR for NAPTR aaaaa.AAAAA sres_cache_get(0x701180, SRV, "_sip._udp.aaaaa.AAAAA.") called nta: for "aaaaa.AAAAA" query "_sip._udp.aaaaa.AAAAA" SRV sres_query(0x6f32d0, 0x7f25980050d0, SRV, "_sip._udp.aaaaa.AAAAA") called sres_send_dns_query(0x6f32d0, 0x7f2598005960) called sres_send_dns_query(0x6f32d0, 0x7f2598005960) id=17458 SRV _sip._udp.aaaaa.AAAAA (to [192.168.202.94]:53) sres_resolver_receive(0x6f32d0, 50) called AUTHORITY RR received AAAAA. SOA IN 7247 rdlen=48 sres_resolver_receive(0x6f32d0, 0x7f2598005960) id=17458 (from [192.168.202.94]:53) sres(q=0x7f2598005960): reporting error NAME_ERR for SRV _sip._udp.aaaaa.AAAAA sres_cache_get(0x701180, A, "aaaaa.AAAAA.") called nta: for "aaaaa.AAAAA" query "aaaaa.AAAAA" A sres_query(0x6f32d0, 0x7f25980050d0, A, "aaaaa.AAAAA") called sres_send_dns_query(0x6f32d0, 0x7f2598005b20) called sres_send_dns_query(0x6f32d0, 0x7f2598005b20) id=17459 A aaaaa.AAAAA (to [192.168.202.94]:53) sres_resolver_receive(0x6f32d0, 50) called AUTHORITY RR received AAAAA. SOA IN 7247 rdlen=48 sres_resolver_receive(0x6f32d0, 0x7f2598005b20) id=17459 (from [192.168.202.94]:53) sres(q=0x7f2598005b20): reporting error NAME_ERR for A aaaaa.AAAAA nua(0x8ae9c0): event r_bye 503 DNS Error nua(0x8ae9c0): call state changed: terminating -> terminated nua(0x8ae9c0): event i_state 503 to BYE nua(0x8ae9c0): event i_terminated 503 to BYE nua(0x8ae9c0): removing session usage soa_destroy(static::0x8ab4f0) called nta_leg_destroy(0x7c2850) nua: terminated session 0x8ae9c0 nua: nua_application_event: entering nua: nua_handle_magic: entering nua: nua_application_event: entering nua: nua_handle_magic: entering nua: nua_handle_bind: entering nua: nua_application_event: entering nua: nua_handle_magic: entering nua: nua_handle_destroy: entering nua(0x8ae9c0): sent signal r_destroy nua(0x8ae9c0): recv signal r_destroy nta_leg_destroy((nil)) nta: timer I fired, terminate 200 response incoming_reclaim_all((nil), (nil), 0x4023ee40) nta_incoming_timer: 0/0 resent, 0/0 tout, 1/1 term, 1/1 free nta: timer set next to 4989 ms nta: timer K fired, terminate BYE (132456400) outgoing_reclaim_all((nil), (nil), 0x4023ee30) nta_outgoing_timer: 0/0 resent, 0/0 tout, 1/1 term, 1/1 free nta: timer not set
On Mon, Jun 21, 2010 at 15:25, Brian West <brian@freeswitch.org> wrote:
type "sofia loglevel all 9"
Then try again I suspect its sending it but getting an error.
/b
On Jun 21, 2010, at 12:45 PM, Philipp Schrader wrote:
Dear All,
Loving freeswitch so far. There's one thing I need help with though.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
My apologies; you are correct. I was getting this issue in a virtual machine. On the live server the problem went away; the DNS server was able to properly resolve the record for freeswitch. Thank you very much for your help! On Mon, Jun 21, 2010 at 16:05, Sergey Okhapkin <sos@sokhapkin.dyndns.org>wrote:
The question is not related to FS. Learn about DNS SRV records, "_sip._udp." is not a subdomain, it's a SRV record.
On Monday 21 June 2010, Philipp Schrader wrote:
Hi Brian,
Thanks for your reply, looks like I do get an error. I'm reading it as some DNS issue, but I don't know why it's trying to reach a "_sip._udp." subdomain. Note: 192.168.202.94 is my local dns server
incoming_reclaim_all((nil), (nil), 0x4023ee40) nta_incoming_timer: 0/0 resent, 0/0 tout, 1/2 term, 1/2 free nta: timer set next to 55 ms 2010-06-21 15:44:32.489712 [NOTICE] mod_dptools.c:705 Hangup sofia/internal/XXXX@aaaaa.AAAAA [CS_EXECUTE] [NORMAL_CLEARING] nua: nua_bye: entering nua(0x8ae9c0): sent signal r_bye 2010-06-21 15:44:32.504861 [NOTICE] switch_core_session.c:1182 Session 1 (sofia/internal/XXXX@aaaaa.AAAAA) Ended 2010-06-21 15:44:32.504861 [NOTICE] switch_core_session.c:1184 Close Channel sofia/internal/XXXX@aaaaa.AAAAA [CS_DESTROY] nua(0x8ae9c0): recv signal r_bye nua: nua_stack_set_params: entering soa_set_params(static::0x8ab4f0, ...) called soa_terminate(static::0x8ab4f0) called soa_init_offer_answer(static::0x8ab4f0) called nta: selecting scheme sip sres_cache_get(0x701180, NAPTR, "aaaaa.AAAAA.") called nta: for "aaaaa.AAAAA" query "aaaaa.AAAAA" NAPTR sres_query(0x6f32d0, 0x7f25980050d0, NAPTR, "aaaaa.AAAAA") called sres_send_dns_query(0x6f32d0, 0x7f25980057b0) called sres_sofia_update(0x71ecd0, 50, -1) sres_send_dns_query(0x6f32d0, 0x7f25980057b0) id=17457 NAPTR aaaaa.AAAAA (to [192.168.202.94]:53) sres_resolver_receive(0x6f32d0, 50) called AUTHORITY RR received AAAAA. SOA IN 7247 rdlen=48 sres_resolver_receive(0x6f32d0, 0x7f25980057b0) id=17457 (from [192.168.202.94]:53) sres(q=0x7f25980057b0): reporting error NAME_ERR for NAPTR aaaaa.AAAAA sres_cache_get(0x701180, SRV, "_sip._udp.aaaaa.AAAAA.") called nta: for "aaaaa.AAAAA" query "_sip._udp.aaaaa.AAAAA" SRV sres_query(0x6f32d0, 0x7f25980050d0, SRV, "_sip._udp.aaaaa.AAAAA") called sres_send_dns_query(0x6f32d0, 0x7f2598005960) called sres_send_dns_query(0x6f32d0, 0x7f2598005960) id=17458 SRV _sip._udp.aaaaa.AAAAA (to [192.168.202.94]:53) sres_resolver_receive(0x6f32d0, 50) called AUTHORITY RR received AAAAA. SOA IN 7247 rdlen=48 sres_resolver_receive(0x6f32d0, 0x7f2598005960) id=17458 (from [192.168.202.94]:53) sres(q=0x7f2598005960): reporting error NAME_ERR for SRV _sip._udp.aaaaa.AAAAA sres_cache_get(0x701180, A, "aaaaa.AAAAA.") called nta: for "aaaaa.AAAAA" query "aaaaa.AAAAA" A sres_query(0x6f32d0, 0x7f25980050d0, A, "aaaaa.AAAAA") called sres_send_dns_query(0x6f32d0, 0x7f2598005b20) called sres_send_dns_query(0x6f32d0, 0x7f2598005b20) id=17459 A aaaaa.AAAAA (to [192.168.202.94]:53) sres_resolver_receive(0x6f32d0, 50) called AUTHORITY RR received AAAAA. SOA IN 7247 rdlen=48 sres_resolver_receive(0x6f32d0, 0x7f2598005b20) id=17459 (from [192.168.202.94]:53) sres(q=0x7f2598005b20): reporting error NAME_ERR for A aaaaa.AAAAA nua(0x8ae9c0): event r_bye 503 DNS Error nua(0x8ae9c0): call state changed: terminating -> terminated nua(0x8ae9c0): event i_state 503 to BYE nua(0x8ae9c0): event i_terminated 503 to BYE nua(0x8ae9c0): removing session usage soa_destroy(static::0x8ab4f0) called nta_leg_destroy(0x7c2850) nua: terminated session 0x8ae9c0 nua: nua_application_event: entering nua: nua_handle_magic: entering nua: nua_application_event: entering nua: nua_handle_magic: entering nua: nua_handle_bind: entering nua: nua_application_event: entering nua: nua_handle_magic: entering nua: nua_handle_destroy: entering nua(0x8ae9c0): sent signal r_destroy nua(0x8ae9c0): recv signal r_destroy nta_leg_destroy((nil)) nta: timer I fired, terminate 200 response incoming_reclaim_all((nil), (nil), 0x4023ee40) nta_incoming_timer: 0/0 resent, 0/0 tout, 1/1 term, 1/1 free nta: timer set next to 4989 ms nta: timer K fired, terminate BYE (132456400) outgoing_reclaim_all((nil), (nil), 0x4023ee30) nta_outgoing_timer: 0/0 resent, 0/0 tout, 1/1 term, 1/1 free nta: timer not set
On Mon, Jun 21, 2010 at 15:25, Brian West <brian@freeswitch.org> wrote:
type "sofia loglevel all 9"
Then try again I suspect its sending it but getting an error.
/b
On Jun 21, 2010, at 12:45 PM, Philipp Schrader wrote:
Dear All,
Loving freeswitch so far. There's one thing I need help with though.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Brian West
-
Philipp Schrader
-
Sergey Okhapkin