[Freeswitch-users] ANI / DNIS Number Translation

Joseph L. Casale jcasale at activenetwerx.com
Tue Apr 20 10:34:58 PDT 2010


>For outbound calls to the PSTN, we might need to strip a leading "9". For inbound calls, we might need to convert 10 digit DID's to internal 4 digit directory numbers.
>
>Those are two of the most common examples we encounter.

Regex group matches? That's how I do it...

<condition field="destination_number" expression="^(?:1{0,1})(403|587)(\d{7})$">
...
<action application="bridge" data="sofia/gateway/foo.ca/1$1$2|$1$2 at bar.local:5060"/>

Just an example how I dial as needed from a more flexible input...




More information about the FreeSWITCH-users mailing list