[Users] An error with exec_msg

Michel Zenone zenone at telip.com
Mon Aug 28 16:27:46 CEST 2006


Thanks! It seems to work now!

Michel

On Mon, 2006-08-28 at 17:17 +0300, Daniel-Constantin Mierla wrote:
> Hello,
> 
> 
> On 08/28/06 16:34, Michel Zenone wrote:
> > Hi Daniel!
> > I have just tried your solution and it doesn't work... Have you got
> > another idea?
> > Thanks!
> > Michel
> >
> > On Mon, 2006-08-28 at 16:30 +0300, Daniel-Constantin Mierla wrote:
> >   
> >> 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");
> >>     
> 
> I forgot to add a $ at beginning -- 'TAG=$(' -- just to have it clear, 
> be sure that $ is doubled for environment variables:
> 
> 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
> 
> 
> 
> >> 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