Hi guys, Freeswitch Rocks! Does anybody know how to export variables from the b-leg to a-leg... I start a bridge from lua on an outgoing gateway and on the answer of the b-leg I would like to set a variable on the a-leg... <action application="export" data="nolocal:execute_on_answer=lua cc.lua extensions_answer ${uuid}"/> <bridge ....> from cc.lua I try: session:execute("export", "foo=123"); but no success... any hint?
On Fri, Mar 19, 2010 at 6:01 AM, rentmycoder rentmycoder < rentmycoder@gmail.com> wrote:
Hi guys, Freeswitch Rocks!
Does anybody know how to export variables from the b-leg to a-leg... I start a bridge from lua on an outgoing gateway and on the answer of the b-leg I would like to set a variable on the a-leg...
<action application="export" data="nolocal:execute_on_answer=lua cc.lua extensions_answer ${uuid}"/> <bridge ....>
from cc.lua I try: session:execute("export", "foo=123");
but no success... any hint?
Sorry, I meant to discuss this earlier. If you know the uuid of the A leg then just use uuid_setvar API: api = freeswitch.API(); res = api:execute("uuid_setvar", a_leg_uuid .. " " .. chan_var .. " " .. chan_var_val) -MC
Can it be done in the dial plan, and without knowing the UUID? I'm using the regular bind_meta_app and transfer in the feature dialplan. I need to set a special variable for my system when the actual transfer command is about to be executed in the dial plan on the a-leg. On Wed, Mar 24, 2010 at 1:27 AM, Michael Collins <msc@freeswitch.org> wrote:
On Fri, Mar 19, 2010 at 6:01 AM, rentmycoder rentmycoder < rentmycoder@gmail.com> wrote:
Hi guys, Freeswitch Rocks!
Does anybody know how to export variables from the b-leg to a-leg... I start a bridge from lua on an outgoing gateway and on the answer of the b-leg I would like to set a variable on the a-leg...
<action application="export" data="nolocal:execute_on_answer=lua cc.lua extensions_answer ${uuid}"/> <bridge ....>
from cc.lua I try: session:execute("export", "foo=123");
but no success... any hint?
Sorry, I meant to discuss this earlier. If you know the uuid of the A leg then just use uuid_setvar API:
api = freeswitch.API(); res = api:execute("uuid_setvar", a_leg_uuid .. " " .. chan_var .. " " .. chan_var_val)
-MC
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Jonas Gauffin
-
Michael Collins
-
rentmycoder rentmycoder