From sean, 7 Years ago, written in FreeSWITCH.
  1. freeswitch@freeswitch2>
  2. recv 1277 bytes from udp/[54.172.60.0]:5060 at 23:39:06.922168:
  3.    ------------------------------------------------------------------------
  4.    INVITE sip:+12105552600@host.domain.xyz:5080 SIP/2.0
  5.    Record-Route: <sip:54.172.60.0:5060;lr;ftag=77969553_6772d868_a2d2abaa-ec5c-486d-9f51-36cca6acecc2>
  6.    From: <sip:+19185555555@xyz.pstn.twilio.com;pstn-params=808482808882;cpc=ordinary>;tag=77969553_6772d868_a2d2abaa-ec5c-486d-9f51-36cca6acecc2
  7.    To: <sip:+12105552600@host.domain.xyz:5080;user=phone>
  8.    CSeq: 24644 INVITE
  9.    Max-Forwards: 8
  10.    Diversion: <sip:+12105552600@public-vip.us1.twilio.com>;reason=unconditional
  11.    Call-ID: 1abc80bf6ecb7fd8fe56f8121c5d4fde@0.0.0.0
  12.    Via: SIP/2.0/UDP 54.172.60.0:5060;branch=z9hG4bKd173.db254ea.0
  13.    Via: SIP/2.0/UDP 172.18.17.96:5060;rport=5060;received=172.18.17.96;branch=z9hG4bKa2d2abaa-ec5c-486d-9f51-36cca6acecc2_6772d868_290-1797581531681190546
  14.    Contact: <sip:+19185555555@172.18.17.96:5060;transport=udp>
  15.    Allow: INVITE,ACK,CANCEL,BYE,OPTIONS
  16.    User-Agent: Twilio Gateway
  17.    X-Twilio-AccountSid: AC8b53e1937b9b71f1398aa93b989acc65
  18.    Content-Type: application/sdp
  19.    X-Twilio-CallSid: CA89fc4d397b25af1c13acc087fdbd4f24
  20.    Content-Length: 238
  21.  
  22.    v=0
  23.    o=root 825736281 825736281 IN IP4 34.203.251.170
  24.    s=Twilio Media Gateway
  25.    c=IN IP4 34.203.251.170
  26.    t=0 0
  27.    m=audio 14984 RTP/AVP 0 101
  28.    a=rtpmap:0 PCMU/8000
  29.    a=rtpmap:101 telephone-event/8000
  30.    a=fmtp:101 0-16
  31.    a=ptime:20
  32.    a=sendrecv
  33.    ------------------------------------------------------------------------
  34. 2017-07-20 23:39:06.910608 [NOTICE] switch_channel.c:1104 New Channel sofia/external/+19185555555@xyz.pstn.twilio.com [4b75ed5c-6ddf-11e7-a95c-9ba6c317ee11]
  35. 2017-07-20 23:39:06.910608 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_NEW (Cur 1 Tot 10)
  36. 2017-07-20 23:39:06.910608 [DEBUG] sofia.c:10067 sofia/external/+19185555555@xyz.pstn.twilio.com receiving invite from 54.172.60.0:5060 version: 1.9.0 git 13f2f2a 2017-07-14 20:15:19Z 32bit
  37. 2017-07-20 23:39:06.910608 [DEBUG] sofia.c:7283 Channel sofia/external/+19185555555@xyz.pstn.twilio.com entering state [received][100]
  38. 2017-07-20 23:39:06.910608 [DEBUG] sofia.c:7293 Remote SDP:
  39. v=0
  40. o=root 825736281 825736281 IN IP4 34.203.251.170
  41. s=Twilio Media Gateway
  42. c=IN IP4 34.203.251.170
  43. t=0 0
  44. m=audio 14984 RTP/AVP 0 101
  45. a=rtpmap:0 PCMU/8000
  46. a=rtpmap:101 telephone-event/8000
  47. a=fmtp:101 0-16
  48. a=ptime:20
  49.  
  50. 2017-07-20 23:39:06.910608 [DEBUG] sofia.c:7685 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_NEW -> CS_INIT
  51. 2017-07-20 23:39:06.910608 [DEBUG] switch_core_state_machine.c:603 (sofia/external/+19185555555@xyz.pstn.twilio.com) State NEW
  52. 2017-07-20 23:39:06.910608 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_INIT (Cur 1 Tot 10)
  53. 2017-07-20 23:39:06.910608 [DEBUG] switch_core_state_machine.c:627 (sofia/external/+19185555555@xyz.pstn.twilio.com) State INIT
  54. 2017-07-20 23:39:06.910608 [DEBUG] mod_sofia.c:93 sofia/external/+19185555555@xyz.pstn.twilio.com SOFIA INIT
  55. 2017-07-20 23:39:06.910608 [DEBUG] switch_core_state_machine.c:40 sofia/external/+19185555555@xyz.pstn.twilio.com Standard INIT
  56. 2017-07-20 23:39:06.910608 [DEBUG] switch_core_state_machine.c:48 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_INIT -> CS_ROUTING
  57. 2017-07-20 23:39:06.910608 [DEBUG] switch_core_state_machine.c:627 (sofia/external/+19185555555@xyz.pstn.twilio.com) State INIT going to sleep
  58. 2017-07-20 23:39:06.910608 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_ROUTING (Cur 1 Tot 10)
  59. 2017-07-20 23:39:06.910608 [DEBUG] switch_channel.c:2249 (sofia/external/+19185555555@xyz.pstn.twilio.com) Callstate Change DOWN -> RINGING
  60. 2017-07-20 23:39:06.910608 [DEBUG] switch_core_state_machine.c:643 (sofia/external/+19185555555@xyz.pstn.twilio.com) State ROUTING
  61. 2017-07-20 23:39:06.930644 [DEBUG] mod_sofia.c:154 sofia/external/+19185555555@xyz.pstn.twilio.com SOFIA ROUTING
  62. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:236 sofia/external/+19185555555@xyz.pstn.twilio.com Standard ROUTING
  63. 2017-07-20 23:39:06.930644 [INFO] mod_dialplan_xml.c:637 Processing +19185555555 <+19185555555>->+12105552600 in context public
  64. send 460 bytes to udp/[54.172.60.0]:5060 at 23:39:06.931040:
  65.    ------------------------------------------------------------------------
  66.    SIP/2.0 100 Trying
  67.    Via: SIP/2.0/UDP 54.172.60.0:5060;branch=z9hG4bKd173.db254ea.0
  68.    From: <sip:+19185555555@xyz.pstn.twilio.com;pstn-params=808482808882;cpc=ordinary>;tag=77969553_6772d868_a2d2abaa-ec5c-486d-9f51-36cca6acecc2
  69.    To: <sip:+12105552600@host.domain.xyz:5080;user=phone>
  70.    Call-ID: 1abc80bf6ecb7fd8fe56f8121c5d4fde@0.0.0.0
  71.    CSeq: 24644 INVITE
  72.    User-Agent: FreeSWITCH-mod_sofia/1.9.0+git~20170714T201519Z~13f2f2a056~32bit
  73.    Content-Length: 0
  74.  
  75.    ------------------------------------------------------------------------
  76. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->unloop] continue=false
  77. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-false
  78. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [unloop] ${sip_looped_call}() =~ /^true$/ break=on-false
  79. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->outside_call] continue=true
  80. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Absolute Condition [outside_call]
  81. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Action set(outside_call=true)
  82. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Action export(RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)})
  83. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->call_debug] continue=true
  84. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [call_debug] ${call_debug}(false) =~ /^true$/ break=never
  85. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_extensions] continue=false
  86. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_extensions] destination_number(+12105552600) =~ /^(10[01][0-9])$/ break=on-false
  87. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_did] continue=false
  88. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_did] destination_number(+12105552600) =~ /^15123330880$/ break=on-false
  89. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_did] continue=false
  90. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_did] destination_number(+12105552600) =~ /^17023024016$/ break=on-false
  91. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_did] continue=false
  92. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_did] destination_number(+12105552600) =~ /^883510009027723$/ break=on-false
  93. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_did] continue=false
  94. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_did] destination_number(+12105552600) =~ /^12105552600$/ break=on-false
  95. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->outbound_sip] continue=false
  96. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [outbound_sip] ${sip_to_uri}(+12105552600@host.domain.xyz:5080) =~ /^([a-z][0-9a-z-]*\@[0-9a-z.-]+)$/ break=on-false
  97. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:286 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_ROUTING -> CS_EXECUTE
  98. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:643 (sofia/external/+19185555555@xyz.pstn.twilio.com) State ROUTING going to sleep
  99. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_EXECUTE (Cur 1 Tot 10)
  100. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:650 (sofia/external/+19185555555@xyz.pstn.twilio.com) State EXECUTE
  101. 2017-07-20 23:39:06.930644 [DEBUG] mod_sofia.c:209 sofia/external/+19185555555@xyz.pstn.twilio.com SOFIA EXECUTE
  102. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:328 sofia/external/+19185555555@xyz.pstn.twilio.com Standard EXECUTE
  103. EXECUTE sofia/external/+19185555555@xyz.pstn.twilio.com set(outside_call=true)
  104. 2017-07-20 23:39:06.930644 [DEBUG] mod_dptools.c:1588 SET sofia/external/+19185555555@xyz.pstn.twilio.com [outside_call]=[true]
  105. EXECUTE sofia/external/+19185555555@xyz.pstn.twilio.com export(RFC2822_DATE=Thu, 20 Jul 2017 23:39:06 -0700)
  106. 2017-07-20 23:39:06.930644 [DEBUG] switch_channel.c:1296 EXPORT (export_vars) [RFC2822_DATE]=[Thu, 20 Jul 2017 23:39:06 -0700]
  107. 2017-07-20 23:39:06.930644 [NOTICE] switch_core_state_machine.c:385 sofia/external/+19185555555@xyz.pstn.twilio.com has executed the last dialplan instruction, hanging up.
  108. 2017-07-20 23:39:06.930644 [NOTICE] switch_core_state_machine.c:387 Hangup sofia/external/+19185555555@xyz.pstn.twilio.com [CS_EXECUTE] [NORMAL_CLEARING]
  109. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:650 (sofia/external/+19185555555@xyz.pstn.twilio.com) State EXECUTE going to sleep
  110. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_HANGUP (Cur 1 Tot 10)
  111. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:850 (sofia/external/+19185555555@xyz.pstn.twilio.com) Callstate Change RINGING -> HANGUP
  112. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:852 (sofia/external/+19185555555@xyz.pstn.twilio.com) State HANGUP
  113. 2017-07-20 23:39:06.930644 [DEBUG] mod_sofia.c:449 Channel sofia/external/+19185555555@xyz.pstn.twilio.com hanging up, cause: NORMAL_CLEARING
  114. 2017-07-20 23:39:06.930644 [DEBUG] mod_sofia.c:588 Responding to INVITE with: 480
  115. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:60 sofia/external/+19185555555@xyz.pstn.twilio.com Standard HANGUP, cause: NORMAL_CLEARING
  116. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:852 (sofia/external/+19185555555@xyz.pstn.twilio.com) State HANGUP going to sleep
  117. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:619 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_HANGUP -> CS_REPORTING
  118. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_REPORTING (Cur 1 Tot 10)
  119. send 1013 bytes to udp/[54.172.60.0]:5060 at 23:39:06.941589:
  120.    ------------------------------------------------------------------------
  121.    SIP/2.0 480 Temporarily Unavailable
  122.    Via: SIP/2.0/UDP 54.172.60.0:5060;branch=z9hG4bKd173.db254ea.0
  123.    Via: SIP/2.0/UDP 172.18.17.96:5060;rport=5060;received=172.18.17.96;branch=z9hG4bKa2d2abaa-ec5c-486d-9f51-36cca6acecc2_6772d868_290-1797581531681190546
  124. 2017-07-20 23:39:06.930644 [DEBUG] switch_core_state_machine.c:938 (sofia/external/+19185555555@xyz.pstn.twilio.com) State REPORTING
  125.    Max-Forwards: 8
  126.    From: <sip:+19185555555@xyz.pstn.twilio.com;pstn-params=808482808882;cpc=ordinary>;tag=77969553_6772d868_a2d2abaa-ec5c-486d-9f51-36cca6acecc2
  127.    To: <sip:+12105552600@host.domain.xyz:5080;user=phone>;tag=cDHpDD7r1gUZg
  128.    Call-ID: 1abc80bf6ecb7fd8fe56f8121c5d4fde@0.0.0.0
  129.    CSeq: 24644 INVITE
  130.    User-Agent: FreeSWITCH-mod_sofia/1.9.0+git~20170714T201519Z~13f2f2a056~32bit
  131.    Accept: application/sdp
  132.   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
  133.    Supported: timer, path, replaces
  134.    Allow-Events: talk, hold, conference, refer
  135.    Reason: Q.850;cause=16;text="NORMAL_CLEARING"
  136.    Content-Length: 0
  137.    Remote-Party-ID: "+12105552600" <sip:+12105552600@host.domain.xyz>;party=calling;privacy=off;screen=no
  138.  
  139.    ------------------------------------------------------------------------
  140. 2017-07-20 23:39:06.950648 [DEBUG] mod_cdr_sqlite.c:102 Writing SQL to DB: INSERT INTO cdr VALUES ("+19185555555","+19185555555","+12105552600","public","2017-07-20 23:39:06","",
  141. "2017-07-20 23:39:06",0, 0, 0,"NORMAL_CLEARING","4b75ed5c-6ddf-11e7-a95c-9ba6c317ee11","","","","",
  142. "send_refuse","+19185555555","","DELAYED NEGOTIATION")
  143. 2017-07-20 23:39:06.950648 [DEBUG] switch_core_state_machine.c:174 sofia/external/+19185555555@xyz.pstn.twilio.com Standard REPORTING, cause: NORMAL_CLEARING
  144. 2017-07-20 23:39:06.950648 [DEBUG] switch_core_state_machine.c:938 (sofia/external/+19185555555@xyz.pstn.twilio.com) State REPORTING going to sleep
  145. 2017-07-20 23:39:06.950648 [DEBUG] switch_core_state_machine.c:610 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_REPORTING -> CS_DESTROY
  146. 2017-07-20 23:39:06.950648 [DEBUG] switch_core_session.c:1713 Session 10 (sofia/external/+19185555555@xyz.pstn.twilio.com) Locked, Waiting on external entities
  147. 2017-07-20 23:39:06.950648 [NOTICE] switch_core_session.c:1731 Session 10 (sofia/external/+19185555555@xyz.pstn.twilio.com) Ended
  148. 2017-07-20 23:39:06.950648 [NOTICE] switch_core_session.c:1735 Close Channel sofia/external/+19185555555@xyz.pstn.twilio.com [CS_DESTROY]
  149. 2017-07-20 23:39:06.970637 [DEBUG] switch_core_state_machine.c:741 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_DESTROY (Cur 0 Tot 10)
  150. 2017-07-20 23:39:06.970637 [DEBUG] switch_core_state_machine.c:751 (sofia/external/+19185555555@xyz.pstn.twilio.com) State DESTROY
  151. 2017-07-20 23:39:06.970637 [DEBUG] mod_sofia.c:354 sofia/external/+19185555555@xyz.pstn.twilio.com SOFIA DESTROY
  152. 2017-07-20 23:39:06.970637 [DEBUG] switch_core_state_machine.c:181 sofia/external/+19185555555@xyz.pstn.twilio.com Standard DESTROY
  153. 2017-07-20 23:39:06.970637 [DEBUG] switch_core_state_machine.c:751 (sofia/external/+19185555555@xyz.pstn.twilio.com) State DESTROY going to sleep
  154. recv 477 bytes from udp/[54.172.60.0]:5060 at 23:39:07.020009:
  155.    ------------------------------------------------------------------------
  156.    ACK sip:+12105552600@host.domain.xyz:5080 SIP/2.0
  157.    Via: SIP/2.0/UDP 54.172.60.0:5060;branch=z9hG4bKd173.db254ea.0
  158.    From: <sip:+19185555555@xyz.pstn.twilio.com;pstn-params=808482808882;cpc=ordinary>;tag=77969553_6772d868_a2d2abaa-ec5c-486d-9f51-36cca6acecc2
  159.    Call-ID: 1abc80bf6ecb7fd8fe56f8121c5d4fde@0.0.0.0
  160.    To: <sip:+12105552600@host.domain.xyz:5080;user=phone>;tag=cDHpDD7r1gUZg
  161.    CSeq: 24644 ACK
  162.    Max-Forwards: 70
  163.    User-Agent: Twilio Gateway
  164.    Content-Length: 0
  165.  
  166.    ------------------------------------------------------------------------
  167. recv 1283 bytes from udp/[54.172.60.0]:5060 at 23:39:07.035432:
  168.    ------------------------------------------------------------------------
  169.    INVITE sip:+12105552600@host.domain.xyz:5080 SIP/2.0
  170.    Record-Route: <sip:54.172.60.0:5060;lr;ftag=77188176_6772d868_4a885fd6-1513-4d88-8a23-05da680426b5>
  171.    From: <sip:+19185555555@xyz.pstn.twilio.com;pstn-params=808482808882;cpc=ordinary>;tag=77188176_6772d868_4a885fd6-1513-4d88-8a23-05da680426b5
  172.    To: <sip:+12105552600@host.domain.xyz:5080;user=phone>
  173.    CSeq: 24644 INVITE
  174.    Max-Forwards: 8
  175.    Diversion: <sip:+12105552600@public-vip.us1.twilio.com>;reason=unconditional
  176.    Call-ID: 43f08cd2aee9448fd1ddda464824a4f7@0.0.0.0
  177.    Via: SIP/2.0/UDP 54.172.60.0:5060;branch=z9hG4bKa89.728c7cf5.0
  178.    Via: SIP/2.0/UDP 172.18.12.229:5060;rport=5060;received=172.18.12.229;branch=z9hG4bK4a885fd6-1513-4d88-8a23-05da680426b5_6772d868_258-10557194566233067374
  179.    Contact: <sip:+19185555555@172.18.12.229:5060;transport=udp>
  180.    Allow: INVITE,ACK,CANCEL,BYE,OPTIONS
  181.    User-Agent: Twilio Gateway
  182.    X-Twilio-AccountSid: AC8b53e1937b9b71f1398aa93b989acc65
  183.    Content-Type: application/sdp
  184.    X-Twilio-CallSid: CA89fc4d397b25af1c13acc087fdbd4f24
  185.    Content-Length: 240
  186.  
  187.    v=0
  188.    o=root 1209756446 1209756446 IN IP4 34.203.251.183
  189.    s=Twilio Media Gateway
  190.    c=IN IP4 34.203.251.183
  191.    t=0 0
  192.    m=audio 19538 RTP/AVP 0 101
  193.    a=rtpmap:0 PCMU/8000
  194.    a=rtpmap:101 telephone-event/8000
  195.    a=fmtp:101 0-16
  196.    a=ptime:20
  197.    a=sendrecv
  198.    ------------------------------------------------------------------------
  199. 2017-07-20 23:39:07.030619 [NOTICE] switch_channel.c:1104 New Channel sofia/external/+19185555555@xyz.pstn.twilio.com [4b8736ac-6ddf-11e7-a960-9ba6c317ee11]
  200. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_NEW (Cur 1 Tot 11)
  201. 2017-07-20 23:39:07.030619 [DEBUG] sofia.c:10067 sofia/external/+19185555555@xyz.pstn.twilio.com receiving invite from 54.172.60.0:5060 version: 1.9.0 git 13f2f2a 2017-07-14 20:15:19Z 32bit
  202. 2017-07-20 23:39:07.030619 [DEBUG] sofia.c:7283 Channel sofia/external/+19185555555@xyz.pstn.twilio.com entering state [received][100]
  203. 2017-07-20 23:39:07.030619 [DEBUG] sofia.c:7293 Remote SDP:
  204. v=0
  205. o=root 1209756446 1209756446 IN IP4 34.203.251.183
  206. s=Twilio Media Gateway
  207. c=IN IP4 34.203.251.183
  208. t=0 0
  209. m=audio 19538 RTP/AVP 0 101
  210. a=rtpmap:0 PCMU/8000
  211. a=rtpmap:101 telephone-event/8000
  212. a=fmtp:101 0-16
  213. a=ptime:20
  214.  
  215. 2017-07-20 23:39:07.030619 [DEBUG] sofia.c:7685 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_NEW -> CS_INIT
  216. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:603 (sofia/external/+19185555555@xyz.pstn.twilio.com) State NEW
  217. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_INIT (Cur 1 Tot 11)
  218. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:627 (sofia/external/+19185555555@xyz.pstn.twilio.com) State INIT
  219. 2017-07-20 23:39:07.030619 [DEBUG] mod_sofia.c:93 sofia/external/+19185555555@xyz.pstn.twilio.com SOFIA INIT
  220. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:40 sofia/external/+19185555555@xyz.pstn.twilio.com Standard INIT
  221. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:48 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_INIT -> CS_ROUTING
  222. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:627 (sofia/external/+19185555555@xyz.pstn.twilio.com) State INIT going to sleep
  223. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_ROUTING (Cur 1 Tot 11)
  224. 2017-07-20 23:39:07.030619 [DEBUG] switch_channel.c:2249 (sofia/external/+19185555555@xyz.pstn.twilio.com) Callstate Change DOWN -> RINGING
  225. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:643 (sofia/external/+19185555555@xyz.pstn.twilio.com) State ROUTING
  226. 2017-07-20 23:39:07.030619 [DEBUG] mod_sofia.c:154 sofia/external/+19185555555@xyz.pstn.twilio.com SOFIA ROUTING
  227. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:236 sofia/external/+19185555555@xyz.pstn.twilio.com Standard ROUTING
  228. 2017-07-20 23:39:07.030619 [INFO] mod_dialplan_xml.c:637 Processing +19185555555 <+19185555555>->+12105552600 in context public
  229. send 460 bytes to udp/[54.172.60.0]:5060 at 23:39:07.044121:
  230.    ------------------------------------------------------------------------
  231.    SIP/2.0 100 Trying
  232.    Via: SIP/2.0/UDP 54.172.60.0:5060;branch=z9hG4bKa89.728c7cf5.0
  233.    From: <sip:+19185555555@xyz.pstn.twilio.com;pstn-params=808482808882;cpc=ordinary>;tag=77188176_6772d868_4a885fd6-1513-4d88-8a23-05da680426b5
  234.    To: <sip:+12105552600@host.domain.xyz:5080;user=phone>
  235.    Call-ID: 43f08cd2aee9448fd1ddda464824a4f7@0.0.0.0
  236.    CSeq: 24644 INVITE
  237.    User-Agent: FreeSWITCH-mod_sofia/1.9.0+git~20170714T201519Z~13f2f2a056~32bit
  238.    Content-Length: 0
  239.  
  240.    ------------------------------------------------------------------------
  241. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->unloop] continue=false
  242. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-false
  243. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [unloop] ${sip_looped_call}() =~ /^true$/ break=on-false
  244. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->outside_call] continue=true
  245. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Absolute Condition [outside_call]
  246. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Action set(outside_call=true)
  247. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Action export(RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)})
  248. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->call_debug] continue=true
  249. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [call_debug] ${call_debug}(false) =~ /^true$/ break=never
  250. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_extensions] continue=false
  251. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_extensions] destination_number(+12105552600) =~ /^(10[01][0-9])$/ break=on-false
  252. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_did] continue=false
  253. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_did] destination_number(+12105552600) =~ /^15123330880$/ break=on-false
  254. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_did] continue=false
  255. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_did] destination_number(+12105552600) =~ /^17023024016$/ break=on-false
  256. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_did] continue=false
  257. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_did] destination_number(+12105552600) =~ /^883510009027723$/ break=on-false
  258. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->public_did] continue=false
  259. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [public_did] destination_number(+12105552600) =~ /^12105552600$/ break=on-false
  260. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com parsing [public->outbound_sip] continue=false
  261. Dialplan: sofia/external/+19185555555@xyz.pstn.twilio.com Regex (FAIL) [outbound_sip] ${sip_to_uri}(+12105552600@host.domain.xyz:5080) =~ /^([a-z][0-9a-z-]*\@[0-9a-z.-]+)$/ break=on-false
  262. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:286 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_ROUTING -> CS_EXECUTE
  263. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:643 (sofia/external/+19185555555@xyz.pstn.twilio.com) State ROUTING going to sleep
  264. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_EXECUTE (Cur 1 Tot 11)
  265. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:650 (sofia/external/+19185555555@xyz.pstn.twilio.com) State EXECUTE
  266. 2017-07-20 23:39:07.030619 [DEBUG] mod_sofia.c:209 sofia/external/+19185555555@xyz.pstn.twilio.com SOFIA EXECUTE
  267. 2017-07-20 23:39:07.030619 [DEBUG] switch_core_state_machine.c:328 sofia/external/+19185555555@xyz.pstn.twilio.com Standard EXECUTE
  268. EXECUTE sofia/external/+19185555555@xyz.pstn.twilio.com set(outside_call=true)
  269. 2017-07-20 23:39:07.030619 [DEBUG] mod_dptools.c:1588 SET sofia/external/+19185555555@xyz.pstn.twilio.com [outside_call]=[true]
  270. EXECUTE sofia/external/+19185555555@xyz.pstn.twilio.com export(RFC2822_DATE=Thu, 20 Jul 2017 23:39:07 -0700)
  271. 2017-07-20 23:39:07.050651 [DEBUG] switch_channel.c:1296 EXPORT (export_vars) [RFC2822_DATE]=[Thu, 20 Jul 2017 23:39:07 -0700]
  272. 2017-07-20 23:39:07.050651 [NOTICE] switch_core_state_machine.c:385 sofia/external/+19185555555@xyz.pstn.twilio.com has executed the last dialplan instruction, hanging up.
  273. 2017-07-20 23:39:07.050651 [NOTICE] switch_core_state_machine.c:387 Hangup sofia/external/+19185555555@xyz.pstn.twilio.com [CS_EXECUTE] [NORMAL_CLEARING]
  274. 2017-07-20 23:39:07.050651 [DEBUG] switch_core_state_machine.c:650 (sofia/external/+19185555555@xyz.pstn.twilio.com) State EXECUTE going to sleep
  275. 2017-07-20 23:39:07.050651 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_HANGUP (Cur 1 Tot 11)
  276. 2017-07-20 23:39:07.050651 [DEBUG] switch_core_state_machine.c:850 (sofia/external/+19185555555@xyz.pstn.twilio.com) Callstate Change RINGING -> HANGUP
  277. 2017-07-20 23:39:07.050651 [DEBUG] switch_core_state_machine.c:852 (sofia/external/+19185555555@xyz.pstn.twilio.com) State HANGUP
  278. 2017-07-20 23:39:07.050651 [DEBUG] mod_sofia.c:449 Channel sofia/external/+19185555555@xyz.pstn.twilio.com hanging up, cause: NORMAL_CLEARING
  279. 2017-07-20 23:39:07.050651 [DEBUG] mod_sofia.c:588 Responding to INVITE with: 480
  280. 2017-07-20 23:39:07.050651 [DEBUG] switch_core_state_machine.c:60 sofia/external/+19185555555@xyz.pstn.twilio.com Standard HANGUP, cause: NORMAL_CLEARING
  281. 2017-07-20 23:39:07.050651 [DEBUG] switch_core_state_machine.c:852 (sofia/external/+19185555555@xyz.pstn.twilio.com) State HANGUP going to sleep
  282. 2017-07-20 23:39:07.050651 [DEBUG] switch_core_state_machine.c:619 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_HANGUP -> CS_REPORTING
  283. 2017-07-20 23:39:07.050651 [DEBUG] switch_core_state_machine.c:584 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_REPORTING (Cur 1 Tot 11)
  284. send 1016 bytes to udp/[54.172.60.0]:5060 at 23:39:07.056140:
  285.    ------------------------------------------------------------------------
  286.    SIP/2.0 480 Temporarily Unavailable
  287.    Via: SIP/2.0/UDP 54.172.60.0:5060;branch=z9hG4bKa89.728c7cf5.0
  288.    Via: SIP/2.0/UDP 172.18.12.229:5060;rport=5060;received=172.18.12.229;branch=z9hG4bK4a885fd6-1513-4d88-8a23-05da680426b5_6772d868_258-10557194566233067374
  289.    Max-Forwards: 8
  290.    From: <sip:+19185555555@xyz.pstn.twilio.com;pstn-params=808482808882;cpc=ordinary>;tag=77188176_6772d868_4a885fd6-1513-4d88-8a23-05da680426b5
  291. 2017-07-20 23:39:07.050651 [DEBUG] switch_core_state_machine.c:938 (sofia/external/+19185555555@xyz.pstn.twilio.com) State REPORTING
  292.    To: <sip:+12105552600@host.domain.xyz:5080;user=phone>;tag=DpaFF8QvySHjc
  293.    Call-ID: 43f08cd2aee9448fd1ddda464824a4f7@0.0.0.0
  294.    CSeq: 24644 INVITE
  295.    User-Agent: FreeSWITCH-mod_sofia/1.9.0+git~20170714T201519Z~13f2f2a056~32bit
  296.    Accept: application/sdp
  297.   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
  298.    Supported: timer, path, replaces
  299.    Allow-Events: talk, hold, conference, refer
  300.    Reason: Q.850;cause=16;text="NORMAL_CLEARING"
  301.    Content-Length: 0
  302.    Remote-Party-ID: "+12105552600" <sip:+12105552600@host.domain.xyz>;party=calling;privacy=off;screen=no
  303.  
  304.    ------------------------------------------------------------------------
  305. 2017-07-20 23:39:07.070649 [DEBUG] mod_cdr_sqlite.c:102 Writing SQL to DB: INSERT INTO cdr VALUES ("+19185555555","+19185555555","+12105552600","public","2017-07-20 23:39:07","",
  306. "2017-07-20 23:39:07",0, 0, 0,"NORMAL_CLEARING","4b8736ac-6ddf-11e7-a960-9ba6c317ee11","","","","",
  307. "send_refuse","+19185555555","","DELAYED NEGOTIATION")
  308. 2017-07-20 23:39:07.070649 [DEBUG] switch_core_state_machine.c:174 sofia/external/+19185555555@xyz.pstn.twilio.com Standard REPORTING, cause: NORMAL_CLEARING
  309. 2017-07-20 23:39:07.070649 [DEBUG] switch_core_state_machine.c:938 (sofia/external/+19185555555@xyz.pstn.twilio.com) State REPORTING going to sleep
  310. 2017-07-20 23:39:07.070649 [DEBUG] switch_core_state_machine.c:610 (sofia/external/+19185555555@xyz.pstn.twilio.com) State Change CS_REPORTING -> CS_DESTROY
  311. 2017-07-20 23:39:07.070649 [DEBUG] switch_core_session.c:1713 Session 11 (sofia/external/+19185555555@xyz.pstn.twilio.com) Locked, Waiting on external entities
  312. 2017-07-20 23:39:07.070649 [NOTICE] switch_core_session.c:1731 Session 11 (sofia/external/+19185555555@xyz.pstn.twilio.com) Ended
  313. 2017-07-20 23:39:07.070649 [NOTICE] switch_core_session.c:1735 Close Channel sofia/external/+19185555555@xyz.pstn.twilio.com [CS_DESTROY]
  314. 2017-07-20 23:39:07.070649 [DEBUG] switch_core_state_machine.c:741 (sofia/external/+19185555555@xyz.pstn.twilio.com) Running State Change CS_DESTROY (Cur 0 Tot 11)
  315. 2017-07-20 23:39:07.070649 [DEBUG] switch_core_state_machine.c:751 (sofia/external/+19185555555@xyz.pstn.twilio.com) State DESTROY
  316. 2017-07-20 23:39:07.070649 [DEBUG] mod_sofia.c:354 sofia/external/+19185555555@xyz.pstn.twilio.com SOFIA DESTROY
  317. 2017-07-20 23:39:07.070649 [DEBUG] switch_core_state_machine.c:181 sofia/external/+19185555555@xyz.pstn.twilio.com Standard DESTROY
  318. 2017-07-20 23:39:07.070649 [DEBUG] switch_core_state_machine.c:751 (sofia/external/+19185555555@xyz.pstn.twilio.com) State DESTROY going to sleep
  319. recv 477 bytes from udp/[54.172.60.0]:5060 at 23:39:07.134629:
  320.    ------------------------------------------------------------------------
  321.    ACK sip:+12105552600@host.domain.xyz:5080 SIP/2.0
  322.    Via: SIP/2.0/UDP 54.172.60.0:5060;branch=z9hG4bKa89.728c7cf5.0
  323.    From: <sip:+19185555555@xyz.pstn.twilio.com;pstn-params=808482808882;cpc=ordinary>;tag=77188176_6772d868_4a885fd6-1513-4d88-8a23-05da680426b5
  324.    Call-ID: 43f08cd2aee9448fd1ddda464824a4f7@0.0.0.0
  325.    To: <sip:+12105552600@host.domain.xyz:5080;user=phone>;tag=DpaFF8QvySHjc
  326.    CSeq: 24644 ACK
  327.    Max-Forwards: 70
  328.    User-Agent: Twilio Gateway
  329.    Content-Length: 0
  330.  
  331.    ------------------------------------------------------------------------
  332. recv 561 bytes from tcp/[216.115.69.144]:5060 at 23:39:08.190560:
  333.    ------------------------------------------------------------------------
  334.    OPTIONS sip:70.170.169.54:52255;transport=tcp SIP/2.0
  335.    Max-Forwards: 10
  336.    Record-Route: <sip:216.115.69.144;transport=tcp;r2=on;lr>
  337.    Record-Route: <sip:216.115.69.144;r2=on;lr>
  338.    Via: SIP/2.0/TCP 216.115.69.144;branch=z9hG4bK9bce.6a02dcb223963f2ad9d9a7df269e5104.0
  339.    Via: SIP/2.0/UDP 70.167.153.136:5060;branch=0
  340.    Route: <sip:216.115.69.144;lr;received='sip:70.170.169.54:52255;transport=tcp'>
  341.    From: sip:ping@invalid;tag=4d0b04d5
  342.    To: sip:70.170.169.54:52255;transport=tcp
  343.    Call-ID: 85612d53-24090897-158b232@70.167.153.136
  344.    CSeq: 1 OPTIONS
  345.    Content-Length: 0
  346.  
  347.    ------------------------------------------------------------------------
  348. send 801 bytes to tcp/[216.115.69.144]:5060 at 23:39:08.192162:
  349.    ------------------------------------------------------------------------
  350.    SIP/2.0 200 OK
  351.    Via: SIP/2.0/TCP 216.115.69.144;branch=z9hG4bK9bce.6a02dcb223963f2ad9d9a7df269e5104.0;rport=5060
  352.    Via: SIP/2.0/UDP 70.167.153.136:5060;branch=0
  353.    Record-Route: <sip:216.115.69.144;transport=tcp;r2=on;lr>
  354.    Record-Route: <sip:216.115.69.144;r2=on;lr>
  355.    From: sip:ping@invalid;tag=4d0b04d5
  356.    To: <sip:70.170.169.54:52255>;transport=tcp;tag=eZ37g38ZU274Q
  357.    Call-ID: 85612d53-24090897-158b232@70.167.153.136
  358.    CSeq: 1 OPTIONS
  359.    Contact: <sip:gw+flowroute@70.170.169.54:5080;transport=tcp;gw=flowroute>
  360.    User-Agent: FreeSWITCH-mod_sofia/1.9.0+git~20170714T201519Z~13f2f2a056~32bit
  361.    Accept: application/sdp
  362.   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
  363.    Supported: timer, path, replaces
  364.    Allow-Events: talk, hold, conference, refer
  365.    Content-Length: 0
  366.  
  367.    ------------------------------------------------------------------------
  368.