Call Us Today! 877.742.2583




Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<extension name="nothing_left_private" continue="false">
  <condition break="always">
    <action application="set" data="proto_specific_hangup_cause=sip:503"/>
    <action application="hangup"/>
  </condition>
</extension>

The blue in the below examples are what you would replace with your own information.


Now you will need to define your customers. I do this in /conf/dialplan/public/00_customer_list.xml.

replace the keywords below with your own informations.

  • <condition field="${network_addr}" expression="pu.bl.ic.ip"/>
  • <\!--    <action application="bridge" data="sofia/external/${destination_number}@${distributor(dist_list)}"/> -->
<action application="bridge" data="sofia/external/${destination_number}@127.0.0.1:5062"/>

 

Code Block
<include>
 <extension name="customer_my_public_desk">
    <condition field="${network_addr}" expression="pu.bl.ic.ip"/>
    <condition field="destination_number" expression="^\+?1?(\d+)$">
      <action application="set" data="hangup_after_bridge=true"/>
      <action application="set" data="continue_on_fail=true"/>
      <\!-- THIS WORKS FOR CALL DISTRIBUTION --\>
      <\!--    <action application="bridge" data="sofia/external/${destination_number}@${distributor(dist_list)}"/> -->
      <\!-- THIS WORKS FOR SINGLE PROXY  --\>
      <action application="bridge" data="sofia/external/${destination_number}@127.0.0.1:5062"/>
    </condition>
  </extension>
  <extension name="customer_my_private_desk">
    <condition field="${network_addr}" expression="pr.iv.ate.ip"/>
    <condition field="destination_number" expression="^\+?1?(\d+)$">
      <action application="set" data="hangup_after_bridge=true"/>
      <action application="set" data="continue_on_fail=true"/>
      <action application="bridge" data="sofia/internal/${destination_number}@127.0.0.1:5062"/>
    </condition>
  </extension>
</include>

Replace the keywords below with your own informations.

  • <condition field="${network_addr}" expression="pu.bl.ic.ip"/>
  • <\!-- <action application="bridge" data="sofia/external/${destination_number}@${distributor(dist_list)}"/> --> 
  • <action application="bridge" data="sofia/external/${destination_number}@127.0.0.1:5062"/>
  • <condition field="${network_addr}" expression="pr.iv.ate.ip"/>
  • <action application="bridge" data="sofia/internal/${destination_number}@127.0.0.1:5062"/>

This will send the request to your proxy LCR engine which will return to you a 30x response that FreeSWITCH automatically dumps into the XML redirected context. This context must be defined in /conf/dialplan/public.xml if you want it to load properly. You can use a single destination, such as a localhost OpenSIPS proxy as I have shown here, or you can use load balancing to distribute the traffic over multiple proxies (see Mod_distributor). Depending on the ingress IP/location, you should set the sip_profile of sofia to the external or internal to keep the call on the same side of FreeSWITCH so you don't have to traverse internally unless you have to.

In your redirected context, you will put as many list checks in as you will be sending from your LCR engine in the 30x.

Code Block
<context name="redirected">
   <extension name="redir_list_contact_0" continue="true">
     <condition field="${sip_redirect_contact_0}" expression="(((192.168.)|(172.24.)|(10.10.))\d+\.\d+(:\d+)(;dtg=\w+)?)">
       <action application="set" data="hangup_after_bridge=true"/>
       <action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ROUTE_DESTINATION"/>
       <action      application="bridge" data="sofia/internal/${sip_redirect_contact_0}"/>
       <anti-action application="bridge" data="sofia/external/${sip_redirect_contact_0}"/>
     </condition>
 </extension>
 <extension name="redir_list_contact_1" continue="true">
    ...
 </extension>
</context>

What this does is check the location of the contact to see if the destination resides on the internal or external side of FreeSWITCH. That way it does not try to send the new INVITEs out of the wrong ethernet interface.

 

OpenSIPS Example

 This is an very minimal example configuration to generate a 300 Multiple Choice to test this FreeSWITCH configuration with if you don't already have some LCR engines in place. (I WILL INSERT THE EXAMPLE HERE)