[Users] Exec - environment variables - not found?
Daniel-Constantin Mierla
daniel at voice-system.ro
Sun Feb 4 22:52:58 CET 2007
Hello,
in 1.1.x you can have pseudo-variables in the parameters of exec
functions. In you case, either you do:
exec_msg("echo SIP_SRCIP $si >>/var/log/messages");
or
exec_msg("echo SIP_SRCIP $$SIP_SRCIP >>/var/log/messages");
For more, please see:
http://www.openser.org/docs/modules/1.1.x/exec.html#AEN118
http://www.openser.org/dokuwiki/doku.php/pseudovariables:1.1.x
Cheers,
Daniel
On 02/04/07 22:27, Kjell Arild Frigstad wrote:
> Hello!
> I have just upgraded from 1.0.0 til 1.1.1, and I having problem with
> exec_msg (the exec_msg working, but environment variabels is "not found".)
> It was OK in 1.0.0 version.
>
> The coding:
>
> exec_msg("echo SIP_SRCIP $SIP_SRCIP >>/var/log/messages");
>
> At startup (with debuggging) :
>
> 0(0) fixing exec_msg, line 160
> 0(0) xl_parse_format: parsing [echo SIP_SRCIP $SIP_SRCIP
>
>>> /var/log/messages]
>>>
> 0(0) xl_lookup_spec_name: not found [SIP_SRCIP]
> 0(0) xl_parse_format: format parsed OK: [2] items
>
> Error message when running the command (with debugging) :
>
> 0(28888) xl_get_spec_value: error - null sp->itf
> 0(28888) exec:w_exec_msg: executing [echo SIP_SRCIP >>/var/log/messages]
>
> Error message when running in "normal" mode
>
> Feb 4 21:51:24 test /usr/local/sbin/openser[28947]: xl_get_spec_value:
> error - null sp->itf
> SIP_SRCIP
>
>
> As you see the text SIP_SRCIP is beeing displayd, but not the variabel.
>
> Any ide what can bee wrong?
>
> Best regards
> K.A.Frigstad
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list