码迷,mamicode.com
首页 > 其他好文 > 详细

FreeSWITCH挂机UUI发送和捕获

时间:2020-09-17 20:34:18      阅读:31      评论:0      收藏: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!