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] asterisk-users Digest, Vol 221, Issue 2

2023-01-25 Thread Ron Lockard
Have you tried using the EVAL function?

On Tue, Jan 24, 2023, 7:38 PM 
wrote:

> Send asterisk-users mailing list submissions to
> asterisk-users@lists.digium.com
>
> 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
> asterisk-users-requ...@lists.digium.com
>
> You can reach the person managing the list at
> asterisk-users-ow...@lists.digium.com
>
> 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 
> To: "Asterisk" 
> Subject: [asterisk-users] Global variables in global variables
> Message-ID: <202301182308.48557.antony.st...@asterisk.open.source.it>
> 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/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.
>
>
>
> --
>
> 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

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] mailing list working?

2023-01-25 Thread David Rebarchik
Yes, the technical part of the list is working, but I'm not as sure 
about the functional part. (Meaning that several people's questions are 
going unanswered.  I wish that I had the answers they are looking for, 
but alas, I don't.)


Dave

On 1/16/2023 6:08 AM, marek wrote:

there are new versions of Asterisk but mailing list is empty

http://lists.digium.com/pipermail/asterisk-users/

Marek





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

Re: [asterisk-users] mailing list working?

2023-01-25 Thread Doug Lytle
>>> there are new versions of Asterisk but mailing list is empty

I think they've been having issues, I've noted recent mail coming across that 
was from several days ago.

Doug


-- 
_
-- 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] mailing list working?

2023-01-25 Thread Antony Stone
On Monday 16 January 2023 at 13:08:50, marek wrote:

> there are new versions of Asterisk but mailing list is empty
> 
> http://lists.digium.com/pipermail/asterisk-users/

There's also something very odd going on with incoming messages.

I sent one on January 1st - arrived January 23rd
Another January 2nd - arrived January 23rd
Again on January 8th - arrived January 24th

Marc Schaefer sent one on January 4th - arrived January 24th

You sent yours on January 16th - arrived January 24th

I wonder when any replies might turn up?


Antony.

-- 
If you were ploughing a field, which would you rather use - two strong oxen or 
1024 chickens?

 - Seymour Cray, pioneer of supercomputing

   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] Question on ARI externalMedia

2023-01-25 Thread Dan Cropp
Please disregard, I figured out what I was doing wrong.

Dan


From: Dan Cropp
Sent: Friday, January 20, 2023 11:05 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Question on ARI externalMedia

A couple years ago, I know I had ARI externalMedia working.  Trying to figure 
out what I'm doing wrong today.


https://wiki.asterisk.org/wiki/display/AST/External+Media+and+ARI

My ari.conf

[general]
enabled = yes
pretty = no
allowed_origins = *

[MyApp]
type = user
read_only = no
password_format = plain
password = Password

I send this curl -v -u MyApp:Password -X POST 
"http://localhost:8088/ari/channels/externalMedia?channelId=1234abcd5678=MyApp_host=192.168.33.32%3A1053=slin16;

I can make other ARI commands work, so it must be something specific to my 
externalMedia command and the parameters.

The output is the following...

{"id":"1234abcd5678","name":"UnicastRTP/192.168.33.32:1053-0x7fcffc020300","state":"Down","protocol_id":"","caller":{"name":"","number":""},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"default","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing
 
Line)"},"creationtime":"2023-01-20T10:59:24.569-0600","language":"en","channelvars":{"UNICASTRTP_LOCAL_PORT":"19194","UNICASTRTP_LOCAL_ADDRESS":"192.168.33.31"}}

Dan
-- 
_
-- 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] Question on ARI externalMedia

2023-01-25 Thread Dan Cropp
A couple years ago, I know I had ARI externalMedia working.  Trying to figure 
out what I'm doing wrong today.


https://wiki.asterisk.org/wiki/display/AST/External+Media+and+ARI

My ari.conf

[general]
enabled = yes
pretty = no
allowed_origins = *

[MyApp]
type = user
read_only = no
password_format = plain
password = Password

I send this curl -v -u MyApp:Password -X POST 
"http://localhost:8088/ari/channels/externalMedia?channelId=1234abcd5678=MyApp_host=192.168.33.32%3A1053=slin16;

I can make other ARI commands work, so it must be something specific to my 
externalMedia command and the parameters.

The output is the following...

{"id":"1234abcd5678","name":"UnicastRTP/192.168.33.32:1053-0x7fcffc020300","state":"Down","protocol_id":"","caller":{"name":"","number":""},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"default","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing
 
Line)"},"creationtime":"2023-01-20T10:59:24.569-0600","language":"en","channelvars":{"UNICASTRTP_LOCAL_PORT":"19194","UNICASTRTP_LOCAL_ADDRESS":"192.168.33.31"}}

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