Alternate outbound gateways

In this example we send ten-digit outbound calls from OfficeA to gateway1 and from OfficeB to gateway2. This assumes OfficeA and OfficeB are both using the same FreeSWITCH box but need different routing for outbound calls. It assumes both offices have 4-digit extensions, and that OfficeA's extensions start with 2 and OfficeB's extensions start with 3.

<extension name="officeA_outbound"> 
  <condition field="caller_id_number"  
             expression="^2d{3}$"/> 
  <condition field="destination_number"  
             expression="^(d{10})$"> 
      <action application="set"  
        data="effective_caller_id_number=8001231234"/> 
      <action application="set"  
        data="effective_caller_id_name=Office A"/> 
      <action application="bridge"  
              data="sofia/gateway/myswitch.com/$1"/> 
  </condition> 
</extension> 
<extension name="officeB_outbound"> 
  <condition field="caller_id_number"  
             expression="^3d{3}$"/> 
  <condition field="destination_number"  
             expression="^(d{10})$"> 
      <action application="set"  
         data="effective_caller_id_number=8001231235"/> 
      <action application="set"  
         data="effective_caller_id_name=Office B"/> 
      <action application="bridge"   
         data="sofia/gateway/otherswitch.com/$1"/> 
  </condition> 
</extension> 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.137.240