[Freeswitch-users] Is there a way to call sofia_contact from chatplan lua script
avi at avimarcus.net
Wed Jul 31 01:53:59 MSD 2013
I have a lua script that does this:
function extension_registered(domain_name, sip_profile, extension)
api = freeswitch.API();
result = api:execute("sofia_contact",
if (result == "error/user_not_registered") then
IIRC, you can hardcode the sip_profile to * and just drop the @domain_name
On Tue, Jul 30, 2013 at 6:22 PM, James Lotery <jlotery at gmail.com> wrote:
> Hello, I'm trying to detect if a user is online within a lua script called
> from a chatplan.
> From what I've read I should use sofia_contact in the chatplan, save the
> output in a custom channel variable and read the variable in my lua script.
> However as there is no session object active i don't see an easy way to
> read my custom channel variable from within my lua script.
> How would you more experienced folks out there do this? I just want to
> know if the user is offline, so that I can send the message via other means
> if they are etc.
> Thanks in advance
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> Official FreeSWITCH Sites
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users