[Users] An error with exec_msg

Daniel-Constantin Mierla daniel at voice-system.ro
Mon Aug 28 15:30:07 CEST 2006


Hello,

On 08/28/06 16:11, Zenone wrote:
> Hi!
> I have an error when I try to run this in my openser.cfg:
>
> exec_msg("TAG=$(echo $SIP_HF_FROM|cut -f2 -d=);FROM=$(echo $SIP_HF_FROM|cut
> -f2 -d\<|cut -f1 -d\>|cut -f1-2
> -d:);/usr/local/openser-1.1.0-tls/uri-folder/record $FROM $SIP_USER $TAG");
>
> The obtained error is:
>
> Aug 28 15:11:21 localhost /usr/local/sbin/openser[32748]:
> ERROR:xl_parse_spec: bad pvar name "echo $SIP_HF_FROM|cut -f2
> -d=);FROM=$(echo $SIP_HF_FROM|cut -f2 -d\<|cut -f1 -d\>|cut -f1-2
> -d:);/usr/local/openser-1.1.0-tls/uri-folder/record $FROM $SIP_USER $TAG"
>   

you get it because the $ is the starter for pseudo-variables and is the 
same for environment variables of shell. Try;

exec_msg("TAG=$(echo $$SIP_HF_FROM|cut -f2 -d=);FROM=$$(echo $$SIP_HF_FROM|cut
-f2 -d\<|cut -f1 -d\>|cut -f1-2
-d:);/usr/local/openser-1.1.0-tls/uri-folder/record $$FROM $$SIP_USER $$TAG");

Cheers,
Daniel



> Thanks in advance for your help!
> Michel
>
> ________________________________________________
> Message sent using UebiMiau 2.7.8
>
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list