Problem with "continue" in extension.
I have the following in my dialplan. Individually, each extension does what it's suppose to do when dialing 1111. However, if I place continue=true in the first extension then it alone gets executed and the succeeding extension does not. I thought condition=true would allow the extension afterward to execute. My test hardware for this dialplan is a single PSTN line. A call comes in that line and "myExtension" executes then hopefully hangs up to free the line. Afterward, I want "myExtension_Continued" to execute the .js application and dial out that single PSTN line. I need help in getting this scenerio to work. Thanks. ?? ? ?? ?<extension name="myExtension" continue="true">?? ? ?? ??? ?<condition field="destination_number" expression="^1111$"> ?? ??? ??? ?<action application="info"/> ?? ??? ??? ?<action application="set" data="bypass_media=true"/> ?? ??? ??? ?<action application="set" data="effective_caller_id_number=${caller_id_number}"/> ?? ??? ??? ?<action application="set" data="hangup_after_bridge=true"/> ?? ??? ??? ?<action application="bridge" data="sofia/internal/${sip_to_user}@127.0.0.1:5068"/> ?? ??? ?</condition> ?? ?</extension> ?? ?<extension name="myExtension_Continued">?? ? ?? ??? ?<condition field="destination_number" expression="^1111$"> ?? ??? ??? ?<action application="javascript" data="myScript.js"/> ?? ??? ?</condition> ?? ?</extension>
The continue works fine, it just hangs up befoer that due to: <action application="set" data="hangup_after_bridge=true"/> Mike On Mar 11, 2009, at 2:46 AM, mszlazak@aol.com wrote:
I have the following in my dialplan.
Individually, each extension does what it's suppose to do when dialing 1111. However, if I place continue=true in the first extension then it alone gets executed and the succeeding extension does not. I thought condition=true would allow the extension afterward to execute.
My test hardware for this dialplan is a single PSTN line. A call comes in that line and "myExtension" executes then hopefully hangs up to free the line. Afterward, I want "myExtension_Continued" to execute the .js application and dial out that single PSTN line.
I need help in getting this scenerio to work.
Thanks.
<extension name="myExtension" continue="true"> <condition field="destination_number" expression="^1111$"> <action application="info"/> <action application="set" data="bypass_media=true"/> <action application="set" data="effective_caller_id_number=${caller_id_number}"/> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="sofia/internal/${sip_to_user}@127.0.0.1 :5068"/> </condition> </extension>
<extension name="myExtension_Continued"> <condition field="destination_number" expression="^1111$"> <action application="javascript" data="myScript.js"/> </condition> </extension>
I changed that tag so that hangup_after_bridge is false: ?<action application="set" data="hangup_after_bridge=false"/> but I still don't get the .js application working which is nothing more than a test script that ran if I dialed it's extension with the preceding one commented out: s = new Session("{ignore_early_media=true}sofia/gateway/spa3102/12223334444@10.0.0.5:5061"); while (s.ready()) { ??? s.answer(); ??? s.speak("cepstral","Callie","Hello World"); } -----Original Message----- From: Michael Jerris <mike@jerris.com> To: freeswitch-users@lists.freeswitch.org Sent: Wed, 11 Mar 2009 4:34 am Subject: Re: [Freeswitch-users] Problem with "continue" in extension. The continue works fine, it just hangs up befoer that due to: ?? ? ? ? ? ?<action application="set" data="hangup_after_bridge=true"/> Mike On Mar 11, 2009, at 2:46 AM, mszlazak@aol.com wrote: I have the following in my dialplan. Individually, each extension does what it's suppose to do when dialing 1111. However, if I place continue=true in the first extension then it alone gets executed and the succeeding extension does not. I thought condition=true would allow the extension afterward to execute. My test hardware for this dialplan is a single PSTN line. A call comes in that line and "myExtension" executes then hopefully hangs up to free the line. Afterward, I want "myExtension_Continued" to execute the .js application and dial out that single PSTN line. I need help in getting this scenerio to work. Thanks. ?? ? ?? ?<extension name="myExtension" continue="true">?? ? ?? ??? ?<condition field="destination_number" expression="^1111$"> ?? ??? ??? ?<action application="info"/> ?? ??? ??? ?<action application="set" data="bypass_media=true"/> ?? ??? ??? ?<action application="set" data="effective_caller_id_number=${caller_id_number}"/> ?? ??? ??? ?<action application="set" data="hangup_after_bridge=true"/> ?? ??? ??? ?<action application="bridge" data="sofia/internal/${sip_to_user}@127.0.0.1:5068"/> ?? ??? ?</condition> ?? ?</extension> ?? ?<extension name="myExtension_Continued">?? ? ?? ??? ?<condition field="destination_number" expression="^1111$"> ?? ??? ??? ?<action application="javascript" data="myScript.js"/> ?? ??? ?</condition> ?? ?</extension> = _______________________________________________ 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
On Wed, Mar 11, 2009 at 9:42 AM, <mszlazak@aol.com> wrote:
I changed that tag so that hangup_after_bridge is false:
<action application="set" data="hangup_after_bridge=false"/> but I still don't get the .js application working which is nothing more than a test script that ran if I dialed it's extension with the preceding one commented out:
Try adding a break="never" to your first extension: <extension name="myExtension" continue="true"> <condition field="destination_number" expression="^1111$" break="never"> <action application="info"/> <action application="set" data="bypass_media=true"/> <action application="set" data="effective_caller_id_number=${caller_id_number}"/> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="sofia/internal/${sip_to_user}@127.0.0.1:5068"/> </condition> </extension> I believe that will cause the the dialplan to keep looking for "1111" even after it has been matched once. -MC
Mike, no luck with that either. I still need to see this through but another related approach will be needed later so I'll ask now. Does FreeSwitch have some script or something to set up an "auto dialer." Basically, I want to be able the store some caller info then have FS automatically check to see if a "reminder" calls need to be sent out. Thanks.? -----Original Message----- From: Michael Collins <msc@freeswitch.org> To: freeswitch-users@lists.freeswitch.org Sent: Wed, 11 Mar 2009 10:14 am Subject: Re: [Freeswitch-users] Problem with "continue" in extension. On Wed, Mar 11, 2009 at 9:42 AM, <mszlazak@aol.com> wrote:
I changed that tag so that hangup_after_bridge is false:
?<action application="set" data="hangup_after_bridge=false"/> but I still don't get the .js application working which is nothing more than a test script that ran if I dialed it's extension with the preceding one commented out:
Try adding a break="never" to your first extension: <extension name="myExtension" continue="true"> <condition field="destination_number" expression="^1111$" break="never"> <action application="info"/> <action application="set" data="bypass_media=true"/> <action application="set" data="effective_caller_id_number=${caller_id_number}"/> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="sofia/internal/${sip_to_user}@127.0.0.1:5068"/> </condition> </extension> I believe that will cause the the dialplan to keep looking for "1111" even after it has been matched once. -MC _______________________________________________ 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
On Wed, Mar 11, 2009 at 10:42 AM, <mszlazak@aol.com> wrote:
Mike, no luck with that either.
You may have to get fancy and use the transfer app and create an extension like this: <extension name="cleanup 1111"> <condition field="destination_number" expression="^(CLEANUP1111)$"> <action application="do your cleanup stuff here..."/> <condition> </extension> Then just call it from the regular 1111 extension: <action application="transfer" data="dialplan XML CLEANUP1111"/>
I still need to see this through but another related approach will be needed later so I'll ask now.
Does FreeSwitch have some script or something to set up an "auto dialer." Basically, I want to be able the store some caller info then have FS automatically check to see if a "reminder" calls need to be sent out.
you do you have the sched_api family of API functions: http://wiki.freeswitch.org/wiki/Mod_commands#sched_api I don't have it wikified but there is also an unsched_api function so that you can cancel a future scheduled api. The API could be something like "originate user/1000 &bridge(foo/bar)" -MC
Mike, can you give me a pointer to what needs cleaning up so I have an idea how to make one of these? Also, thanks a lot for the sched_api and unsched_api, that's terrific news! -----Original Message----- From: Michael Collins <msc@freeswitch.org> To: freeswitch-users@lists.freeswitch.org Sent: Wed, 11 Mar 2009 11:53 am Subject: Re: [Freeswitch-users] Problem with "continue" in extension. On Wed, Mar 11, 2009 at 10:42 AM, <mszlazak@aol.com> wrote:
Mike, no luck with that either.
You may have to get fancy and use the transfer app and create an extension like this: <extension name="cleanup 1111"> <condition field="destination_number" expression="^(CLEANUP1111)$"> <action application="do your cleanup stuff here..."/> <condition> </extension> Then just call it from the regular 1111 extension: <action application="transfer" data="dialplan XML CLEANUP1111"/>
I still need to see this through but another related approach will be needed later so I'll ask now.
Does FreeSwitch have some script or something to set up an "auto dialer." Basically, I want to be able the store some caller info then have FS automatically check to see if a "reminder" calls need to be sent out.
you do you have the sched_api family of API functions: http://wiki.freeswitch.org/wiki/Mod_commands#sched_api I don't have it wikified but there is also an unsched_api function so that you can cancel a future scheduled api. The API could be something like "originate user/1000 &bridge(foo/bar)" -MC _______________________________________________ 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)
-
Michael Collins
-
Michael Jerris
-
mszlazak@aol.com