[Freeswitch-users] lcr sql variable

FERNANDO VILLARROEL fvillarroel at yahoo.com
Wed Jun 13 04:00:39 MSD 2012


Hi all.

I need setup some variable like foo to my cdr from lcr :

<param name="export_fields" value="tarifa"/>


<param name="custom_sql" value="select a.tarifa as tarifa ......


Returning Dialstring [lcr_carrier=carrier1,lcr_rate=0.15000,nibble_account=1004,nibble_rate=0.15000,lowbal_amt=0,nobal_amt=0,tarifa=1]user/1006

My dialplan:

<extension name="Outbound to PSTN 11 Digits">
                <condition field="destination_number" expression="^(10[01][0-9])$">
                        <action application="set" data="hangup_after_bridge=false"/>
                        <action application="set" data="continue_on_fail=true"/>
                        <action application="lcr" data="$1 pg_prefix2"/>

                        <action application="set"  data="tarifa=${tarifa}"/>
                        <action application="bridge" data="${lcr_auto_route}"/>
                </condition>
        </extension>

But the log show :

mod_dptools.c:1294 sofia/internal/1004 at 192.168.1.108 SET [tarifa]=[UNDEF]


So how i can get the value of the variable "tarifa" and set for my CDR?

Regards.




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list