Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] Hangup hook in js is never called


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





PostPosted: Fri Feb 13, 2009 5:34 pm    Post subject: [Freeswitch-users] Hangup hook in js is never called Reply with quote

Can’t figure this one out.

I’ve enabled a hang-up hook in js to do some cleanup.

I’ve followed the example on the wiki, but it would appear it’s never called.

http://wiki.freeswitch.org/wiki/Example_Hangup_hook

Is the code in error?

Regards
Back to top
msc at freeswitch.org
Guest





PostPosted: Fri Feb 13, 2009 5:52 pm    Post subject: [Freeswitch-users] Hangup hook in js is never called Reply with quote

Quote:
http://wiki.freeswitch.org/wiki/Example_Hangup_hook



Is the code in error?


It might just be. I think you are better off using api_hangup_hook.
What are you trying to do on hangup? The api_hangup_hook lets you call
any API, including running a script. Here's an example that we played
with today that I haven't even put on the wiki yet. I renames the wav
file after the call is hung up.

<!-- Mikey's minimal test case for Bougyman's api_hangup_up thingymabob -->
<extension name="api_hangup_hook filename change test thingy">
<condition field="destination_number" expression="^(1990)$">
<!-- Just do something simple - in this case x-fer caller to 9888 -->
<action application="answer"/>
<action application="record_session" data="/tmp/${uuid}.wav"/>
<action application="set" data="api_hangup_hook=system mv
/tmp/${uuid}.wav /tmp/${uuid}-DONE.wav"/>
<action application="log" data="INFO HOOK: '${api_hangup_hook}'"/>
<action application="transfer" data="9888"/>
</condition>
</extension>


-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
nik.middleton at noble...
Guest





PostPosted: Fri Feb 13, 2009 6:09 pm    Post subject: [Freeswitch-users] Hangup hook in js is never called Reply with quote

I'm trying to capture the hang-up reason and write it to the db (Was it
busy etc). I also close the db in that function. That way I know I
don't have any open connections. This is in JavaScript BTW

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Michael Collins
Sent: 13 February 2009 22:51
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Hangup hook in js is never called

Quote:
http://wiki.freeswitch.org/wiki/Example_Hangup_hook



Is the code in error?


It might just be. I think you are better off using api_hangup_hook.
What are you trying to do on hangup? The api_hangup_hook lets you call
any API, including running a script. Here's an example that we played
with today that I haven't even put on the wiki yet. I renames the wav
file after the call is hung up.

<!-- Mikey's minimal test case for Bougyman's api_hangup_up
thingymabob -->
<extension name="api_hangup_hook filename change test thingy">
<condition field="destination_number" expression="^(1990)$">
<!-- Just do something simple - in this case x-fer caller to 9888
-->
<action application="answer"/>
<action application="record_session" data="/tmp/${uuid}.wav"/>
<action application="set" data="api_hangup_hook=system mv
/tmp/${uuid}.wav /tmp/${uuid}-DONE.wav"/>
<action application="log" data="INFO HOOK: '${api_hangup_hook}'"/>
<action application="transfer" data="9888"/>
</condition>
</extension>


-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
Back to top
alex at sinapticode.ro
Guest





PostPosted: Sun Feb 15, 2009 3:50 am    Post subject: [Freeswitch-users] Hangup hook in js is never called Reply with quote

I'm using the CDR logs for that, because I need other info as well.

To make the connection between a log-file and a DB record, I'm passing a
custom channel variable on originate.

I've written a short article about it, but as the other one, it's a
draft:
http://alexn.org/docs/dialer_part_2.html


On Fri, 2009-02-13 at 23:07 +0000, Nik Middleton wrote:
Quote:
I'm trying to capture the hang-up reason and write it to the db (Was it
busy etc). I also close the db in that function. That way I know I
don't have any open connections. This is in JavaScript BTW

-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Michael Collins
Sent: 13 February 2009 22:51
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Hangup hook in js is never called

Quote:
http://wiki.freeswitch.org/wiki/Example_Hangup_hook



Is the code in error?


It might just be. I think you are better off using api_hangup_hook.
What are you trying to do on hangup? The api_hangup_hook lets you call
any API, including running a script. Here's an example that we played
with today that I haven't even put on the wiki yet. I renames the wav
file after the call is hung up.

<!-- Mikey's minimal test case for Bougyman's api_hangup_up
thingymabob -->
<extension name="api_hangup_hook filename change test thingy">
<condition field="destination_number" expression="^(1990)$">
<!-- Just do something simple - in this case x-fer caller to 9888
-->
<action application="answer"/>
<action application="record_session" data="/tmp/${uuid}.wav"/>
<action application="set" data="api_hangup_hook=system mv
/tmp/${uuid}.wav /tmp/${uuid}-DONE.wav"/>
<action application="log" data="INFO HOOK: '${api_hangup_hook}'"/>
<action application="transfer" data="9888"/>
</condition>
</extension>


-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


_______________________________________________
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