Does anyone know a simple way of setting up a outbound route for an extension or group of extensions?
So something likeYour should be able to use regex too for ranges
<user id="user1">
<params>
<param name="password" value="1"/>
</params>
<variables>
<variable name="register-gateway" value="user1out"/>
</variables>
<gateways>
<gateway name="user1out">
<param name="username" value="4347382173"/>
<param name="password" value="1"/>
<param name="proxy" value="sip.example.com"/>
<param name="register" value="false"/>
</gateway>
</gateways>
</user>
There is one feature in user Directory may be useful.
from freeswitch confluence:
User-Specific Gateways
The <register-gateway> variable can be set to the name of a specific gateway, a comma delimited list of multiple gateways, or "all". Setting it to one or more gateways will register the named gateway(s) when the <user> registers with FreeSWITCH.(whether they're in the <user>'s <gateways> or some other <user>'s <gateways> or anywhere). Setting the variable to "all" will register all of the particular <user>'s gateways.XML:<user id="user1"> <params> <param name="password" value="1"/> </params> <variables> <variable name="register-gateway" value="user1out"/> </variables> <gateways> <gateway name="user1out"> <param name="username" value="4347382173"/> <param name="password" value="1"/> <param name="proxy" value="sip.example.com"/> <param name="register" value="false"/> </gateway> </gateways> </user>
Why do you guys think this would be useful, ie a gateway for one extension?? It still has no diaplan to use it?
I figured this was for if you have 10 extensions, and you wanted 201-209 to be able to dial out on a specific gateway, and ext. 301 wasn't allowed to dial out (because it was a public / receive only phone) then you'd use something like this?
FreePBX has this:
https://www.freepbx.org/extension-routing/
It is possible to use one line generic dialplan for all extensions:There is one feature in user Directory may be useful.
from freeswitch confluence:
User-Specific Gateways
The <register-gateway> variable can be set to the name of a specific gateway, a comma delimited list of multiple gateways, or "all". Setting it to one or more gateways will register the named gateway(s) when the <user> registers with FreeSWITCH.(whether they're in the <user>'s <gateways> or some other <user>'s <gateways> or anywhere). Setting the variable to "all" will register all of the particular <user>'s gateways.XML:<user id="user1"> <params> <param name="password" value="1"/> </params> <variables> <variable name="register-gateway" value="user1out"/> </variables> <gateways> <gateway name="user1out"> <param name="username" value="4347382173"/> <param name="password" value="1"/> <param name="proxy" value="sip.example.com"/> <param name="register" value="false"/> </gateway> </gateways> </user>
It is possible to use one line generic dialplan for all extensions:
<action application="bridge" data="sofia/ gateway/{register-gateway}/$1 />