[Freeswitch-users] Registering SIP Trunks to Freeswitch
Paul Cupis
paul at cupis.co.uk
Fri Sep 7 23:47:53 MSD 2012
On 06/09/12 20:09, Matt Putnam wrote:
> Sorry for the confusion I can really only equate it to asterisk as
> that’s what our current platform is. Essentially the problem is that if
> I have a PBX that has a trunk that is registered to freeswitch and a
> call is received for a DID that is on that trunk I am currently unable
> to send that DID to the PBX. When the call is received on the PBX side
> it looks as if the call is for the trunk instead of the DID is should be
> for. So in the SIP invite instead of using lightspar1 at domain it would
> use 5551212 at domain. In asterisk this was simply accomplished by a dial
> statement of (SIP/5551212 at lightspar1) what I am looking for is that
> equivalent in freeswitch.
Do you have a copy of the FreeSWITCH Cookbook? This requirement sounds
similar to one of the recipes in the book.
<extension name="9725551212">
<condition field="destination_number" expression="^9725551212$"/>
<condition field="${sofia_contact(lightspar1@${domain})}"
expression="^[^\@]+(.*)">
<action application="bridge" data="sofia/external/9725551212$1"/>
</condition>
</extension>
The sofia_contact bit should work out the dialstring and then strip
everything before the '@' (in your example this would be 'lightspar1')
and then the bridge prepends the destination number.
Regards,
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list