SHARE
TWEET

Untitled

a guest Sep 8th, 2015 128 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   <extension name="test-dialplan">
  2.     <condition field="destination_number" expression="^(\+\d{3,20})$" break="never">
  3.       <action application="set" data="dialed_number=$1" inline="true"/>
  4.     </condition>
  5.     <condition field="destination_number" expression="^(\d{3,20})$" break="never">
  6.       <action application="set" data="dialed_number=${country_code}$1" inline="true"/>
  7.     </condition>
  8.     <condition>
  9.       <action application="set" data="user_exists=${user_exists id ${dialed_number} ${domain_name}}" inline="true"/>
  10.     </condition>
  11.     <condition field="${user_exists}" expression="^true$" break="never">
  12.       <action application="set" data="call_timeout=20"/>
  13.       <action application="set" data="hangup_after_bridge=true"/>
  14.       <action application="set" data="continue_on_fail=true"/>
  15.       <action application="bridge" data="user/${dialed_number}@${domain_name}"/>
  16.       <action application="answer"/>
  17.       <action application="sleep" data="1000"/>
  18.       <action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_number}"/>
  19.     </condition>
  20.     <condition field="${user_exists}" expression="^false$" break="never">
  21.       <action application="set" data="effective_caller_id_number=${effective_caller_id_number}"/>
  22.       <action application="set" data="effective_caller_id_name=${effective_caller_id_number}"/>
  23.       <action application="bridge" data="sofia/gateway/pstn-outbound/${dialed_number}"/>
  24.     </condition>
  25.   </extension>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top