Timeout Message or something similar
Hello, I want to create a bridge between two users, something like this: originate {ringback=c:/teste.wav}sofia/DOMAIN/1001 &bridge(sofia/DOMAIN/1002) This works fine. But now i want to add a timeout message if the second user don't answer (a sound played to the first user cause of the no_answer of se second user). Is that possible? tks for your help -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Timeout-Message-or-something-s... Sent from the freeswitch-users mailing list archive at Nabble.com.
On Mon, Sep 12, 2011 at 8:30 AM, Brtantunes <brtantunes@gmail.com> wrote:
I want to create a bridge between two users, something like this:
originate {ringback=c:/teste.wav}sofia/DOMAIN/1001 &bridge(sofia/DOMAIN/1002)
This works fine. But now i want to add a timeout message if the second user don't answer (a sound played to the first user cause of the no_answer of se second user). Is that possible?
http://wiki.freeswitch.org/wiki/Mod_commands#originate Note the timeout option. The args are positional, so because timeout_sec is last, you have to provide all of the other options. Then have a look at something like failover: http://wiki.freeswitch.org/wiki/FreeSwitch_Dialplan_XML#Example_7:_Action_fa... I don't know if that gets you all the way there, but it should get you close (or at least get you pointed in the right direction). Gabe
Hello Gabriel, Thanks for your help. I'm new with freeswitch and didn't know about the failover. i tried /originate {ringback=c:/teste.wav,fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true}sofia/DOMAIN/1001 &bridge(sofia/DOMAIN/1002|sofia/DOMAIN/1003)/ and it works fine. Now the problem is on the failover pass the not the bridge to the other number. I tried /originate {ringback=c:/teste.wav,fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true}sofia/10.101.81.71/1001 &bridge(sofia/10.101.81.71/1002)|&playback(C:/teste2.wav)/ but obviously it didn't work :(. Any sugestions? Tks -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Timeout-Message-or-something-s... Sent from the freeswitch-users mailing list archive at Nabble.com.
What you're trying to do is quite possible, however you need to take a slightly different approach. The issue is that when you are continuing you need somewhere to go. You can't have anything but a dialstring inside of bridge, thus the "&playback" attempt won't work. Try this trick using the "inline" dialplan: /originate }sofia/DOMAIN/1001 bridge:{fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true}sofia/DOMAIN/1002,playback:C:/teste2.wav inline Note that I moved the necessary parameters over to the b leg since that's where you want the "continue" to happen. Remember too, that the first argument to "originate" is a dialstring but the second argument is a "dialplan" entry. You could just as easily do this: originate {ringback=c:/teste.wav}sofia/DOMAIN/1001 TRY_1002 XML default And then add this extension somewhere in default.xml or in conf/dialplan/default/foo.xml: <extension name="try to dial an extension"> <condition field="destination_number" expression="^TRY_(\d+)$"> <action application="bridge" data="{fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true}sofia/DOMAIN/$1"/> <action application="playback" data="C:/teste2.wav"/> <action application="hangup"/> </condition> </extension> Try it out and report back to let us know that you have it all working. -MC On Tue, Sep 13, 2011 at 2:48 AM, Brtantunes <brtantunes@gmail.com> wrote:
Hello Gabriel,
Thanks for your help. I'm new with freeswitch and didn't know about the failover.
i tried /originate
{ringback=c:/teste.wav,fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true}sofia/DOMAIN/1001 &bridge(sofia/DOMAIN/1002|sofia/DOMAIN/1003)/ and it works fine. Now the problem is on the failover pass the not the bridge to the other number. I tried /originate
{ringback=c:/teste.wav,fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true}sofia/ 10.101.81.71/1001 &bridge(sofia/10.101.81.71/1002)|&playback(C:/teste2.wav)/<http://10.101.81.71/1001%0A&bridge%28sofia/10.101.81.71/1002%29%7C&playback%28C:/teste2.wav%29/>but obviously it didn't work :(.
Any sugestions?
Tks
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Timeout-Message-or-something-s... Sent from the freeswitch-users mailing list archive at Nabble.com.
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
Hello, Thank you for your reply, I tried the first command: /originate sofia/DOMAIN/1001 bridge:{fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true}sofia/DOMAIN/1002,playback:C:/teste2.wav inline/ but it dosen't work :(. Then i tried the second approach and it works. The problem is i want to configure all parameters in runtime, so i need the first approah. Is there a way to see the command generated using XML default approach? Or can you guys tell me which command to use? Tks for your help, Greetings -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Timeout-Message-or-something-s... Sent from the freeswitch-users mailing list archive at Nabble.com.
Actually, you can use the second method and still be "dynamic". What are all of the parameters that must be set at run time? -MC On Wed, Sep 14, 2011 at 2:13 AM, Brtantunes <brtantunes@gmail.com> wrote:
Hello,
Thank you for your reply,
I tried the first command: /originate sofia/DOMAIN/1001
bridge:{fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true}sofia/DOMAIN/1002,playback:C:/teste2.wav inline/ but it dosen't work :(.
Then i tried the second approach and it works. The problem is i want to configure all parameters in runtime, so i need the first approah. Is there a way to see the command generated using XML default approach? Or can you guys tell me which command to use?
Tks for your help, Greetings
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Timeout-Message-or-something-s... Sent from the freeswitch-users mailing list archive at Nabble.com.
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
Hello, I figured it out. I'm using variables, Right now the command is: /originate {ringback=c:/teste.wav}[timeoutMsg=C:/teste2.wav,domain=DOMAIN,maxCallTime=30,ringTimeout=30]sofia/DOMAIN/1001 TRY_1002 XML default/ And in the dialplan i have: /<context name="myDialPlan"> <extension name="try to dial an extension"> <condition field="destination_number" expression="^TRY_(\d+)$"> <action application="sched_hangup" data="+${maxCallTime} allotted_timeout"/> <action application="bridge" data="{fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true,ignore_early_media=true,originate_timeout=${ringTimeout}}sofia/${domain}/$1"/> <action application="playback" data="${timeoutMsg}"/> <action application="hangup"/> </condition> </extension> </context>/ It is working fine. Now i just want to include the originate in the dialplan and just pass all parameters like variables, but i'm having problems. Any sugestions? Tks for your help, Greetings -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Timeout-Message-or-something-s... Sent from the freeswitch-users mailing list archive at Nabble.com.
What do you mean by "include the originate in the dialplan"? The originate command is what creates the two call legs. Anything in the dialplan requires a call leg already to exist. -MC On Fri, Sep 16, 2011 at 7:04 AM, Brtantunes <brtantunes@gmail.com> wrote:
Hello,
I figured it out. I'm using variables, Right now the command is: /originate
{ringback=c:/teste.wav}[timeoutMsg=C:/teste2.wav,domain=DOMAIN,maxCallTime=30,ringTimeout=30]sofia/DOMAIN/1001 TRY_1002 XML default/
And in the dialplan i have: /<context name="myDialPlan"> <extension name="try to dial an extension"> <condition field="destination_number" expression="^TRY_(\d+)$"> <action application="sched_hangup" data="+${maxCallTime} allotted_timeout"/> <action application="bridge"
data="{fail_on_single_reject=true,ignore_early_media=true,originate_continue_on_timeout=true,ignore_early_media=true,originate_timeout=${ringTimeout}}sofia/${domain}/$1"/> <action application="playback" data="${timeoutMsg}"/> <action application="hangup"/> </condition> </extension> </context>/
It is working fine. Now i just want to include the originate in the dialplan and just pass all parameters like variables, but i'm having problems. Any sugestions?
Tks for your help, Greetings
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Timeout-Message-or-something-s... Sent from the freeswitch-users mailing list archive at Nabble.com.
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 (3)
-
Brtantunes
-
Gabriel Gunderson
-
Michael Collins