[Freeswitch-users] Bridge destination returned from a python script?

Michael Collins msc at freeswitch.org
Tue Jan 20 07:36:33 PST 2009

On Mon, Jan 19, 2009 at 4:20 PM, Brian Deacon <bdeacon at highergear.com> wrote:
> Greetings my soon-to-be-BFF's  :)
> After the last 6 weeks or so thrashing about in the land of Asterisk, I
> must say I'm quite impressed with what I'm learning about FreeSwitch.
> So the scenario I'm trying to deal with is bridging a call between two
> not-internal endpoints where the numbers to connect are determined by
> database-fed business logic.
> The recipe here is very close to what I need:
> http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate#exec_in_answer_confirm
> Except that I'm a language snob and would greatly prefer python to
> javascript.  :)
> So my minor question is can this line:
> <action application="set" data="group_confirm_file=javascript test.js"/>
> Become this line:
> <action application="set" data="group_confirm_file=python foo.bar.baz"/>
> But javascript isn't a deal-breaker.  I have two bridging scenarios that
> were too tricky for me in asterisk land.  (And my apologies, I'm new to
> telephony, so I don't have the lingo down).  Our FS server would be
> reachable by multiple 800 numbers.  Based on the number that was dialed
> to reach our FS server, we would look up an external phone number +
> extension to be part 1 of a bridge (which we would use the
> group_confirm_file script to make sure we had gotten past the IVR).  So
> for that scenario, how would I accomplish something like:
> <action application="bridge" data="
> ${someVariableSetByScript}"/>
> Can my foo.bar.baz script make a session.setVariable call that I could
> drop into data=""?

If I understand your scenario correctly then I would say that your
best bet would be the recently added mod_easyroute, which was designed
specifically for this purpose. Check out this article and the related
wiki page:

> My other scenario is similar, but we need to externally signal the FS
> server to place a call to phone + extension, confirm it was connected,
> and then bridge it to a DID.  Is XmlRpc the best (only?) way to poke FS
> into doing something?

When you say "externally signal" do you mean you have a 3rd party
application (or something) that needs to talk to FS? Could you detail
the scenario a bit more? I'm positive FS can do what you want but with
more detail we can help you find the best way to do it.

> Thanks muchly!
> Brian
> _______________________________________________
> 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

More information about the FreeSWITCH-users mailing list