[Freeswitch-dev] mod lua session:bridged() not implemented?
msc at freeswitch.org
Mon Mar 8 09:33:42 PST 2010
I think you might be looking at the wrong tool. The session:bridged() method
is for knowing if the current session is bridged to another leg. Tony says
it has a very specific use case and I doubt that this is what they had in
If you're building a predictive dialer and you are generating the outbound
call leg then you're most likely in need of knowing that the far end has
answered. In a case like this I would build a dialplan extension and have
the b leg drop in there. Then set execute_on_answer to your lua script. You
could also use that dialplan to handle timeouts, call failures, etc. This
way you're letting the dialplan do what it's good at and your Lua script can
focus on the single task of handling an answered call...
On Mon, Mar 8, 2010 at 5:30 AM, rentmycoder rentmycoder <
rentmycoder at gmail.com> wrote:
> Hi Guys,
> Freeswitch rocks!
> According to the wiki page I could use (session:bridged() to check if
> session is bridged...
> if (session:bridged() == true) do
> -- Do something
> But in latest trunk session:bridged() retuns nil...
> If I list the session functions like this:
> session:bridged is not in the list...
> Do you plan to implement this function?
> How can I detect a bridge on the other leg in lua?
> I need this to create an automatic predictive dialer, which dials
> customers and if the customer picks up the phone the lua script plays
> a message and transfers the other leg to an operator...
> I start the call using event-socket api originate and bridges the
> customer with a loopback lua script:
> "api originate
> '&lua(cc.lua predictive)'"
> In the lua script I would have to wait for the a-leg to bridge, how to
> achive this without session:bridged()?
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-dev