Setting automatic vars on sip channel

Hi all
I would like to use in sip.conf the command ‘setvar=…’ to pass some specific info (automatically) to the channel created by asterisk. I saw that this variables are created only for incoming channels and not for channels generated in outgoing (from sip_request …). I’m trying to resolve this issue with a lot of creativity but without success. Have you some idea ??? I want avoid to produce a patch for this.

Thanks in advance
gionni

gionini,

Why not simply adding before the Dial the Set command.
You can run before th Dial an AGI script to set the variable.

zvk

Hi zvik,

my problem is set the right variables for outgoing channels created by the Dial appls as well other appls. I’m looking for configurations that I can use to give to the channels their variables independently form the operations on the dialplan.

gionni

Hi zvik,

my problem is set the right variables for outgoing channels created by the Dial appls as well other appls. I’m looking for configurations that I can use to give to the channels their variables independently form the operations on the dialplan.

gionni

gionini,

I am not sure what you try to do, so I cannot give you a proper advice.
However, as last resource you can use ast_set_variables routine.
You will have of course to edit one of the source files like the channel.c.

zvik