sip to spa3102 fallback
Hello, I have two sip providers configuration files in $(fs_conf}/conf/diaplan/default : - 00_keyyo.net.xml <include> <extension name="keyyo" continue="false"> <condition field="destination_number" expression = "^(.*)$"> <action application="set" data="effective_caller_id_name=**MyID**"/> <action application="set" data="effective_caller_id_number=**Myphonenumber"/> <action application="bridge" data="sofia/gateway/keyyo.net/$1"/> </condition> </extension> </include> - 00_spa3102.xml <include> <extension name="To PSTN"> <condition field="destination_number" expression="^(.*)$"> <action application="bridge" data="sofia/internal/${destination_number}@spafenmsf:5061" /> </condition> </extension> </include> I'd like to implement the following scenario for outbound calls : - dial using "keyyo" if available - fallback to "To PSTN" if keyyo isn't available (not registered, already used, for example) I've googled for freeswitch failover setups but didn't find anything that could have enlightened me (I'm kind of new in fs). Where could I find docs to achieve the exposed goal please ? Kind Regards Eric Masson
Le 03/10/2010 20:55, Eric Masson a écrit : Hello, [Responding to myself]
I have two sip providers configuration files in $(fs_conf}/conf/diaplan/default : - 00_keyyo.net.xml - 00_spa3102.xml I'd like to implement the following scenario for outbound calls : - dial using "keyyo" if available - fallback to "To PSTN" if keyyo isn't available (not registered, already used, for example)
I've found a solution that seems to work but a little problem stays. I deactivated 00_keyyo.net.xml & 00_spa3102.xml then created a new file in the same directory : 00_outbound.xml <include> <extension name="outbound_calls" continue="false"> <condition field="destination_number" expression = "^0(.*)$"> <action application="set" data="effective_caller_id_name=**MyID**"/> <action application="set" data="effective_caller_id_number=**MyPhone**"/> <action application="bridge" data="sofia/gateway/keyyo.net/0$1|sofia/internal/4$1@spafenmsf:5061"/> </condition> </extension> </include> If keyyo.net is registered, FS uses keyyo.net gateway, if not FS uses the spa. The problem remaining is that FS takes a long time to detect that connection to keyyo.net is lost (I've tested by disconnecting the box from the internet). keyyo.net gateway is defined the following way : keyyo.net.xml <include> <gateway name="keyyo.net"> <param name="username" value=**MyUsername**/> <param name="password" value=**MyPassword**/> <param name="register-proxy" value="keyyo.net"/> <param name="register" value="true"/> <param name="ping" value="60"/> </gateway> </include> Any idea, please ? Kind Regards Eric Masson
How about using pipe-separated dial strings in your bridge app? http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bridge#Implementing_Fai... -MC On Sun, Oct 3, 2010 at 11:55 AM, Eric Masson <emss.mail@gmail.com> wrote:
Hello,
I have two sip providers configuration files in $(fs_conf}/conf/diaplan/default : - 00_keyyo.net.xml <include> <extension name="keyyo" continue="false"> <condition field="destination_number" expression = "^(.*)$"> <action application="set" data="effective_caller_id_name=**MyID**"/> <action application="set" data="effective_caller_id_number=**Myphonenumber"/> <action application="bridge" data="sofia/gateway/keyyo.net/$1"/> </condition> </extension> </include>
- 00_spa3102.xml <include> <extension name="To PSTN"> <condition field="destination_number" expression="^(.*)$"> <action application="bridge" data="sofia/internal/${destination_number}@spafenmsf:5061" /> </condition> </extension> </include>
I'd like to implement the following scenario for outbound calls : - dial using "keyyo" if available - fallback to "To PSTN" if keyyo isn't available (not registered, already used, for example)
I've googled for freeswitch failover setups but didn't find anything that could have enlightened me (I'm kind of new in fs).
Where could I find docs to achieve the exposed goal please ?
Kind Regards
Eric Masson
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Eric Masson
-
Michael Collins