[Freeswitch-users] Setting hangup hook from Perl?

Nic Wolff nic at foneshow.com
Sun Sep 7 21:47:18 PDT 2008


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:

> 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 at foneshow.com> wrote:
>> 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:
>>
>>> 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 at foneshow.com> wrote:
>>>> 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 at 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 at 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 at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list