View previous topic :: View next topic |
Author |
Message |
frank at impactfax.com Guest
|
Posted: Tue Dec 23, 2008 9:11 pm Post subject: [Freeswitch-users] api_hangup_hook and bash |
|
|
Can this command be used to run a bash script?
I wanted to do some sox processing on some recordings after the bridge ends and thought I should use this command. But would like to do it in bash.
Is there a better way?
If this is the right way, what is the syntax for calling the bash script with some arguments? |
|
Back to top |
|
|
jason at jasonjgw.net Guest
|
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Wed Dec 24, 2008 1:02 am Post subject: [Freeswitch-users] api_hangup_hook and bash |
|
|
I'm pretty sure that this is doable. Could you give us a hint as to
what arguments you want to send? For example, do you have one or more
channel variables you'd like to pass to the shell script?
-MC
Sent from my iPhone
On Dec 23, 2008, at 6:25 PM, Jason White <jason@jasonjgw.net> wrote:
_______________________________________________
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 |
|
Back to top |
|
|
frank at impactfax.com Guest
|
Posted: Fri Dec 26, 2008 11:39 am Post subject: [Freeswitch-users] api_hangup_hook and bash |
|
|
All I am passing into the script is the recording file name.
I tried using the system command right after the bridge command but
before a hangup command. Thusly,
<action application="bridge" data="${enum_auto_route}"/>
<action application="system" data="/root/procrecording.sh
$${base_dir}/recordings/12-26-11_10_23_55555555_444444444_1.wav"/>
<action application="hangup"/>
The problem I am seeing is that sometimes this script gets run and
sometimes it does not. I think it has to do maybe with which end hangs
up the phone. But I cannot seem to nail it down just yet...
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Michael S Collins
I'm pretty sure that this is doable. Could you give us a hint as to
what arguments you want to send? For example, do you have one or more
channel variables you'd like to pass to the shell script?
-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 |
|
Back to top |
|
|
frank at impactfax.com Guest
|
Posted: Fri Dec 26, 2008 12:01 pm Post subject: [Freeswitch-users] api_hangup_hook and bash |
|
|
I have confirmed that this system call does not fire if the calling
party hangs up the phone first. Is there a way to get the script to
fire regardless of who hangs up first?
-F
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Frank @ Impact
<action application="bridge" data="${enum_auto_route}"/>
<action application="system" data="/root/procrecording.sh
$${base_dir}/recordings/12-26-11_10_23_55555555_444444444_1.wav"/>
<action application="hangup"/>
The problem I am seeing is that sometimes this script gets run and
sometimes it does not. I think it has to do maybe with which end hangs
up the phone. But I cannot seem to nail it down just yet...
_______________________________________________
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 |
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Fri Dec 26, 2008 3:07 pm Post subject: [Freeswitch-users] api_hangup_hook and bash |
|
|
This is correct, if the a leg hangs up it will not continue to run the
dialplan actions.
On Dec 26, 2008, at 11:57 AM, Frank @ Impact wrote:
Quote: | I have confirmed that this system call does not fire if the calling
party hangs up the phone first. Is there a way to get the script to
fire regardless of who hangs up first?
-F
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Frank @ Impact
<action application="bridge" data="${enum_auto_route}"/>
<action application="system" data="/root/procrecording.sh
$${base_dir}/recordings/12-26-11_10_23_55555555_444444444_1.wav"/>
<action application="hangup"/>
The problem I am seeing is that sometimes this script gets run and
sometimes it does not. I think it has to do maybe with which end
hangs
up the phone. But I cannot seem to nail it down just yet...
|
_______________________________________________
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 |
|
Back to top |
|
|
frank at impactfax.com Guest
|
Posted: Fri Dec 26, 2008 3:08 pm Post subject: [Freeswitch-users] api_hangup_hook and bash |
|
|
I also tried this without success. This will not fire at all regardless
of who hangs up.
<action application="set" data="api_hangup_hook=system /root/test.sh
$${base_dir}/recordings/9000_1.wav"/>
<action application="bridge" data="${enum_auto_route}"/>
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Frank @ Impact
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Frank @ Impact
<action application="bridge" data="${enum_auto_route}"/>
<action application="system" data="/root/procrecording.sh
$${base_dir}/recordings/12-26-11_10_23_55555555_444444444_1.wav"/>
<action application="hangup"/>
The problem I am seeing is that sometimes this script gets run and
sometimes it does not. I think it has to do maybe with which end hangs
up the phone. But I cannot seem to nail it down just yet...
_______________________________________________
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 |
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Fri Dec 26, 2008 3:10 pm Post subject: [Freeswitch-users] api_hangup_hook and bash |
|
|
This should work, is there any debug output at hangup that would
indicate why it doesn't run?
Mike
On Dec 26, 2008, at 2:57 PM, Frank @ Impact wrote:
Quote: | I also tried this without success. This will not fire at all
regardless
of who hangs up.
<action application="set" data="api_hangup_hook=system /root/test.sh
$${base_dir}/recordings/9000_1.wav"/>
<action application="bridge" data="${enum_auto_route}"/>
|
_______________________________________________
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 |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Fri Dec 26, 2008 3:18 pm Post subject: [Freeswitch-users] api_hangup_hook and bash |
|
|
Frank,
I'm going to check this out as soon as I can get my test system back on line. Thanks.
-MC
P.S. - what FS version and OS version are you on? I test with latest trunk and CentOS 5.2
On Fri, Dec 26, 2008 at 11:57 AM, Frank @ Impact <frank@impactfax.com (frank@impactfax.com)> wrote:
|
|
Back to top |
|
|
frank at impactfax.com Guest
|
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Fri Dec 26, 2008 3:47 pm Post subject: [Freeswitch-users] api_hangup_hook and bash |
|
|
There is no way to make the dialplan continue to run when you hang up
the a leg, that is correct.
Mike
On Dec 26, 2008, at 3:20 PM, Frank @ Impact wrote:
Quote: | I also tried to add this
<action application="set" data="hangup_after_bridge=false"/>
to keep the dialplan process on a-leg hangup. But that did not work
either.
Svn 10960 is what I am testing.
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Michael Jerris
This is correct, if the a leg hangs up it will not continue to run the
dialplan actions.
|
_______________________________________________
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 |
|
Back to top |
|
|
|