Re: [asterisk-users] Global variables in global variables

2023-01-27 Thread Antony Stone
On Thursday 26 January 2023 at 21:58:45, Sean Bright wrote:

> On 1/26/2023 5:16 AM, Antony Stone wrote:
> > It does not work if it's written in AEL - assigning global variables
> > works, but the above does not.
> 
> I've created a JIRA issue[1] for this as well as a proposed patch[2].
> Assuming all goes well this should work in future releases.

Thank you indeed :)


Antony.

> 1. https://issues.asterisk.org/jira/browse/ASTERISK-30406
> 2. https://gerrit.asterisk.org/c/asterisk/+/19796

-- 
"There has always been an underlying argument that we should open up our 
source code more broadly. The fact is that we are learning from open source 
and we are opening our code more broadly through Shared Source.

Is there value to providing source code? The answer is unequivocally yes."

 - Jason Matusow, head of Microsoft's Shared Source Program, in response to 
leaks of Windows source code on the Internet.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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

Re: [asterisk-users] Global variables in global variables

2023-01-26 Thread Sean Bright
On 1/26/2023 5:16 AM, Antony Stone wrote:

> It does not work if it's written in AEL - assigning global variables works,
> but the above does not.

I've created a JIRA issue[1] for this as well as a proposed patch[2]. Assuming 
all goes well this should work in future releases.

Kind regards,
Sean

1. https://issues.asterisk.org/jira/browse/ASTERISK-30406
2. https://gerrit.asterisk.org/c/asterisk/+/19796-- 
_
-- 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

Re: [asterisk-users] Global variables in global variables

2023-01-26 Thread Antony Stone
On Wednesday 25 January 2023 at 19:17:04, Daniel wrote:

> Asterisk 20.1.0
> 
> [globals]
> Sphones=SIP/SYealinkT38G/SGC610IP
> Kphones=SIP/KC470IP/KSnom870
> Allphones=${Sphones}&${Kphones}
> 
> -s*CLI> dialplan show globals
> Allphones=SIP/KC470IP/KSnom870/SYealinkT38G/SGC610IP
> Sphones=SIP/SYealinkT38G/SGC610IP
> Kphones=SIP/KC470IP/KSnom870

Thank you very much.

I have now established that this works provided it's in extensions.conf or 
some included file.

It does not work if it's written in AEL - assigning global variables works, 
but the above does not.

I shall keep my global assignments out of AEL in future.

Thanks,


Antony.

-- 
Just when you think you're done, a cat floats by with buttered toast strapped 
to its back.

 - Steve Krug, "Don't make me think"

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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

Re: [asterisk-users] Global variables in global variables

2023-01-25 Thread Daniel

Le 25/01/2023 à 17:56, Antony Stone a écrit :

On Wednesday 25 January 2023 at 16:46:14, Daniel wrote:

On Sunday 01 January 2023 at 17:30:03, Antony Stone wrote:


The [globals] section of that dialplan includes:

Kphones=SIP/KC470IP/KSnom870
Sphones=SIP/SYealinkT38G/SGC610IP
Allphones=${Kphones}&${Sphones}

On the new system, the variable Allphones ends up containing:

${Kphones}&${Sphones}


I do the same concatenation with Asterisk 18 & 20 and there is no problem.


Really?

You have something like:

Allphones=${Kphones}&${Sphones}

and specifically *in the [globals] section* of the dialplan?


Asterisk 20.1.0

[globals]
Sphones=SIP/SYealinkT38G/SGC610IP 



Kphones=SIP/KC470IP/KSnom870 



Allphones=${Sphones}&${Kphones}

-s*CLI> dialplan show globals
Allphones=SIP/KC470IP/KSnom870/SYealinkT38G/SGC610IP
Sphones=SIP/SYealinkT38G/SGC610IP
Kphones=SIP/KC470IP/KSnom870

0
--
Daniel Huhardeaux
+33.368460...@tootai.net  sip:8...@sip.tootai.net
+41.445532...@swiss-itech.chtootaiNET

--
_
-- 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

Re: [asterisk-users] Global variables in global variables

2023-01-25 Thread Antony Stone
On Tuesday 24 January 2023 at 18:03:58, Joel Serrano wrote:

> I believe that EVAL might be able to help you here:
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_EVAL
> 
> Example:
> 
> Allphones=${EVAL(Kphones)}&${EVAL(Sphones)}
> 
> I'm not sure if in the globals it will let you, but in the dialplan for
> sure it will.

Thanks, I'll try that and report back.


Antony.

-- 
I just got a new mobile phone, and I called it Titanic.  It's already syncing.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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

Re: [asterisk-users] Global variables in global variables

2023-01-25 Thread Antony Stone
On Wednesday 25 January 2023 at 16:46:14, Daniel wrote:

On Sunday 01 January 2023 at 17:30:03, Antony Stone wrote:

