Re: asterisk-users Digest, Vol 221, Issue 2

Ron Lockard <[email protected]>
Newsgroups gmane.comp.telephony.pbx.asterisk.user
Message-ID <CAPTAbuUFtLBQ-qkedwPpq7hsak40oFxATkOD=PBt0okV+7P-VQ@mail.gmail.com>
Have you tried using the EVAL function?

On Tue, Jan 24, 2023, 7:38 PM <[email protected]>
wrote:

> Send asterisk-users mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.digium.com/mailman/listinfo/asterisk-users
> or, via email, send a message with subject or body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of asterisk-users digest..."
>
>
> Today's Topics:
>
>    1. Global variables in global variables (Antony Stone)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 18 Jan 2023 23:08:48 +0100
> From: Antony Stone <[email protected]>
> To: "Asterisk" <[email protected]>
> Subject: [asterisk-users] Global variables in global variables
> Message-ID: <[email protected]>
> Content-Type: text/plain;  charset="iso-8859-1"
>
> Hi.
>
> I have a very old dialplan (ie: a dialplan for a very old version of
> Asterisk)
> which I've just transferred to Asterisk 16.28.0
>
> The [globals] section of that dialplan includes:
>
>         Kphones=SIP/KC470IP&SIP/KSnom870
>         Sphones=SIP/SYealinkT38G&SIP/SGC610IP
>         Allphones=${Kphones}&${Sphones}
>
> In the old system, this results in ${Allphones} containing:
>
>         SIP/KC470IP&SIP/KSnom870&SIP/SYealinkT38G&SIP/SGC610IP
>
> I can use this in a dial() command.
>
> On the new system, the variable ${Allphones} ends up containing:
>
>         ${Kphones}&${Sphones}
>
> (ie: the unexpanded variable names, not the content of those previously-
> defined variables.)
>
> This fairly obviously does not work in a dial() command.
>
>
> a) is this a deliberate backward incompatiblity at some stage in the
> development of Asterisk?
>
> b) if not, is this a known bug?
>
> c) is there some other way I'm supposed to be doing this now, to be able
> to
> define a global variable including the value of another global variable?
>
> d) if not, is there some workaround?
>
>
> Thanks,
>
>
> Antony.
>
> --
> Most people are aware that the Universe is big.
>
>  - Paul Davies, Professor of Theoretical Physics
>
>                                                    Please reply to the
> list;
>                                                          please *don't* CC
> me.
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
> ------------------------------
>
> End of asterisk-users Digest, Vol 221, Issue 2
> **********************************************
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.