FreeSWITCH挂机UUI发送和捕获

技术文章 1年前 (2020) 完美者
1,607 0

标签:bye   rto   ica   after   XML   res   voice   _for   expr   

FS_A ---转到--->FS_B---挂机--->FS_A---捕获UUI--->

FS_A

<extension name="uui_bye"> <!-- 将来自172.16.10.41的呼叫送到网关ext_to_int-->
    <!-- <condition field="network_addr" expression="^114\.55\.10\.79$" break="on-false"/>--><!--on-false,如果匹配失败则不继续 -->
 <condition field="destination_number" expression="^(9121001)$">
    <action application="set" data="sip_h_X-accountcode=this is a call from sf-express!"/>
    <action application="set" data="call_direction=outbound"/>
    <action application="set" data="hangup_after_bridge=false"/>
    <action application="set" data="inherit_codec=true"/>
    <action application="set" data="ignore_display_updates=true"/>
    <action application="set" data="callee_id_number=$1"/>
    <action application="set" data="dtmf_type=rfc2833"/> <!-- 解决不能二次拨号-->
    <action application="export" data="nolocal:execute_on_answer=start_dtmf"/><!-- 解决不能二次拨号-->
    <action application="answer"/>
    <action application="playback" data="ivr/ivr-welcome_to_freeswitch.wav"/>
    <action application="playback" data="other/transfer.wav"/>
    <action application="bridge" data="sofia/gateway/to_outbound_proxy/$1"/>
    <action application="set" data="UUI=${sip_bye_h_X-USER-TO-USER}"/>
    <action application="log" data="NOTICE 获取到挂机的UUI:${UUI}"/>
  <action application="transfer" data="uui_transfer XML default"/>
  </condition>
</extension>
<extension name="uui_transfer">
<condition field="destination_number" expression="^uui_transfer$" break="on-false"/>
 <condition field="${UUI}" expression="^123$" break="on-true">
    <action application="playback" data="voicemail/vm-goodbye.wav"/>
    <action application="log" data="NOTICE 匹配到UUI:${UUI}"/>
    <action application="hangup"/>
 </condition>
 <condition field="${UUI}" expression="^321$" break="on-true">
    <action application="playback" data="ivr/ivr-thank_you_for_calling.wav"/>
    <action application="deflect" data="sip:915119@$${domain_name}"/>
    <action application="hangup"/>
 </condition>
</extension>

FS_B

<extension name="verto_to_huwei">
                <condition field="destination_number" expression="^(9121001)$">
                                <action application="set" data="hangup_after_bridge=true"/>
                                <action application="set" data="inherit_codec=true"/>
                                <action application="set" data="ignore_display_updates=true"/>
                                <action application="set" data="continue_on_fail=true"/>
                                <action application="set" data="sip_rh_X-Reason=$1 begain answer you call!"/>
                                <action application="answer"/>
                                <action application="playback" data="ivr/ivr-welcome_to_freeswitch.wav"/>
                                <action application="sleep" data="5000"/>
                                <action application="set" data="sip_bye_h_X-USER-TO-USER=321"/>
                                <action application="hangup"/>
                </condition>
</extension>

FreeSWITCH挂机UUI发送和捕获

标签:bye   rto   ica   after   XML   res   voice   _for   expr   

原文地址:https://blog.51cto.com/908405/2530832

版权声明:完美者 发表于 2020-09-17 20:34:18。
转载请注明:FreeSWITCH挂机UUI发送和捕获 | 完美导航

暂无评论

暂无评论...