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