[Freeswitch-dev] conjure_session for mod_perl.cpp?

Michael Collins msc at freeswitch.org
Fri Aug 26 07:20:18 MSD 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20110825/882fffd0/attachment.html 


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