> > The [globals] section of that dialplan includes:
> >
> > Kphones=SIP/KC470IP/KSnom870
> > Sphones=SIP/SYealinkT38G/SGC610IP
> > Allphones=${Kphones}&${Sphones}
> >
> > On the new system, the variable Allphones ends up containing:
> >
>>  ${Kphones}&${Sphones}
>
> I do the same concatenation with Asterisk 18 & 20 and there is no problem.

Really?

You have something like:

Allphones=${Kphones}&${Sphones}

and specifically *in the [globals] section* of the dialplan?

> BTW you should move to asterisk community lots more people there.

Thanks - will get round to signing up and selecting email mode sometime soon.


Antony.

-- 
"Remember: the S in IoT stands for Security."

 - Jan-Piet Mens

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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

Re: [asterisk-users] Global variables in global variables

2023-01-25 Thread Daniel

Le 25/01/2023 à 11:06, Antony Stone a écrit :
[...]


I await the repair of whatever has been delaying messages on the list, and
then I am optimistic that someone will have replied, even if it takes some
days for that reply to become apparent.


I do the same concatenation with Asterisk 18 & 20 and there is no problem.

BTW you should move to asterisk community lots more people there.
--
Daniel

--
_
-- 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

Re: [asterisk-users] Global variables in global variables

2023-01-25 Thread Antony Stone
On Wednesday 25 January 2023 at 00:38:25, John Novack wrote:

> You have posted the same message several times in the last few days!!

I think it has become clear that I did this not because I was getting no 
answers, but because my question was not appearing on the list.

> I would assume no one has an answer to your question, at least on this
> list. It seems most have migrated to another (UGH!) venue, so the few that
> are left can't help.

I await the repair of whatever has been delaying messages on the list, and 
then I am optimistic that someone will have replied, even if it takes some 
days for that reply to become apparent.


Antony.

-- 
I thought of going into banking, until I lost interest.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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

Re: [asterisk-users] Global variables in global variables

2023-01-25 Thread John Novack

You have posted the same message several times in the last few days!!

I would assume no one has an answer to your question, at least on this list.
It seems most have migrated to another (UGH!) venue, so the few that are left 
can't help.

JMO

John Novack


Antony Stone wrote:

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/KSnom870
Sphones=SIP/SYealinkT38G/SGC610IP
Allphones=${Kphones}&${Sphones}

In the old system, this results in ${Allphones} containing:

SIP/KC470IP/KSnom870/SYealinkT38G/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.



--
Dog is my Co-Pilot

-- 
_
-- 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

Re: [asterisk-users] Global variables in global variables

2023-01-25 Thread Joel Serrano
I believe that EVAL might be able to help you here:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_EVAL

Example:

Allphones=${EVAL(Kphones)}&${EVAL(Sphones)}

I'm not sure if in the globals it will let you, but in the dialplan for
sure it will.

On Tue, Jan 24, 2023 at 3:59 AM Antony Stone <
antony.st...@asterisk.open.source.it> wrote:

> 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/KSnom870
> Sphones=SIP/SYealinkT38G/SGC610IP
> Allphones=${Kphones}&${Sphones}
>
> In the old system, this results in ${Allphones} containing:
>
> SIP/KC470IP/KSnom870/SYealinkT38G/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.
>
> --
> _
> -- 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
-- 
_
-- 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

[asterisk-users] Global variables in global variables

2023-01-24 Thread Antony Stone
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/KSnom870
Sphones=SIP/SYealinkT38G/SGC610IP
Allphones=${Kphones}&${Sphones}

In the old system, this results in ${Allphones} containing:

SIP/KC470IP/KSnom870/SYealinkT38G/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.

-- 
_
-- 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

[asterisk-users] Global variables in global variables

2023-01-24 Thread Antony Stone
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/KSnom870
Sphones=SIP/SYealinkT38G/SGC610IP
Allphones=${Kphones}&${Sphones}

In the old system, this results in ${Allphones} containing:

SIP/KC470IP/KSnom870/SYealinkT38G/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.

-- 
_
-- 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

[asterisk-users] Global variables in global variables

2023-01-22 Thread Antony Stone
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/KSnom870
Sphones=SIP/SYealinkT38G/SGC610IP
Allphones=${Kphones}&${Sphones}

In the old system, this results in ${Allphones} containing:

SIP/KC470IP/KSnom870/SYealinkT38G/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.

-- 
_
-- 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

[asterisk-users] Global variables in global variables

2023-01-22 Thread Antony Stone
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/KSnom870
Sphones=SIP/SYealinkT38G/SGC610IP
Allphones=${Kphones}&${Sphones}

In the old system, this results in ${Allphones} containing:

SIP/KC470IP/KSnom870/SYealinkT38G/SGC610IP

I can use this is 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.

-- 
_
-- 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