Re: [Asterisk-Users] Setting Variables
On Tue, 10 May 2005, Daniel Salama wrote: Is it possible to set a variable for an IAX device in iax.conf that can be read from the dial plan (extensions.conf)? If so, can you explain? Use setvar=name_of_var=value_you_want. Peter -- Peter Svensson ! Pgp key available by finger, fingerprint: [EMAIL PROTECTED]! 8A E9 20 98 C1 FF 43 E3 07 FD B9 0A 80 72 70 AF Remember, Luke, your source will be with you... always... ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting Variables
In extensions.conf in the general section you can create globals like: JOHN=IAX2/1234 And then use ${JOHN} in your dial plan to use that device. Alfredo. On 5/10/05, Daniel Salama [EMAIL PROTECTED] wrote: Is it possible to set a variable for an IAX device in iax.conf that can be read from the dial plan (extensions.conf)? If so, can you explain? Thanks, Daniel ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting Variables
Thanks. May be I wasn't clear enough. I have local IAX users as well as remote IAX users (local means to the local network and remote means off net). When I define their profile in iax.conf, I would like to set a variable like LOCAL=1 or LOCAL=0 so that in extensions.conf, I could access them as ${LOCAL}, but LOCAL is never defined in extensions.conf. Instead it is defined in iax.conf. I haven't seen any facilities to define variables in iax.conf, so that's why I asked. Thanks, Daniel On May 10, 2005, at 7:14 PM, Alfredo Manrique wrote: In extensions.conf in the general section you can create globals like: JOHN=IAX2/1234 And then use ${JOHN} in your dial plan to use that device. Alfredo. On 5/10/05, Daniel Salama [EMAIL PROTECTED] wrote: Is it possible to set a variable for an IAX device in iax.conf that can be read from the dial plan (extensions.conf)? If so, can you explain? Thanks, Daniel ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting Variables
at the moment i think is not possible. A workaround can be sending local and remote iax to different context in iax.conf like this [iaxremote] blah... context=remoteiax [iaxlocal] blah context=localiax so in extensions.conf you can do [localiax] exten = s,1,SetVar(local=1) blah... [remoteiax] exten = s,1,SetVar(local=0) blah Best Regards. - moy -- Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org; ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting Variables
This is a good solution. However, I have a regarding this approach: Does this mean that ANY incoming directed to that agent will fall into that context? I have calls coming into the system and being put in a Queue. When the agent is available, the call will be de-queued to the agent. When is the context used in extensions.conf? By the time the call is going to be directed to the agent, the call is already in the system and has gone through several contexts and queued by AppQueue. Thanks, Daniel On May 10, 2005, at 9:11 PM, Moises Silva wrote: at the moment i think is not possible. A workaround can be sending local and remote iax to different context in iax.conf like this [iaxremote] blah... context=remoteiax [iaxlocal] blah context=localiax so in extensions.conf you can do [localiax] exten = s,1,SetVar(local=1) blah... [remoteiax] exten = s,1,SetVar(local=0) blah Best Regards. - moy -- Su nombre es GNU/Linux, no solamente Linux, mas info en http:// www.gnu.org ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users