Skip to main content

Gateway prefixes


How to configure gateway prefixes

Click here to expand Table of Contents

Configuring easy gateway prefixes

To address the problem being able to dial out utilizing the gateway of your choice, you can setup T9 digit sequences to match the gateway names.

For example in your FS/conf/dialplan/default/sipgate.xml, you can use this:

<extension name="sipgate">
<condition field="destination_number" expression="^(?:sipgate|7474283)(\d{3,11})$">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
<action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
<action application="bridge" data="sofia/gateway/sipgate/$1"/>

Note that in the condition field, the expression is ORed name "sipgate" and its T9 translation "7474283", which would be very easy to dial as prefix on legacy PSTN phones.

To easily create the T9 digit sequence, you can use this bash script:


cat - | tr " a-zA-Z" "02223334445556667777888999922233344455566677778889999"

Save this script as an executable file "t9" in you $PATH and use it like this:

echo sipgate | t9