然后整个拨号计划都包含此扩展名:
<context name="default">
<extension name="SignalWire CONNECTORS incoming call">
<!-- the number you assigned in your dashboard -->
<condition field="destination_number" expression="^(\+19162510217)$">
</condition>
</extension>
</context>
在fs_cli
上确认:
freeswitch@tr2> xml_locate dialplan
<section name="dialplan" description="Regex/XML Dialplan">
<context name="default">
<extension name="SignalWire CONNECTORS incoming call">
<condition field="destination_number" expression="^(\+19162510217)$">
</condition>
</extension>
</context>
</section>
但是在检查传入事件时,有一个CHANNEL_EXECUTE
事件(和一个匹配的CHANNEL_EXECUTE_COMPLETE
事件)表明transfer
应用程序已执行。这是一个差异(点击“运行代码段”以查看它):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>diff</title>
<meta name="Generator" content="Vim/8.1">
<meta name="plugin-version" content="vim8.1_v1">
<meta name="settings" content="number_lines,whole_filler,use_css,no_foldcolumn,expand_tabs,line_ids,prevent_copy=">
<meta name="colorscheme" content="seoul256">
<style type="text/css">
<!--
pre { font-family: monospace; color: #d0d0d0; background-color: #121212; }
body { font-family: monospace; color: #d0d0d0; background-color: #121212; }
* { font-size: 1em; }
.LineNr { color: #87875f; background-color: #1c1c1c; padding-bottom: 1px; }
.DiffText { background-color: #5f0000; padding-bottom: 1px; font-weight: bold; }
.DiffAdd { background-color: #005f00; padding-bottom: 1px; }
.DiffChange { background-color: #303030; padding-bottom: 1px; }
.DiffDelete { background-color: #875f5f; padding-bottom: 1px; }
-->
<!--
table { table-layout: fixed; }
html, body, table, tbody { width: 100%; margin: 0; padding: 0; }
th, td { width: 50.0%; }
td div { overflow: auto; }
-->
</style>
<script type='text/javascript'>
<!--
/* function to open any folds containing a jumped-to line before jumping to it */
function JumpToLine()
{
var lineNum;
lineNum = window.location.hash;
lineNum = lineNum.substr(1); /* strip off '#' */
if (lineNum.indexOf('L') == -1) {
lineNum = 'L'+lineNum;
}
if (lineNum.indexOf('W') == -1) {
lineNum = 'W1'+lineNum;
}
var lineElem = document.getElementById(lineNum);
/* Always jump to new location even if the line was hidden inside a fold, or
* we corrected the raw number to a line ID.
*/
if (lineElem) {
lineElem.scrollIntoView(true);
}
return true;
}
if ('onhashchange' in window) {
window.onhashchange = JumpToLine;
}
-->
</script>
</head>
<body onload='JumpToLine();'>
<table border='1' width='100%' id='vimCodeElement'>
<tr>
<th></th>
<th></th>
</tr><tr>
<td valign="top"><div>
<pre>
<span id="W1L1" class="LineNr"> 1 </span><span class="DiffChange">event-</span><span class="DiffText">7</span><span class="DiffChange"> </span>
<span id="W1L2" class="LineNr"> 2 </span>Shell got {event,["26c739fc-8d49-43ee-9c9e-129e81236cd2",
<span id="W1L3" class="LineNr"> 3 </span> {"Answer-State","ringing"},
<span id="W1L4" class="LineNr"> 4 </span> {"Application","transfer"},
<span id="W1L5" class="LineNr"> 5 </span> {"Application-Data","+15552510217 XML default"},
<span class="LineNr"> </span><span class="DiffDelete">---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="W1L6" class="LineNr"> 6 </span> {"Application-UUID", "040626b0-7a18-417a-89f0-68db068d0ac2"}]}
<span id="W1L7" class="LineNr"> 7 </span> {"Call-Direction","inbound"},
<span id="W1L8" class="LineNr"> 8 </span> {"Caller-ANI","+15551234567"},
<span id="W1L9" class="LineNr"> 9 </span> {"Caller-Context","default"},
<span id="W1L10" class="LineNr">10 </span> {"Caller-Destination-Number","+15552510217"},
<span id="W1L11" class="LineNr">11 </span><span class="DiffChange"> {"Caller-Dialplan","</span><span class="DiffText">signalwire</span><span class="DiffChange">"}, </span>
<span id="W1L12" class="LineNr">12 </span> {"Caller-Direction","inbound"},
<span id="W1L13" class="LineNr">13 </span> {"Caller-Logical-Direction","inbound"},
<span id="W1L14" class="LineNr">14 </span> {"Caller-Network-Addr","104.248.176.184"},
<span id="W1L15" class="LineNr">15 </span><span class="DiffChange"> {"Caller-</span><span class="DiffText">Orig-Caller-ID-Name","+15551234567</span><span class="DiffChange">"}, </span>
<span id="W1L16" class="LineNr">16 </span><span class="DiffChange"> {"Caller-</span><span class="DiffText">Orig-Caller-ID-Number","+1555123456</span><span class="DiffChange">7"}, </span>
<span id="W1L17" class="LineNr">17 </span> {"Caller-Screen-Bit","true"},
<span id="W1L18" class="LineNr">18 </span> {"Caller-Source","mod_sofia"},
<span id="W1L19" class="LineNr">19 </span> {"Caller-Unique-ID","26c739fc-8d49-43ee-9c9e-129e81236cd2"},
<span id="W1L20" class="LineNr">20 </span> {"Caller-Username","+15551234567"},
<span id="W1L21" class="LineNr">21 </span> {"Channel-Call-State","RINGING"},
<span id="W1L22" class="LineNr">22 </span> {"Channel-Call-UUID","26c739fc-8d49-43ee-9c9e-129e81236cd2"},
<span id="W1L23" class="LineNr">23 </span> {"Channel-HIT-Dialplan","true"},
<span id="W1L24" class="LineNr">24 </span> {"Channel-Name", "sofia/signalwire/+15551234567@sip.signalwire.com"},
<span id="W1L25" class="LineNr">25 </span> {"Channel-State","CS_EXECUTE"},
<span id="W1L26" class="LineNr">26 </span><span class="DiffChange"> {"Channel-State-Number","</span><span class="DiffText">4</span><span class="DiffChange">"}, </span>
<span id="W1L27" class="LineNr">27 </span> {"Core-UUID","ecd4d804-eb44-45eb-8efe-74205ab97d25"},
<span id="W1L28" class="LineNr">28 </span> {"Event-Calling-File","switch_core_session.c"},
<span id="W1L29" class="LineNr">29 </span> {"Event-Calling-Function","switch_core_session_exec"},
<span id="W1L30" class="LineNr">30 </span><span class="DiffChange"> {"Event-Calling-Line-Number","28</span><span class="DiffText">70</span><span class="DiffChange">"}, </span>
<span id="W1L31" class="LineNr">31 </span> {"Event-Date-GMT","Tue, 03 Dec 2019 16:48:50 GMT"},
<span id="W1L32" class="LineNr">32 </span> {"Event-Date-Local","2019-12-03 16:48:50"},
<span id="W1L33" class="LineNr">33 </span> {"Event-Date-Timestamp","1575391730378323"},
<span id="W1L34" class="LineNr">34 </span><span class="DiffChange"> {"Event-Name","CHANNEL_EXECUTE"},</span><span class="DiffChange"> </span>
<span id="W1L35" class="LineNr">35 </span><span class="DiffChange"> {"Event-Sequence","61</span><span class="DiffText">5</span><span class="DiffChange">"}, </span>
<span id="W1L36" class="LineNr">36 </span> {"FreeSWITCH-Hostname","fs"},
<span id="W1L37" class="LineNr">37 </span> {"FreeSWITCH-IPv4","10.0.0.5"},
<span id="W1L38" class="LineNr">38 </span> {"FreeSWITCH-IPv6","::1"},
<span id="W1L39" class="LineNr">39 </span> {"FreeSWITCH-Switchname","fs"},
<span id="W1L40" class="LineNr">40 </span> {"Presence-Call-Direction","inbound"},
<span id="W1L41" class="LineNr">41 </span> {"Unique-ID","26c739fc-8d49-43ee-9c9e-129e81236cd2"},
<span id="W1L42" class="LineNr">42 </span> ... variables ...
<span id="W1L43" class="LineNr">43 </span><span class="DiffChange"> </span><span class="DiffChange"> </span>
<span id="W1L44" class="LineNr">44 </span><span class="DiffChange"> </span><span class="DiffChange"> </span>
<span id="W1L45" class="LineNr">45 </span><span class="DiffChange"> {"variable_max_forwards","6</span><span class="DiffText">3</span><span class="DiffChange">"}, </span>
<span id="W1L46" class="LineNr">46 </span> ... variables ...
<span id="W1L47" class="LineNr">47 </span><span class="DiffChange"> {"variable_switch_r_sdp", "v=0\r\no=SignalWire-STACK 1575372444 1575372445 IN IP4 159.65.253.227\r\ns=SignalWire-STACK\r\nc=IN IP4 159.65.253.227\r\nt=0 0\r\nm=audio 19286 RTP/SAVP 0 18 102 9 8 101 13 103 104\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:18 G729/8000\r\na=fmtp:18 annexb=no\r\na=rtpmap:102 opus/48000/2\r\na=fmtp:102 useinbandfec=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40\r\na=rtpmap:9 G722/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=rtpmap:13 CN/8000\r\na=rtpmap:103 telephone-event/48000\r\na=fmtp:103 0-16\r\na=rtpmap:104 CN/48000\r\na=crypto:1 AEAD_AES_256_GCM_8 inline:5IbCXiK37EXXPsf4a7mCdyuWWyiIYhU4/azzKtY8lwGq0uWXAvCZBjfVPxA=\r\na=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:BFUQfHCY8rgwoQrRG0ljaQZ5xSQLAL0WM/t0vrbvIkrZECuzHl9SWcFd1ISSKA==\r\na=crypto:5 AES_CM_128_HMAC_SHA1_80 inline:6a4cFCTNyoMoqSo557U67ZehZAvhtL0e7+8Iw1Bc\r\na=crypto:6 AES_256_CM_HMAC_SHA1_32 inline:BETh7THI1mZLwEWFdqXKNSjYXOZQpkVizXYkdA1niVGBD1WdwRliqIYAalABfQ==\r\na=crypto:8 AES_CM_128_HMAC_SHA1_32 inline:k/tnVI7h5bh0fmxd+HmE2HyoCccNbyqgr+y6AtM3\r\na=ptime:20\r\n"},</span><span class="DiffText"> {"variable_ep_codec_string", "CORE_PCM_MODULE.PCMU@8000h@20i@64000b,mod_g729.G729@8000h@20i@8000b,mod_opus.opus@48000h@20i@2c,mod_spandsp.G722@8000h@20i@64000b,CORE_PCM_MODULE.PCMA@8000h@20i@64000b"}, {"variable_endpoint_disposition","DELAYED NEGOTIATION"},</span>
<span id="W1L48" class="LineNr">48 </span> {"variable_text_media_flow","disabled"},
<span class="LineNr"> </span><span class="DiffDelete">---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span class="LineNr"> </span><span class="DiffDelete">---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
<span id="W1L49" class="LineNr">49 </span> {"variable_uuid","26c739fc-8d49-43ee-9c9e-129e81236cd2"},
<span id="W1L50" class="LineNr">50 </span> {"variable_video_media_flow","disabled"},
<span id="W1L51" class="LineNr">51 </span>
</pre>
</div></td>
<td valign="top"><div>
<pre>
<span id="W2L1" class="LineNr"> 1 </span><span class="DiffChange">event-</span><span class="DiffText">8</span><span class="DiffChange"> </span>
<span id="W2L2" class="LineNr"> 2 </span>Shell got {event,["26c739fc-8d49-43ee-9c9e-129e81236cd2",
<span id="W2L3" class="LineNr"> 3 </span> {"Answer-State","ringing"},
<span id="W2L4" class="LineNr"> 4 </span> {"Application","transfer"},
<span id="W2L5" class="LineNr"> 5 </span> {"Application-Data","+15552510217 XML default"},
<span id="W2L6" class="LineNr"> 6 </span><span class="DiffAdd"> {"Application-Response","_none_"},</span><span class="DiffAdd"> </span>
<span id="W2L7" class="LineNr"> 7 </span> {"Application-UUID", "040626b0-7a18-417a-89f0-68db068d0ac2"}]}
<span id="W2L8" class="LineNr"> 8 </span> {"Call-Direction","inbound"},
<span id="W2L9" class="LineNr"> 9 </span> {"Caller-ANI","+15551234567"},
<span id="W2L10" class="LineNr">10 </span> {"Caller-Context","default"},
<span id="W2L11" class="LineNr">11 </span> {"Caller-Destination-Number","+15552510217"},
<span id="W2L12" class="LineNr">12 </span><span class="DiffChange"> {"Caller-Dialplan","</span><span class="DiffText">XML</span><span class="DiffChange">"}, </span>
<span id="W2L13" class="LineNr">13 </span> {"Caller-Direction","inbound"},
<span id="W2L14" class="LineNr">14 </span> {"Caller-Logical-Direction","inbound"},
<span id="W2L15" class="LineNr">15 </span> {"Caller-Network-Addr","104.248.176.184"},
<span id="W2L16" class="LineNr">16 </span><span class="DiffChange"> {"Caller-</span><span class="DiffText">Profile-Index","2</span><span class="DiffChange">"}, </span>
<span id="W2L17" class="LineNr">17 </span><span class="DiffChange"> {"Caller-</span><span class="DiffText">RDNIS","+1555251021</span><span class="DiffChange">7"}, </span>
<span id="W2L18" class="LineNr">18 </span> {"Caller-Screen-Bit","true"},
<span id="W2L19" class="LineNr">19 </span> {"Caller-Source","mod_sofia"},
<span id="W2L20" class="LineNr">20 </span> {"Caller-Unique-ID","26c739fc-8d49-43ee-9c9e-129e81236cd2"},
<span id="W2L21" class="LineNr">21 </span> {"Caller-Username","+15551234567"},
<span id="W2L22" class="LineNr">22 </span> {"Channel-Call-State","RINGING"},
<span id="W2L23" class="LineNr">23 </span> {"Channel-Call-UUID","26c739fc-8d49-43ee-9c9e-129e81236cd2"},
<span id="W2L24" class="LineNr">24 </span> {"Channel-HIT-Dialplan","true"},
<span id="W2L25" class="LineNr">25 </span> {"Channel-Name", "sofia/signalwire/+15551234567@sip.signalwire.com"},
<span id="W2L26" class="LineNr">26 </span> {"Channel-State","CS_EXECUTE"},
<span id="W2L27" class="LineNr">27 </span><span class="DiffChange"> {"Channel-State-Number","</span><span class="DiffText">2</span><span class="DiffChange">"}, </span>
<span id="W2L28" class="LineNr">28 </span> {"Core-UUID","ecd4d804-eb44-45eb-8efe-74205ab97d25"},
<span id="W2L29" class="LineNr">29 </span> {"Event-Calling-File","switch_core_session.c"},
<span id="W2L30" class="LineNr">30 </span> {"Event-Calling-Function","switch_core_session_exec"},
<span id="W2L31" class="LineNr">31 </span><span class="DiffChange"> {"Event-Calling-Line-Number","28</span><span class="DiffText">93</span><span class="DiffChange">"}, </span>
<span id="W2L32" class="LineNr">32 </span> {"Event-Date-GMT","Tue, 03 Dec 2019 16:48:50 GMT"},
<span id="W2L33" class="LineNr">33 </span> {"Event-Date-Local","2019-12-03 16:48:50"},
<span id="W2L34" class="LineNr">34 </span> {"Event-Date-Timestamp","1575391730378323"},
<span id="W2L35" class="LineNr">35 </span><span class="DiffChange"> {"Event-Name","CHANNEL_EXECUTE</span><span class="DiffText">_COMPLETE</span><span class="DiffChange">"}, </span>
<span id="W2L36" class="LineNr">36 </span><span class="DiffChange"> {"Event-Sequence","61</span><span class="DiffText">6</span><span class="DiffChange">"}, </span>
<span id="W2L37" class="LineNr">37 </span> {"FreeSWITCH-Hostname","fs"},
<span id="W2L38" class="LineNr">38 </span> {"FreeSWITCH-IPv4","10.0.0.5"},
<span id="W2L39" class="LineNr">39 </span> {"FreeSWITCH-IPv6","::1"},
<span id="W2L40" class="LineNr">40 </span> {"FreeSWITCH-Switchname","fs"},
<span id="W2L41" class="LineNr">41 </span> {"Presence-Call-Direction","inbound"},
<span id="W2L42" class="LineNr">42 </span> {"Unique-ID","26c739fc-8d49-43ee-9c9e-129e81236cd2"},
<span id="W2L43" class="LineNr">43 </span> ... variables ...
<span id="W2L44" class="LineNr">44 </span><span class="DiffText"> {"variable_endpoint_disposition","DELAYED NEGOTIATION"},</span><span class="DiffChange"> </span>
<span id="W2L45" class="LineNr">45 </span><span class="DiffText"> {"variable_ep_codec_string", "CORE_PCM_MODULE.PCMU@8000h@20i@64000b,mod_g729.G729@8000h@20i@8000b,mod_opus.opus@48000h@20i@2c,mod_spandsp.G722@8000h@20i@64000b,CORE_PCM_MODULE.PCMA@8000h@20i@64000b"},</span>
<span id="W2L46" class="LineNr">46 </span><span class="DiffChange"> {"variable_max_forwards","6</span><span class="DiffText">2</span><span class="DiffChange">"}, </span>
<span id="W2L47" class="LineNr">47 </span> ... variables ...
<span id="W2L48" class="LineNr">48 </span><span class="DiffChange"> {"variable_switch_r_sdp", "v=0\r\no=SignalWire-STACK 1575372444 1575372445 IN IP4 159.65.253.227\r\ns=SignalWire-STACK\r\nc=IN IP4 159.65.253.227\r\nt=0 0\r\nm=audio 19286 RTP/SAVP 0 18 102 9 8 101 13 103 104\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:18 G729/8000\r\na=fmtp:18 annexb=no\r\na=rtpmap:102 opus/48000/2\r\na=fmtp:102 useinbandfec=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40\r\na=rtpmap:9 G722/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=rtpmap:13 CN/8000\r\na=rtpmap:103 telephone-event/48000\r\na=fmtp:103 0-16\r\na=rtpmap:104 CN/48000\r\na=crypto:1 AEAD_AES_256_GCM_8 inline:5IbCXiK37EXXPsf4a7mCdyuWWyiIYhU4/azzKtY8lwGq0uWXAvCZBjfVPxA=\r\na=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:BFUQfHCY8rgwoQrRG0ljaQZ5xSQLAL0WM/t0vrbvIkrZECuzHl9SWcFd1ISSKA==\r\na=crypto:5 AES_CM_128_HMAC_SHA1_80 inline:6a4cFCTNyoMoqSo557U67ZehZAvhtL0e7+8Iw1Bc\r\na=crypto:6 AES_256_CM_HMAC_SHA1_32 inline:BETh7THI1mZLwEWFdqXKNSjYXOZQpkVizXYkdA1niVGBD1WdwRliqIYAalABfQ==\r\na=crypto:8 AES_CM_128_HMAC_SHA1_32 inline:k/tnVI7h5bh0fmxd+HmE2HyoCccNbyqgr+y6AtM3\r\na=ptime:20\r\n"},</span>
<span id="W2L49" class="LineNr">49 </span> {"variable_text_media_flow","disabled"},
<span id="W2L50" class="LineNr">50 </span><span class="DiffAdd"> {"variable_transfer_history", "1575391730:bfc8a77b-1c76-4e08-b112-3dce53920bf3:bl_xfer:+15552510217/default/XML"},</span><span class="DiffAdd"> </span>
<span id="W2L51" class="LineNr">51 </span><span class="DiffAdd"> {"variable_transfer_source", "1575391730:bfc8a77b-1c76-4e08-b112-3dce53920bf3:bl_xfer:+15552510217/default/XML"},</span><span class="DiffAdd"> </span>
<span id="W2L52" class="LineNr">52 </span> {"variable_uuid","26c739fc-8d49-43ee-9c9e-129e81236cd2"},
<span id="W2L53" class="LineNr">53 </span> {"variable_video_media_flow","disabled"},
<span id="W2L54" class="LineNr">54 </span>
</pre>
</div></td>
</tr>
</table>
</body>
</html>
Caller-Dialplan
标头从signalwire
变为XML
,这是否意味着两个拨号方案之间存在转移?
freeswitch@tr2> show dialplan
type,name,ikey
dialplan,LUA,mod_lua
dialplan,XML,mod_dialplan_xml
dialplan,asterisk,mod_dialplan_asterisk
dialplan,inline,mod_dptools
dialplan,signalwire,mod_signalwire
5 total.