Hello All,
I use
freeswitch to route inbound calls to some of the PBX's we host, and I
use the
following method (Below) to do so. It's been working great (20,000
calls in
the first month without a problem), but I wanted to get a second
opinion to
see if there was a better way to do such a thing (keeping the DID
intact).
Any help would be appreciated. (I used an example DID and
extention)
<extension name="setdid">
<condition
field="destination_number" expression="^setdid$">
<action
application="set" data="dialed_ext=${did}"/>
<action application="set"
data="hangup_after_bridge=true"/>
<action application="set"
data="disable_q850_reason=true"/>
<action
application="bridge"
data="sofia/internal/${did}${regex(${sofia_contact(${user})}|^[^\@]+(.*)|%1)}"/>
</condition>
</extension>
<extension
name="13125551234">
<condition field="destination_number"
expression="^13125551234$">
<action application="set"
data="user=user1002"/>
<action application="set"
data="did=${destination_number}"/>
<action
application="execute_extension"
data="setdid"/>
</condition>
</extension>