[Freeswitch-users] dial string variable passing to script

andrzej.ciupek at asterisk.edu.pl andrzej.ciupek at asterisk.edu.pl
Wed Mar 5 10:02:55 MSK 2014


Hello

I would like to send variable value to bash script with  
execute_on_answer action.
For incommig call, I would like to send callerid and my variable from  
dialplan to script,
to identify which internal user has answered the call, here is how it  
looks like:

<condition field="destination_number" expression="^2000$">
<action application="set" data="execute_on_answer=system /root/scripts/test.sh
${local_user}"/>
<action application="bridge"  
data="{local_var_clobber=true}[local_user=1001]user/1001,
[local_user=1000]user/1000"/>
</condition>

So when user 1001 answer I would like to pass to script:

/root/scripts/test.sh 1001

for 1000

/root/scripts/test.sh 1000

In my example ${local_user} is always empty. What am I doing wrong ?

Greetings
Andrzej




Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list