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