[Freeswitch-dev] conjure_session for mod_perl.cpp?

Anthony Minessale anthony.minessale at gmail.com
Fri Aug 26 19:31:25 MSD 2011


update and try now.

btw if all you need is channel data there is a magic event regardless
of session in hanguphook called $env

try print $env->serialize;

this is a normal even just like the ones in the other areas.



On Thu, Aug 25, 2011 at 10:20 PM, Michael Collins <msc at freeswitch.org> wrote:
> Guys,
> I see that Lua and Python both have a mod_xxx_conjure_session method. If I
> understand correctly this method is necessary for session_in_hangup_hook to
> work (please correct me if I'm wrong). I'd like to see mod_perl have the
> ability to do session_in_hangup_hook stuff. Right now when you set
> session_in_hangup_hook=true and run a perl script from a hook you get this
> error:
> 2011-08-25 20:09:57.881203 [DEBUG] switch_ivr_originate.c:1879 Parsing
> global variables
> 2011-08-25 20:09:57.881203 [ERR] switch_core_session.c:413 Could not locate
> channel type e0ff8d18-cf90-11e0-a42e-474e765f4808
> 2011-08-25 20:09:57.881203 [NOTICE] switch_ivr_originate.c:2453 Cannot
> create outgoing channel of type [e0ff8d18-cf90-11e0-a42e-474e765f4808]
> cause: [CHAN_NOT_IMPLEMENTED]
> 2011-08-25 20:09:57.881203 [DEBUG] switch_ivr_originate.c:3318 Originate
> Resulted in Error Cause: 66 [CHAN_NOT_IMPLEMENTED]
> 2011-08-25 20:09:57.881203 [DEBUG] switch_core_state_machine.c:507 Hangup
> Command with Session perl(hook.pl e0ff4b1e-cf90-11e0-a42d-474e765f4808):
> Dialplan snippet for the above:
>   <extension name="perl test">
>     <condition field="destination_number" expression="^9902$">
>       <action application="answer"/>
>       <action application="set" data="session_in_hangup_hook=1"/>
>       <action application="set" data="api_hangup_hook=perl hook.pl
> ${uuid}"/>
>       <action application="log" data="WARNING Do the hook!"/>
>       <action application="hangup"/>
>     </condition>
>   </extension>
> If you comment out the session_in_hangup_hook=true then the script runs just
> fine. (nothing interesting in the script, just dumps ${uuid} to a text
> file.)
> Anyway, I'm assuming we need the conjure_session method in mod_perl.c. For
> those familiar with the SWIG'd languages - can you hum a few bars and let me
> know what's involved in enabling this method?
> Thanks
> MC
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list