Hi, My helpdesk extensions are recorded. When the recording is complete (after bridge) I want to run a script to create a ticket and attach said recording to it. Initially I tried to use [...] Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_app=system) Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_arg=/root/wav2ticket.php) [...] but this doesn't result in an invocation of my script and seemingly no helpful diagnostic messages. I changed to using <action application="set" data="api_after_bridge=system /root/wav2ticket.php ${recfile}"/> which DOES work. Can anyone clarify the difference between the two approaches? Cheers, -Slim -- Jeroen C. "Slim" van Gelderen Olympic Sports Data Services Email: slim@thegreek.com Phone: +1 876 953 6182 x128
Well, the only difference is that one is executing an API and the other executes a dialplan application. AFAIK they should operate in a similar fashion. The only difference I see is that you have supplied an argument in your API call ("${recfile}") but not in your exec_after_bridge call. -MC On Sun, Oct 17, 2010 at 3:33 PM, Jeroen C. van Gelderen <slim@thegreek.com>wrote:
Hi,
My helpdesk extensions are recorded. When the recording is complete (after bridge) I want to run a script to create a ticket and attach said recording to it.
Initially I tried to use
[...] Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_app=system) Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_arg=/root/wav2ticket.php)
[...]
but this doesn't result in an invocation of my script and seemingly no helpful diagnostic messages.
I changed to using
<action application="set" data="api_after_bridge=system /root/wav2ticket.php ${recfile}"/>
which DOES work.
Can anyone clarify the difference between the two approaches?
Cheers, -Slim -- Jeroen C. "Slim" van Gelderen Olympic Sports Data Services Email: slim@thegreek.com Phone: +1 876 953 6182 x128
_______________________________________________ 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
Will the DP application specified with exec_after_bridge executed if the channel was hung up? On Monday 18 October 2010, Michael Collins wrote:
Well, the only difference is that one is executing an API and the other executes a dialplan application. AFAIK they should operate in a similar fashion. The only difference I see is that you have supplied an argument in your API call ("${recfile}") but not in your exec_after_bridge call.
-MC
On Sun, Oct 17, 2010 at 3:33 PM, Jeroen C. van Gelderen
<slim@thegreek.com>wrote:
Hi,
My helpdesk extensions are recorded. When the recording is complete (after bridge) I want to run a script to create a ticket and attach said recording to it.
Initially I tried to use
[...] Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_app=system) Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_arg=/root/wav2ticket.php)
[...]
but this doesn't result in an invocation of my script and seemingly no helpful diagnostic messages.
I changed to using
<action application="set" data="api_after_bridge=system /root/wav2ticket.php ${recfile}"/>
which DOES work.
Can anyone clarify the difference between the two approaches?
Cheers, -Slim -- Jeroen C. "Slim" van Gelderen Olympic Sports Data Services Email: slim@thegreek.com Phone: +1 876 953 6182 x128
_______________________________________________ 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
Bingo. The exec_after_bridge_app call is guarded by: if (!inner_bridge && switch_channel_up(chan_a)) { } whereas the exec_after_bridge_api is guarded by: if (!inner_bridge) { } Anyone know the reason for this difference? It would seem common for the channel to be hung up by the time one wants to execute the registered application. Cheers, -Slim -- Jeroen C. "Slim" van Gelderen -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Sergey Okhapkin Sent: Monday, October 18, 2010 12:11 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] exec_after* Will the DP application specified with exec_after_bridge executed if the channel was hung up? On Monday 18 October 2010, Michael Collins wrote:
Well, the only difference is that one is executing an API and the other executes a dialplan application. AFAIK they should operate in a similar fashion. The only difference I see is that you have supplied an argument in your API call ("${recfile}") but not in your exec_after_bridge call.
-MC
On Sun, Oct 17, 2010 at 3:33 PM, Jeroen C. van Gelderen
<slim@thegreek.com>wrote:
Hi,
My helpdesk extensions are recorded. When the recording is complete (after bridge) I want to run a script to create a ticket and attach said recording to it.
Initially I tried to use
[...] Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_app=system) Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_arg=/root/wav2ticket.php)
[...]
but this doesn't result in an invocation of my script and seemingly no helpful diagnostic messages.
I changed to using
<action application="set" data="api_after_bridge=system /root/wav2ticket.php ${recfile}"/>
which DOES work.
Can anyone clarify the difference between the two approaches?
Cheers, -Slim -- Jeroen C. "Slim" van Gelderen Olympic Sports Data Services Email: slim@thegreek.com Phone: +1 876 953 6182 x128
_______________________________________________ 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
_______________________________________________ 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
The "h" extension in asterisk is a feature I used extensively. Lack of a hangup dialplan handler makes DP programming in FS harder and less clear. Fortunately, CDR handlers allow to do some post call cleanup work, but in- dialplan implementation would be much better and clearer. On Monday 18 October 2010, Jeroen C. van Gelderen wrote:
Bingo.
The exec_after_bridge_app call is guarded by:
if (!inner_bridge && switch_channel_up(chan_a)) { }
whereas the exec_after_bridge_api is guarded by:
if (!inner_bridge) { }
Anyone know the reason for this difference? It would seem common for the channel to be hung up by the time one wants to execute the registered application.
Cheers, -Slim -- Jeroen C. "Slim" van Gelderen
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Sergey Okhapkin Sent: Monday, October 18, 2010 12:11 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] exec_after*
Will the DP application specified with exec_after_bridge executed if the channel was hung up?
On Monday 18 October 2010, Michael Collins wrote:
Well, the only difference is that one is executing an API and the other executes a dialplan application. AFAIK they should operate in a similar fashion. The only difference I see is that you have supplied an argument
in
your API call ("${recfile}") but not in your exec_after_bridge call.
-MC
On Sun, Oct 17, 2010 at 3:33 PM, Jeroen C. van Gelderen
<slim@thegreek.com>wrote:
Hi,
My helpdesk extensions are recorded. When the recording is complete (after bridge) I want to run a script to create a ticket and attach said recording to it.
Initially I tried to use
[...] Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_app=system) Dialplan: FreeTDM/3:1/ Action set(exec_after_bridge_arg=/root/wav2ticket.php)
[...]
but this doesn't result in an invocation of my script and seemingly no helpful diagnostic messages.
I changed to using
<action application="set" data="api_after_bridge=system /root/wav2ticket.php ${recfile}"/>
which DOES work.
Can anyone clarify the difference between the two approaches?
Cheers, -Slim -- Jeroen C. "Slim" van Gelderen Olympic Sports Data Services Email: slim@thegreek.com Phone: +1 876 953 6182 x128
_______________________________________________ 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-user s http://www.freeswitch.org
_______________________________________________ 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
_______________________________________________ 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 Mon, Oct 18, 2010 at 12:40 PM, Sergey Okhapkin <sos@sokhapkin.dyndns.org>wrote:
The "h" extension in asterisk is a feature I used extensively. Lack of a hangup dialplan handler makes DP programming in FS harder and less clear.
That's what api_hangup_hook is for. Call ends, do an API that can do pretty much anything you can imagine and you're done. You can even set session_in_hangup_hook to true so that you have the channel's variables available even though the channel has been disconnected.
Fortunately, CDR handlers allow to do some post call cleanup work, but in- dialplan implementation would be much better and clearer.
Much better? No. Much clearer, possibly. The benefits of not doing cleanup work in the dialplan AFTER the channel has gone away far outweigh the drawbacks. Use api_hangup_hook and session_in_hangup_hook=true. Doing this stuff outside the dialplan is more efficient and less error-prone. -MC
Thank you for the session_in_hangup_hook hint... On Monday 18 October 2010, Michael Collins wrote:
On Mon, Oct 18, 2010 at 12:40 PM, Sergey Okhapkin
<sos@sokhapkin.dyndns.org>wrote:
The "h" extension in asterisk is a feature I used extensively. Lack of a hangup dialplan handler makes DP programming in FS harder and less clear.
That's what api_hangup_hook is for. Call ends, do an API that can do pretty much anything you can imagine and you're done. You can even set session_in_hangup_hook to true so that you have the channel's variables available even though the channel has been disconnected.
Fortunately, CDR handlers allow to do some post call cleanup work, but in- dialplan implementation would be much better and clearer.
Much better? No. Much clearer, possibly. The benefits of not doing cleanup work in the dialplan AFTER the channel has gone away far outweigh the drawbacks. Use api_hangup_hook and session_in_hangup_hook=true. Doing this stuff outside the dialplan is more efficient and less error-prone.
-MC
A cookbook entry perhaps..... On Mon, Oct 18, 2010 at 5:32 PM, Sergey Okhapkin <sos@sokhapkin.dyndns.org>wrote:
Thank you for the session_in_hangup_hook hint...
On Monday 18 October 2010, Michael Collins wrote:
On Mon, Oct 18, 2010 at 12:40 PM, Sergey Okhapkin
<sos@sokhapkin.dyndns.org>wrote:
The "h" extension in asterisk is a feature I used extensively. Lack of a hangup dialplan handler makes DP programming in FS harder and less clear.
That's what api_hangup_hook is for. Call ends, do an API that can do pretty much anything you can imagine and you're done. You can even set session_in_hangup_hook to true so that you have the channel's variables available even though the channel has been disconnected.
Fortunately, CDR handlers allow to do some post call cleanup work, but in- dialplan implementation would be much better and clearer.
Much better? No. Much clearer, possibly. The benefits of not doing cleanup work in the dialplan AFTER the channel has gone away far outweigh the drawbacks. Use api_hangup_hook and session_in_hangup_hook=true. Doing this stuff outside the dialplan is more efficient and less error-prone.
-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
Definitely. File this one under "duh" -MC On Mon, Oct 18, 2010 at 2:58 PM, Phillip Jones <pjintheusa@gmail.com> wrote:
A cookbook entry perhaps.....
On Mon, Oct 18, 2010 at 5:32 PM, Sergey Okhapkin <sos@sokhapkin.dyndns.org
wrote:
Thank you for the session_in_hangup_hook hint...
On Monday 18 October 2010, Michael Collins wrote:
On Mon, Oct 18, 2010 at 12:40 PM, Sergey Okhapkin
<sos@sokhapkin.dyndns.org>wrote:
The "h" extension in asterisk is a feature I used extensively. Lack of a hangup dialplan handler makes DP programming in FS harder and less clear.
That's what api_hangup_hook is for. Call ends, do an API that can do pretty much anything you can imagine and you're done. You can even set session_in_hangup_hook to true so that you have the channel's variables available even though the channel has been disconnected.
Fortunately, CDR handlers allow to do some post call cleanup work, but in- dialplan implementation would be much better and clearer.
Much better? No. Much clearer, possibly. The benefits of not doing cleanup work in the dialplan AFTER the channel has gone away far outweigh the drawbacks. Use api_hangup_hook and session_in_hangup_hook=true. Doing this stuff outside the dialplan is more efficient and less error-prone.
-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
_______________________________________________ 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 (4)
-
Jeroen C. van Gelderen
-
Michael Collins
-
Phillip Jones
-
Sergey Okhapkin