[asterisk-users] Storing a variable at a context and using it in another context

Danny Nicholas danny at debsinc.com
Tue Oct 25 09:11:05 CDT 2011


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: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] 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 <bilmar_gh at yahoo.com> 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

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111025/07bc5849/attachment.htm>


More information about the asterisk-users mailing list