In my 1.4 and 10.0 experience, there are two types of variables. Call/Local
variables that "live" for the duration of the current call only and Global
variables that are set and live on until Asterisk is restarted. I can do
set(foo=${CALLERID(num)) and use ${foo} anywhere in my dialplan. I can do
Set(GLOBAL(lastcaller)=${CALLERID(num)}) and see that my last caller was
${lastcaller} from any concurrent or later call.
From: [email protected]
[mailto:[email protected]] On Behalf Of amit anand
Sent: Monday, October 24, 2011 6:44 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Storing a variable at a context and using it
in another context
Declare the global variable
On Mon, Oct 24, 2011 at 15:16, bilal ghayyad <[email protected]> wrote:
Hi All;
Is it possible to store a variable at context and using it in another
context or in the MACRO? For example, how I can store the ${CALLERID(num)}
in a variable and use it in another context or in a MACRO?
Regards
Bilal
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
Amit Anand
+91 9818559898
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users