Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] api_hangup_hook and bash


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
frank at impactfax.com
Guest





PostPosted: Tue Dec 23, 2008 9:11 pm    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with quote

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





PostPosted: Tue Dec 23, 2008 9:28 pm    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with quote

Frank @ Impact <frank@impactfax.com> wrote:
Quote:
Can this command be used to run a bash script?

Based on information at the wiki, this should be possible; use the system
command.
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system


_______________________________________________
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





PostPosted: Wed Dec 24, 2008 1:02 am    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with quote

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:

Quote:
Frank @ Impact <frank@impactfax.com> wrote:
Quote:
Can this command be used to run a bash script?

Based on information at the wiki, this should be possible; use the
system
command.
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system


_______________________________________________
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
Back to top
frank at impactfax.com
Guest





PostPosted: Fri Dec 26, 2008 11:39 am    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with quote

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





PostPosted: Fri Dec 26, 2008 12:01 pm    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with 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
mike at jerris.com
Guest





PostPosted: Fri Dec 26, 2008 3:07 pm    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with quote

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





PostPosted: Fri Dec 26, 2008 3:08 pm    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with 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}"/>



-----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





PostPosted: Fri Dec 26, 2008 3:10 pm    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with quote

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





PostPosted: Fri Dec 26, 2008 3:18 pm    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with quote

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:
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}"/>



-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)
[mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of
Frank @ Impact

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)
[mailto:freeswitch-users-bounces@lists.freeswitch.org (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 (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





PostPosted: Fri Dec 26, 2008 3:24 pm    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with 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
mike at jerris.com
Guest





PostPosted: Fri Dec 26, 2008 3:47 pm    Post subject: [Freeswitch-users] api_hangup_hook and bash Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services