Passing channel variables into a new channel

Does anyone know how to pass variables into a channel.

I.e. I have an incomming CAPI channel, the user enters some numbers (Job number for example) which are stored via ‘Read($VAR,audiofile,digits)’, then based on the entered number, dials the appropriate internal extension (Person who owns that job for example) (I.e. Entered number does not equal extension).

When i issue the Dial, a new channel is generated, but i want the channel variables collected and stored in the incomming CAPI channel to be passed/available in the new SIP channel from the Dial before bridging.

Please Please Help.

If the dialed channel is SIP, SIPAddHeader() can help. Otherwise the D() tag could be used.

also, please don’t cross-post … it’s considered rude and probably won’t increase the chance of your question being answered.

Thankyou for your responses.
I am very sorry for cross pointing.

Am just desperate and wasn’t sure which thread this belongs in.

Thank you for your help, and sorry if i was being rude.

I am using ‘Set’ in my dial plan, but that only enables me to set channel variables local to that channel. I need to get the variables im setting into the new Dial SIP channel i am going to bridge to.

How does Set with ‘_’ or ‘__’ work regarding inheritance???

I’ll give SIPAddHeader a go as i am truing the get the variables into Dial(SIP/255).

Also what is the D() tag, can’t find anything on this???
Thank you everyone for your comments. Thank you.

Sorry for cross pointing.

THANK YOU THANK YOU THANK YOU!!! :smiley:

Using Set with ‘_’ and ‘__’ worked.
Whats the difference between them???

Thank you.

Depending on your version, such are explained in either README.variables or channelvariables.txt in the doc/ directory. Always good to read documents in that directory.