Hi Victor. This is my test log call http://pastebin.freeswitch.org/21629 you can see the var tarifa is empty. Give me if you could some example how i can get and set. I see the var ${lcr_auto_route} have var tarifa, how i can parse this var like: <action application="set" data="tarifa=${lcr_auto_route(tarifa)}"/> I do no know how i can do Regards On Saturday, November 16, 2013 3:53 PM, Victor Chukalovskiy <victor.chukalovskiy@gmail.com> wrote: Hi Fernando, I suggest you run <action application="info"/> after lcr query and set "fsctl loglevel 7". Then do a test call. This way you will see where your "tarifa" var goes. -Victor On 13-11-16 01:09 PM, FERNANDO VILLARROEL wrote: Hi Victor thank you for you answer.
If i have:
<profile name="pg_prefix2"> <param name="order_by" value="rate,quality,reliability"/> <param name="export_fields"
value="nibble_account,nibble_rate,lowbal_amt,nobal_amt,lcr_carrierid_field,tarifa"/>
<param name="custom_sql" value=" SELECT l.digits AS lcr_digits, c.id AS lcr_carrierid_field, c.carrier_name AS lcr_carrier_name, l.${lcr_rate_field} as lcr_rate_field, cg.prefix AS lcr_gw_prefix, cg.suffix AS lcr_gw_suffix, l.lead_strip AS lcr_lead_strip, l.trail_strip AS lcr_trail_strip, l.prefix AS lcr_prefix, l.suffix AS lcr_suffix, a.id AS nibble_account, l.${lcr_rate_field} AS nibble_rate, a.warn_limit AS lowbal_amt, a.nobal_limit AS nobal_amt, a.id_tarifa AS tarifa FROM lcr l JOIN carriers c ON l.carrier_id=c.id JOIN carrier_gateway cg ON c.id=cg.carrier_id JOIN auth_user a ON a.id = ${accountcode} JOIN tarifas t ON t.id = a.id_tarifa WHERE c.enabled = '1' AND cg.enabled = '1' AND l.enabled = '1' AND l.digits @> '${lcr_query_digits}' AND CURRENT_TIMESTAMP BETWEEN date_start AND date_end ORDER BY digits DESC, ${lcr_rate_field}, random(); "/> </profile>
How i can set variable tarifa in my dialplan like
<action application="lcr" data="$1 pg_prefix2"/> <action application="set" data="tarifa=${tarifa}"/> <action application="bridge" data="${lcr_auto_route}"/>
Regards
On Saturday, November 16, 2013 2:58 PM, Victor Chukalovskiy <victor.chukalovskiy@gmail.com> wrote:
mod_lcr sets variable that you can use as a dial-strings: ${lcr_auto_route} ${lcr_route_1} ${lcr_route_2} etc.
You can check all the variables with "info" dialplan app.
Not sure if this answers your question.
On 13-11-16 12:30 PM, Fernando Villarroel wrote:
Hi.
How i can set a channel variable from lcr select (mod_lcr)
Or how i can set some variable from ${lcr_auto_route}
Any idea how i can do?
Enviado desde mi iPhone
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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