Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] Setting hangup hook from Perl?


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





PostPosted: Sun Sep 07, 2008 1:56 am    Post subject: [Freeswitch-users] Setting hangup hook from Perl? Reply with quote

How do I set a hangup hook function in a Perl application called from
the dialplan? After looking at freeswitch.pm I tried these:

freeswitch::setHangupHook( &on_hangup );

$session->setHangupHook( &on_hangup );

but both failed with errors. Thanks -

Nic

_______________________________________________
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
sheeju.alex at gmail.com
Guest





PostPosted: Sun Sep 07, 2008 8:40 pm    Post subject: [Freeswitch-users] Setting hangup hook from Perl? Reply with quote

Try this...it should work

$session->setAutoHangup(false);
OR
$session->hangup("USER_BUSY"); or without any parameter for normal_clearing

/SA


On Sun, Sep 7, 2008 at 12:24 PM, Nic Wolff <nic@foneshow.com> wrote:
Quote:
How do I set a hangup hook function in a Perl application called from
the dialplan? After looking at freeswitch.pm I tried these:

freeswitch::setHangupHook( &on_hangup );

$session->setHangupHook( &on_hangup );

but both failed with errors. Thanks -

Nic

_______________________________________________
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
nic at foneshow.com
Guest





PostPosted: Sun Sep 07, 2008 9:04 pm    Post subject: [Freeswitch-users] Setting hangup hook from Perl? Reply with quote

Thanks but I think that would let me terminate the script without
hanging up the call, which isn't what I need - I need to run a certain
subroutine when the user hangs up while the script is running. When I
try to duplicate the Javascript example at h

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

I get

No matching function for overloaded 'Session_setHangupHook'

Any help will be greatly appreciated, thanks -

Nic

On Sep 7, 2008, at 9:38 PM, Sheeju Alex wrote:

Quote:
Try this...it should work

$session->setAutoHangup(false);
OR
$session->hangup("USER_BUSY"); or without any parameter for
normal_clearing

/SA


On Sun, Sep 7, 2008 at 12:24 PM, Nic Wolff <nic@foneshow.com> wrote:
Quote:
How do I set a hangup hook function in a Perl application called from
the dialplan? After looking at freeswitch.pm I tried these:

freeswitch::setHangupHook( &on_hangup );

$session->setHangupHook( &on_hangup );

but both failed with errors. Thanks -

Nic

_______________________________________________
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
sheeju.alex at gmail.com
Guest





PostPosted: Sun Sep 07, 2008 11:35 pm    Post subject: [Freeswitch-users] Setting hangup hook from Perl? Reply with quote

HI Nic,

Can you paste the perl script that you are trying out?

SA

On Mon, Sep 8, 2008 at 7:32 AM, Nic Wolff <nic@foneshow.com> wrote:
Quote:
Thanks but I think that would let me terminate the script without
hanging up the call, which isn't what I need - I need to run a certain
subroutine when the user hangs up while the script is running. When I
try to duplicate the Javascript example at h

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

I get

No matching function for overloaded 'Session_setHangupHook'

Any help will be greatly appreciated, thanks -

Nic

On Sep 7, 2008, at 9:38 PM, Sheeju Alex wrote:

Quote:
Try this...it should work

$session->setAutoHangup(false);
OR
$session->hangup("USER_BUSY"); or without any parameter for
normal_clearing

/SA


On Sun, Sep 7, 2008 at 12:24 PM, Nic Wolff <nic@foneshow.com> wrote:
Quote:
How do I set a hangup hook function in a Perl application called from
the dialplan? After looking at freeswitch.pm I tried these:

freeswitch::setHangupHook( &on_hangup );

$session->setHangupHook( &on_hangup );

but both failed with errors. Thanks -

Nic

_______________________________________________
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


_______________________________________________
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
nic at foneshow.com
Guest





PostPosted: Mon Sep 08, 2008 11:13 am    Post subject: [Freeswitch-users] Setting hangup hook from Perl? Reply with quote

Thanks, I think I've figured it - that confusing error was SWIG
telling me that I had the function parameter types wrong. As a Perl
guy I assumed that setHangupHook would take a subroutine pointer - in
fact it wants the name of the subroutine as a string.

Is there anywhere with real documentation for these things?

Thanks for the offer of help -

Nic

On Sep 8, 2008, at 12:33 AM, Sheeju Alex wrote:

Quote:
HI Nic,

Can you paste the perl script that you are trying out?

SA

On Mon, Sep 8, 2008 at 7:32 AM, Nic Wolff <nic@foneshow.com> wrote:
Quote:
Thanks but I think that would let me terminate the script without
hanging up the call, which isn't what I need - I need to run a
certain
subroutine when the user hangs up while the script is running. When I
try to duplicate the Javascript example at h

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

I get

No matching function for overloaded 'Session_setHangupHook'

Any help will be greatly appreciated, thanks -

Nic

On Sep 7, 2008, at 9:38 PM, Sheeju Alex wrote:

Quote:
Try this...it should work

$session->setAutoHangup(false);
OR
$session->hangup("USER_BUSY"); or without any parameter for
normal_clearing

/SA


On Sun, Sep 7, 2008 at 12:24 PM, Nic Wolff <nic@foneshow.com> wrote:
Quote:
How do I set a hangup hook function in a Perl application called
from
the dialplan? After looking at freeswitch.pm I tried these:

freeswitch::setHangupHook( &on_hangup );

$session->setHangupHook( &on_hangup );

but both failed with errors. Thanks -

Nic

_______________________________________________
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


_______________________________________________
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
wasim at convergence.pk
Guest





PostPosted: Mon Sep 08, 2008 12:09 pm    Post subject: [Freeswitch-users] Setting hangup hook from Perl? Reply with quote

On Mon, Sep 8, 2008 at 10:47 AM, Nic Wolff <nic@foneshow.com (nic@foneshow.com)> wrote:

Quote:
Thanks, I think I've figured it - that confusing error was SWIG
telling me that I had the function parameter types wrong. As a Perl
guy I assumed that setHangupHook would take a subroutine pointer - in
fact it wants the name of the subroutine as a string.

Is there anywhere with real documentation for these things?

Please add under http://wiki.freeswitch.org/wiki/Mod_perl



--
wasim h. baig | principal consultant | convergence pk | +92 300 8508070
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