Set Variable in Dial String from Lua Script
I am using a lua script in Freeswitch.The routes are generated from SQL queries. And there may be several trunks output.For that I use bridge failover: bridge({ignore_early_media=false}[nobal_amt=-250,execute_on_post_originate=limit hash outbound NameTrunk 500 !NORMAL_TEMPORARY_FAILURE,gateway=4]sofia/gateway/NameTrunk/xxxxxxxxxxxxx|[nobal_amt=-250,execute_on_post_originate=limit hash outbound NameTrunk2 500 !NORMAL_TEMPORARY_FAILURE,gateway=5]sofia/gateway/NameTrunk2/xxxxxxxxxxxxx) The problem are the channels variable in dial strings, these are not stored in the XML CDR or CDR CSV and do not know the variable "gateway" (gateway=4 or gateway=5). It is very important that I can save channels variables that are in dial strings. Any ideas? Thanks!
I'm testing with another Freeswitch system for sending Fax. Send faxes with "api originate" and it works. But with a bridge does not work... From: ximop_22@hotmail.com To: freeswitch-users@lists.freeswitch.org Subject: Set Variable in Dial String from Lua Script Date: Wed, 26 Aug 2015 19:20:45 +0200 I am using a lua script in Freeswitch.The routes are generated from SQL queries. And there may be several trunks output.For that I use bridge failover: bridge({ignore_early_media=false}[nobal_amt=-250,execute_on_post_originate=limit hash outbound NameTrunk 500 !NORMAL_TEMPORARY_FAILURE,gateway=4]sofia/gateway/NameTrunk/xxxxxxxxxxxxx|[nobal_amt=-250,execute_on_post_originate=limit hash outbound NameTrunk2 500 !NORMAL_TEMPORARY_FAILURE,gateway=5]sofia/gateway/NameTrunk2/xxxxxxxxxxxxx) The problem are the channels variable in dial strings, these are not stored in the XML CDR or CDR CSV and do not know the variable "gateway" (gateway=4 or gateway=5). It is very important that I can save channels variables that are in dial strings. Any ideas? Thanks!
you can try setting those variables as channel variables before bridging, then put them into the cdr template... -giovanni On Thu, Aug 27, 2015 at 11:00 AM, Ximo Peral <ximop_22@hotmail.com> wrote:
I'm testing with another Freeswitch system for sending Fax. Send faxes with "api originate" and it works. But with a bridge does not work...
------------------------------ From: ximop_22@hotmail.com To: freeswitch-users@lists.freeswitch.org Subject: Set Variable in Dial String from Lua Script Date: Wed, 26 Aug 2015 19:20:45 +0200
I am using a lua script in Freeswitch.
The routes are generated from SQL queries. And there may be several trunks output.
For that I use bridge failover:
*bridge({ignore_early_media=false}[nobal_amt=-250,execute_on_post_originate=limit hash outbound NameTrunk 500 !NORMAL_TEMPORARY_FAILURE,gateway=4]sofia/gateway/NameTrunk/xxxxxxxxxxxxx|[nobal_amt=-250,execute_on_post_originate=limit hash outbound NameTrunk2 500 !NORMAL_TEMPORARY_FAILURE,gateway=5]sofia/gateway/NameTrunk2/xxxxxxxxxxxxx)*
The problem are the channels variable in dial strings, these are not stored in the XML CDR or CDR CSV and do not know the variable "gateway" (gateway=4 or gateway=5). It is very important that I can save channels variables that are in dial strings.
Any ideas? Thanks!
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
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
-- Sincerely, Giovanni Maruzzelli Cell : +39-347-2665618
participants (2)
-
Giovanni Maruzzelli
-
Ximo Peral