[Freeswitch-users] originate to loopback/answer and park a lua script from another lua script

Michael Collins msc at freeswitch.org
Wed Feb 20 20:36:18 MSK 2013


I think your whole dialplan needs to be in the call to freeswitch.session
like you have in the line that's commented out. It looks to me from the log
that FS is looking for a destination number of "set:job=1234" because
there's no mention of inline when you create the session.

-MC

On Wed, Feb 20, 2013 at 4:03 AM, Karsten Horsmann <khorsmann at gmail.com>wrote:

> Hello Michael,
>
> i create this loop.lua to update the sip username spelling (register
> is not casesensitiv vs. fs is casesensitiv).
>
> Sure i could start the loop.lua with mod_lua as start script.
>
> With the loopback hack i want to simulate an "job control" and maybe
> do some nagios check to be sure
> that the loop.lua is alive (simple grep output of "show channels").
>
> Is there a other way to check that the loop.lua is alive from outside?
>
> I play around with an start.lua to originate the loop.lua at startup.
> But my start.lua didnt work.
> Also an freeswitch.api call from start.lua didnt do the trick. Any hints?
>
> my "start.lua":
> -- new_session =
> freeswitch.Session("loopback/set:job=1234\,answer\,park/default/inline
> lua:loop.lua inline", session)
> new_session = freeswitch.Session("loopback/set:job=1234", session)
> new_session:answer();
> new_session:execute("park/default/inline lua:loop.lua inline")
>
> Got this FS-Log output http://pastebin.freeswitch.org/20595
>
>
> Kind Regards
> Karsten
>
> 2013/2/15 Michael Collins <msc at freeswitch.org>:
> > Can you share with us a small Lua code sample demonstrating what you are
> > trying to do? That might make it easier for us to help.
> >
> > -MC
> >
> > On Fri, Feb 15, 2013 at 3:26 AM, Karsten Horsmann <khorsmann at gmail.com>
> > wrote:
> >>
> >> Hello!
> >>
> >> as described in Anthonys mail
> >>
> >>
> http://lists.freeswitch.org/pipermail/freeswitch-users/2013-January/091769.html
> >> i want also to originate my loop.lua to an loopback channel.
> >>
> >> No problem from fs_cli. I want to originate the loop.lua from my
> >> mod_lua start lua script.
> >>
> >> How can i do this? The freeswitch.Session() didnt work as aspected.
> >>
> >>
> >> --
> >> Kind Regards
> >> *Karsten Horsmann*
> >
> >
> > --
> > Michael S Collins
> > Twitter: @mercutioviz
> > http://www.FreeSWITCH.org
> > http://www.ClueCon.com
> > http://www.OSTAG.org
>
>
>
> --
> Mit freundlichen Grüßen
> *Karsten Horsmann*
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
>
>


-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130220/354f7263/attachment-0001.html 


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