[Freeswitch-dev] Accessing Custom Header in REGISTER packets
Brian West
brian at freeswitch.org
Wed Dec 4 18:52:48 MSK 2013
Let me guess you’re trying accessing the session during hangup?
http://wiki.freeswitch.org/wiki/Variable_session_in_hangup_hook
--
Brian West
brian at freeswitch.org
FreeSWITCH Solutions, LLC
PO BOX 2531
Brookfield, WI 53008-2531
Twitter: @FreeSWITCH_Wire , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST
iNUM: +883 5100 1420 9001
ISN: 410*543
Skype:briankwest
PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Dec 3, 2013, at 5:07 PM, Mark Tsai <twkid at yahoo.com> wrote:
> I now have the following lines added in
>
> lua.conf ---
> <param name="xml-handler-script" value="$${base_dir}/scripts/dir.lua"/>
> <param name="xml-handler-bindings" value="directory" />
>
> dir.lua ---
> freeswitch.consoleLog("info", params:serialize("xml") .. "\n")
> // Do some api check here to decide allow REGISTER or not
> session:hangup();
>
> I am able to see the custom header with the consoleLog on params
> but if I try to stop this incoming REGISTER request using the hangup() call
> I get FS complaining about "attempt to index global 'session' (a nil value)"
>
> How can I go about locating this incoming REGISTER that's not a session yet?
>
> thanks again for the help,
> Mark
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20131204/da2c7a36/attachment.bin
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-dev
mailing list