Re: [asterisk-users] Mailing List Future

2023-12-04 Thread Antony Stone
On Monday 04 December 2023 at 13:39:51, Joshua C. Colp wrote:

> The mailing list will not receive emails from the forums. What I was
> referring to is that Discourse does provide the ability to receive emails
> for posts or threads you're interested in, and you are able to respond over
> email to them as well.

I use this forum via its email interface, and I agree that it works.  The 
biggest disadvantage I experience is that although you can _reply_ to a thread 
via email, you cannot create a new one; you have to use the web forum 
interface for that.

I don't know whether the forum software used here could be modified to allow 
that - I raised the same point on the FreeSwitch forum and an admin quite 
happily turned it on.  Maybe that could be investigated here?


Antony.

-- 
René Descartes walks in to a bar.
The barman asks him "Do you want a drink?"
Descartes says "I think not," and disappears.

   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] Recommended sip providers

2023-11-20 Thread Antony Stone
On Monday 20 November 2023 at 12:14:11, Tahir Almas Dhesi wrote:

> Interested to know good wholesale SIP providers for 15k concurrent calls

You might want to specify a bit more detail, such as:

 - which country are you located in
 - do you require inbound DDIs (if so, in which region/s)?
 - which countries' Caller ID/s do you need to present?

Antony.

-- 
These clients are often infected by viruses or other malware and need to be 
fixed.  If not, the user at that client needs to be fixed...

 - Henrik Nordstrom, on Squid users' mailing list

   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 and Teams integration?

2023-10-26 Thread Antony Stone
On Thursday 26 October 2023 at 19:11:45, Carlos Chavez wrote:

>  Does anyone know of a good solution to integrate Asterisk and MS
> Teams?  Something where you can use the MS Teams client as a regular
> extension?

Kamailio is the usual intermediary I have seen for doing this.


Antony.

-- 
If at first you don't succeed, destroy all the evidence that you tried.

   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] Deleting voicemail by program

2023-10-09 Thread Antony Stone
On Monday 09 October 2023 at 21:05:55, Mike Diehl wrote:

> Hi all,
> 
> I need to be able to delete a voicemail message using a program.
> 
> Is is sufficient to simply delete the .wav and .txt files in the spool
> directory? Or do I need to also renumber the remaining files?

My approach in a situation like this would often be "try it and see".

Leave yourself three voicemail messages, remove the middle one simply by 
deleting the files, and see what Asterisk makes of what's left behind:

 - does it report three messages but only play two?

 - does it report either two or three messages but can only play the first?

 - does it report two messages and play them without problem?

 - does it report two messages and fail to play anything?

 - does it report no messages?

 - does it have a problem when a fourth message gets left?

None of the above behaviour is _necessarily_ transferrable to a future version 
of Asterisk, but at least it tells you what your current version does when you 
interfere with in this way..


Antony.

-- 
.evah I serutangis sseltniop tsom eht fo eno eb tsum sihT

   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 sees private IP address of a device behind NAT

2023-07-11 Thread Antony Stone
On Tuesday 11 July 2023 at 10:00:22, Fourhundred Thecat wrote:

> Hello,
> 
> my asterisk is working fine, I am just confused why, on the server I see
> private IP address of an endpoint

SIP is rather like FTP in that it embeds IP addresses (layer 3 of the OSI 
network model) in the protocol itself (layer 7).  I have always found it 
amazing that after we'd been struggling with this design flaw in FTP for years, 
it was decided to repeat it in RFC 2543.

It is one of the reasons why SIP through NAT is more challenging than, say, 
HTTP is, and one of its side effects is that you often see "real" (private) IP 
addresses of endpoints inside the communications when the packet source and 
destination addresses are the routed (public) versions.

Unless you experience actual problems in call setup or take-down, or things 
like one-way audio, just ignore it and accept that SIP was perhaps not as well 
designed as it could have been.


Antony.

-- 
People say that nothing is impossible, so I try to do the impossible every 
day.

   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] Multiple phones on same PJSIP account

2023-06-21 Thread Antony Stone
On Wednesday 21 June 2023 at 17:52:16, TTT wrote:

> Ok I've got multiple phone sets registered with the same extension/secret.
> 
> However, this causes a strange problem.  If I have 3 phone sets registered
> on extension 123, and I then call extension 123 (from extension 456), only
> a SINGLE phone set will ring.

What values do you have for "max_contacts" and "replace_existing" in 
pjsip.conf?

Antony.

-- 
Neurotics build castles in the sky;
Psychotics live in them;
Psychiatrists collect the rent.


   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] Multiple phones on same PJSIP account

2023-06-19 Thread Antony Stone
On Monday 19 June 2023 at 16:26:05, TTT wrote:

> That begs another interesting question...with analog phones picking up two
> extensions on the same "line" allow multiple people to participate on the
> call (without a "conference" feature)
> 
> Does this become possible with multiple phones on the same PJSIP account? 

No.


Antony.

-- 
There are 10 types of people in the world:
those who understand binary notation,
and those who don't.

   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] Multiple phones on same PJSIP account

2023-06-19 Thread Antony Stone
On Monday 19 June 2023 at 15:09:44, TTT wrote:

> I am creating a dialplan where a single user (Alice) has two offices.  Both
> of her phones should ring if her extension is called.
> 
> I could use a ring group, but I'm wondering can both phones use the same
> PJSIP extension account (username/secret)?

Yes.  This is one of the major advantages to using PJSIP instead of chan_sip.

(Other than the quality of the code and whether it's maintained.)


Antony.

-- 
"It wouldn't be a good idea to talk about him behind his back in front of 
him."

 - murble

   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 18.17.1 unreachable

2023-05-11 Thread Antony Stone
On Thursday 11 May 2023 at 21:15:50, Jerry Geis wrote:

> I have 4 devices that I connect here local and there is no issue.
> I have those same 4 devices connecting from another location across the
> internet.
> 
> They all boot up, connect and register I can send audio to them and they
> play.
> - then at times they show UNREACHABLE and I can no longer send audio.
> then they come back online again and are OK.
> 
> I'm using old chan_sip,  I tried changing qualify to no - that did not
> help.
> 
> What might I adjust to keep these SIP units alway ON ?

1. qualify makes no difference - that's just a question of whether Asterisk 
checks whether things are still connected or not.  It doesn't make them 
connect (or not) any differently.

2. check the routers that these devices are connected through and see if you 
can increase the UDP connection tracking timeout.  If a device (phone) doesn't 
send a packet within this time, the router will forget the NAT association 
between the (private IP-addressed) phone and Asterisk (out on a public IP 
address), and that means that when Asterisk sends an Invite to the phone, the 
router fails to send it on to the phone, so the phone doesn't know about it.  
Only when the phone then re-registers, does the router then refresh its 
connection tracking timeout, and all is well again (for a while).

3. Reduce the re-register interval on the phones, so that they refresh the 
connection tracking timeout on the router more frequently than it forgets.


Antony.

-- 
"I find the whole business of religion profoundly interesting.  But it does 
mystify me that otherwise intelligent people take it seriously."

 - Douglas Adams

   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] Intro and question

2023-04-06 Thread Antony Stone
On Thursday 06 April 2023 at 18:29:43, Jeff LaCoursiere wrote:

> If you just want something easy to use out of the box, install the
> FreePBX distro.

Given that Steve originally said "I've been using Asterisk, including 
administering and maintaining it, in some aspect since 2003, but this is the 
first time I have attempted a from-scratch installation and setup on my own." I 
got the impression that he was not so much looking for something easy to use, 
but rather looking forward to learning about how to "do Asterisk" for himself.

Antony.

-- 
This sentence contains exacly three erors.

   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] Intro and question

2023-04-06 Thread Antony Stone
On Thursday 06 April 2023 at 15:48:24, Steve Matzura wrote:

> this is the first time I have attempted a
> from-scratch installation and setup on my own.

..

> Then the weeds started to appear, and I was off into them.
> 
> The first was the mention of Alembic.

> Reading on, I found this, regarding an SQL database:

> SQL? Database? Where ... what ...

> Thanks in advance for any assistance.

Well, my first question would be "are you intending to use Asterisk Realtime 
features (ie: configurations in database tables instead of text files) in this 
installation?"

If you are, then you do need to install a few more packages on your Debian 
system, but if not, then there is no reason to pay any attention at all to 
anything to do with Alembic, Realtime, SQL etc.


Antony.

-- 
René Descartes walks in to a bar.
The barman asks him "Do you want a drink?"
Descartes says "I think not," and disappears.

   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 simply stops call processing

2023-02-28 Thread Antony Stone
On Wednesday 22 February 2023 at 15:29:38, John Harragin wrote:

> If there are multiple connections that the utilize the same driver, try
> putting:
> 
> Threading   = 2
> 
> in the appropriate driver section of
> /etc/odbcinst.ini

I'll give that a go, however I doubt that it is the problem, since I see the 
correct result from the ODBC query recorded in the assignment verbose log 
output, therefore the query is done and the result has been used by the time 
Asterisk freezes.

> ...this would be a possibility if the problem is intermittent.

It's actually extremely repeatable - I have not seen call processing proiceed 
beyond this stage once so far.

> Also can you successfully execute the same SQL from the cli?

Yes, and as I say, they query is working fine and Asterisk is correctly using 
the returned value in the assignment.

The further detail which I think I added in a later post is that this is 
actually in a context which gets called using a Gosub() from two different 
places in the dialplan.

From one, it works fine; from the other, it gets stuck.  Completely consistent.

> By the way, what driver is asterisk using?

You mean ODBC?  That's connected to MariaDB.

> On Mon, Feb 20, 2023 at 11:12 PM Antony Stone wrote:
> > Hi.
> > 
> > I have a strange problem and I'm looking for suggestions on how to
> > investigate it.
> > 
> > I have a dialplan which is processing a call, and Asterisk simply stops
> > doing anything for that call.
> > 
> > I have verbose and debug logging turned on.
> > 
> > There are two steps at a particular point in the dialplan:
> > Set(UserCredit=${ODBC_GENERIC(select Credit('${DDI}'))})
> > 
> > Verbose(6,Current credit level for user ${DDI} is ${UserCredit}
> > pence)
> > 
> > 
> > Everything gets processed up to and including the first line - the
> > verbose log file shows me:
> > 
> > pbx.c:2946 in pbx_extension_helper: Executing
> > [0044509903@DialBleg:46]
> > Set("SIP/TrunkTwo-1184", "UserCredit=999") in new stack
> > 
> > (Phone number obscured here for anonymity).
> > 
> > Then, that is it.  Nothing further happens with call processing (until
> > one of the parties hangs up) and the second dialplan command above never
> > appears in the verbose log file.  I have several other Verbose(6,.)
> > commands preceding this, and they all output into the log file as expected.
> > 
> > If another call arrives on the same server, Asterisk quite happily starts
> > processing it and records what it's doing in the log files.
> > 
> > 
> > Can anyone suggest how I can investigate what Asterisk is doing at the
> > point where it "gets stuck", and how to find out why it simply stops
> > processing the call and doesn't continue with the dialplan commands?
> > 
> > 
> > Thanks,
> > 
> > 
> > Antony.

-- 
Why are they called "The Rocky Mountains"?
What are other mountains made of?

   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] Asterisk simply stops call processing

2023-02-20 Thread Antony Stone
Hi.

I have a strange problem and I'm looking for suggestions on how to investigate 
it.

I have a dialplan which is processing a call, and Asterisk simply stops doing 
anything for that call.

I have verbose and debug logging turned on.

There are two steps at a particular point in the dialplan:


Set(UserCredit=${ODBC_GENERIC(select Credit('${DDI}'))})

Verbose(6,Current credit level for user ${DDI} is ${UserCredit} pence)


Everything gets processed up to and including the first line - the verbose log 
file shows me:

pbx.c:2946 in pbx_extension_helper: Executing [0044509903@DialBleg:46] 
Set("SIP/TrunkTwo-1184", "UserCredit=999") in new stack

(Phone number obscured here for anonymity).

Then, that is it.  Nothing further happens with call processing (until one of 
the parties hangs up) and the second dialplan command above never appears in 
the verbose log file.  I have several other Verbose(6,.) commands preceding 
this, and they all output into the log file as expected.

If another call arrives on the same server, Asterisk quite happily starts 
processing it and records what it's doing in the log files.


Can anyone suggest how I can investigate what Asterisk is doing at the point 
where it "gets stuck", and how to find out why it simply stops processing the 
call and doesn't continue with the dialplan commands?


Thanks,


Antony.

-- 
"The future is already here.   It's just not evenly distributed yet."

 - William Gibson

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

[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

Re: [asterisk-users] Answer()ing a local Originate takes 500ms!?

2022-11-11 Thread Antony Stone
On Friday 11 November 2022 at 17:11:26, Joshua C. Colp wrote:

> On Fri, Nov 11, 2022 at 12:09 PM Antony Stone wrote:
> > 
> > https://wiki.asterisk.org/wiki/display/AST/Application_Answer tells me
> > that the Answer() application takes an optional parameter which causes
> > Asterisk to wait that number of milliseconds before returning to the
> > dialplan after answering the call.
> > 
> > Does this undocumentedly default to 500?

> There is a hard coded minimum of 500 milliseconds for media to flow. You'd
> have to modify the code to remove it.

Urgh!

Is there _anything_ I can do in either the Originate() or the Answer() to 
avoid this, without having to rebuild Asterisk?

And, separately, please can I request that:

a) this minimum is documented

b) it can be over-ridden at the user's own risk if the supplied parameter is 
lower than 500.


Thanks,


Antony.

-- 
A good conversation is like a miniskirt;
short enought to retain interest,
but long enough to cover the subject.

 - Celeste Headlee


   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] Answer()ing a local Originate() takes 500ms!?

2022-11-11 Thread Antony Stone
On Friday 11 November 2022 at 17:08:42, Antony Stone wrote:

> Hi.
> 
> Asterisk 16.2.1
> 
> I have a dialplan where one context (named "inbound") performs:
> 
> Originate(Local/${Target}@inOrig,exten,inbound,${EXTEN},208)
> 
> The idea is that this command will spawn a "call" to the context "inOrig"
> on the same machine, and then return to the "inbound" context at priority
> 208.
> 
> Priority 208 is simply a NoOp(Returned from inOrig)
> 
> The "inOrig" context does:
> 
> NoOp(Answering inbound call)
> Answer()
> NoOp(Returned to inbound context)
> Originate(Local/${EXTEN}@dialout,exten,BridgIt,${EXTEN},1)
> 
> It's all doing what I want / expect, but I am seeing, completely
> consistently, a 500ms delay in the Answer() application.
> 
> So, I get the following sequence of timings:
> 
> 08:41:49.514918 inbound:201 Originate(.)
> 08:41:49.516459 inOrig:1 NoOp(Answering inbound call)
> 08:41:49.517016 inOrig:2 Answer()
> 08:41:49.517489 inbound:208 NoOp(Returned from inOrig)
> 08:41:50.017454 inOrig:3 NoOp(Returned to inbound context)
> 
> I have analysed dozens of calls and there is always a ~500ms delay between
> when the Answer() has clearly completed (because control returns to
> priority 208 of the "inbound" context), and when the inOrig context
> continues with the following NoOp.
> 
> https://wiki.asterisk.org/wiki/display/AST/Application_Answer tells me that
> the Answer() application takes an optional parameter which causes Asterisk
> to wait that number of milliseconds before returning to the dialplan after
> answering the call.
> 
> Does this undocumentedly default to 500?

PS: It doesn't look like it - changing the dialplan to do Answer(1) instead 
makes no difference - there's still a 500ms delay (and it's astonishingly 
consistent).

> Are the results I'm seeing expected, is there something wrong with my
> dialplans, is there some way to eliminate this delay?
> 
> 
> Thanks for any insight.
> 
> 
> Antony.

-- 
Numerous psychological studies over the years have demonstrated that the 
majority of people genuinely believe they are not like the majority of people.

   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] Answer()ing a local Originate takes 500ms!?

2022-11-11 Thread Antony Stone
Hi.

Asterisk 16.2.1

I have a dialplan where one context (named "inbound") performs:

Originate(Local/${Target}@inOrig,exten,inbound,${EXTEN},208)

The idea is that this command will spawn a "call" to the context "inOrig" on 
the same machine, and then return to the "inbound" context at priority 208.

Priority 208 is simply a NoOp(Returned from inOrig)

The "inOrig" context does:

NoOp(Answering inbound call)
Answer()
NoOp(Returned to inbound context)
Originate(Local/${EXTEN}@dialout,exten,BridgIt,${EXTEN},1)

It's all doing what I want / expect, but I am seeing, completely consistently, 
a 500ms delay in the Answer() application.

So, I get the following sequence of timings:

08:41:49.514918 inbound:201 Originate(.)
08:41:49.516459 inOrig:1 NoOp(Answering inbound call)
08:41:49.517016 inOrig:2 Answer()
08:41:49.517489 inbound:208 NoOp(Returned from inOrig)
08:41:50.017454 inOrig:3 NoOp(Returned to inbound context)

I have analysed dozens of calls and there is always a ~500ms delay between 
when the Answer() has clearly completed (because control returns to priority 
208 of the "inbound" context), and when the inOrig context continues with the 
following NoOp.

https://wiki.asterisk.org/wiki/display/AST/Application_Answer tells me that 
the Answer() application takes an optional parameter which causes Asterisk to 
wait that number of milliseconds before returning to the dialplan after 
answering the call.

Does this undocumentedly default to 500?

Are the results I'm seeing expected, is there something wrong with my 
dialplans, is there some way to eliminate this delay?


Thanks for any insight.


Antony.

-- 
3 logicians walk into a bar. The bartender asks "Do you all want a drink?"
The first logician says "I don't know."
The second logician says "I don't know."
The third logician says "Yes!"

   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] Trying asterisk on AWS

2022-10-06 Thread Antony Stone
On Thursday 06 October 2022 at 15:24:22, Jerry Geis wrote:

> I added:
> 
> externip=xxx
> nat=force_rport,comedia
> 
> to the general section of sip.conf
> 
> its still sending to the local IP.

Does your local router (the one connecting Linphone to the Internet) have a 
"SIP helper" or "SIP ALG" feature?

If so, ensure that it is turned off.

Antony.

-- 
"Tannenbaumschmuck" is a perfectly reasonable German word
meaning Christmas tree decorations, and is not a quote from Linus Torvalds.

   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] VoiceMail() stops dialplan processing

2022-10-03 Thread Antony Stone
On Monday 03 October 2022 at 14:14:54, Joshua C. Colp wrote:

> On Mon, Oct 3, 2022 at 9:11 AM Antony Stone <
> 
> antony.st...@asterisk.open.source.it> wrote:
> > Hi.
> > 
> > I have a dialplan which calls the VoiceMail() application, and I'm
> > getting the following behaviour:
> >  - if the inbound caller leaves a message, then presses #, and then
> > presses 1 to accept the recording, everything works as expected and the
> > dialplan continues processing after the line containing VoiceMail()
> > 
> >  - if the inbound caller leaves a message and then hangs up, the diaplan
> > simply stops executing with a message such as:
> > 
> > [2022-10-03 13:02:23.355976] pbx VERBOSE[19022][C-0556]: pbx.c:4413
> > in __ast_pbx_run: Spawn extension (RecordVM, 00xx74xx88xx90, 2) exited
> > non-zero on 'SIP/TrunkOne-0c12'
> > 
> > The subsequent commands in the dialplan do not get processed.
> 
> This is fundamentally how dialplan works. If a channel hangs up, then
> normal dialplan execution stops.

I suppose that fits other situtations, yes.

> > Can anyone suggest either why this would happen and how to get the
> > dialplan to continue processing under all circumstances, or at least how
> > to investigate futher what is causing this to happen?
> > 
> > I'm sure that leaving a message and hanging up the call should be valid
> > because that's what the default greeting message tells people they can
> > do.
> 
> It is. If you're needing to do something afterwards, then the 'h' extension
> or hangup handlers are used to execute logic when the channel is hung up.

Okay, sounds simple enough - thanks,


Antony.

-- 
RTFM may be the appropriate reply, but please specify exactly which FM to R.

   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] VoiceMail() stop dialplan processing

2022-10-03 Thread Antony Stone
Hi.

I have a dialplan which calls the VoiceMail() application, and I'm getting the 
following behaviour:

 - if the inbound caller leaves a message, then presses #, and then presses 1 
to accept the recording, everything works as expected and the dialplan 
continues processing after the line containing VoiceMail()

 - if the inbound caller leaves a message and then hangs up, the diaplan 
simply stops executing with a message such as:

[2022-10-03 13:02:23.355976] pbx VERBOSE[19022][C-0556]: pbx.c:4413 in 
__ast_pbx_run: Spawn extension (RecordVM, 00xx74xx88xx90, 2) exited non-zero 
on 'SIP/TrunkOne-0c12'

The subsequent commands in the dialplan do not get processed.


Can anyone suggest either why this would happen and how to get the dialplan to 
continue processing under all circumstances, or at least how to investigate 
futher what is causing this to happen?

I'm sure that leaving a message and hanging up the call should be valid 
because that's what the default greeting message tells people they can do.


Thanks,


Antony.

-- 
Why are they called "The Rocky Mountains"?
What are other mountains made of?

   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] Two quick questions

2022-09-21 Thread Antony Stone
On Wednesday 21 September 2022 at 16:20:19, Jerry Geis wrote:

> hi All
> 
> How do I restart logging in /var/log/asterisk/messages ?

logger reload


Antony.

-- 
What do you call a dinosaur with only one eye?  A Doyouthinkesaurus.

   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] Problems detecting hangup after hold / resume

2022-09-13 Thread Antony Stone
On Tuesday 13 September 2022 at 15:52:43, Joshua C. Colp wrote:

> On Tue, Sep 13, 2022 at 11:49 AM Antony Stone wrote:

> > However, if the calleE hangs up instead, no hangup extension is called at
> > all, so my dialplan cannot tell that the call has ended (which is
> > important, because it has to send data to another application at both call
> > start and call end).

> > Does anyone have some helpful ideas on how to detect callee hangup in
> > this situation?
> 
> Do hangup handlers[1] work for the situation? They follow channels as
> things move around, including masquerades and such.
> 
> [1] https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers

Hm, nice idea - I've already used those elsewhere in this system - I'll give 
it a go here and see what happens (I'll report back).

Thanks,


Antony.

-- 
Wanted: telepath.   You know where to apply.

   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] Problems detecting hangup after hold / resume

2022-09-13 Thread Antony Stone
Hi.

I have a dialplan which accepts an inbound call and dials out to another 
number, automatically bridging the channels together when the second call is 
answered.

I then have a facility for the caller to put the call on hold (which uses 
ChannelRedirect() in the dialplan to play music on hold to the callee, and 
some beeps to the caller), and resume it again (which uses Bridge() in the 
dialplan to re-join the two channels).

This works fine.

If the calleR hangs up (after resuming the call again, so the channels are 
bridged) the dialplan somewhat unexpectedly (to me) goes to the h@Hold 
extension (where Hold is the context I use to do the ChannelRedirect()s on the 
two legs of the call).

I can cope with this; at least it tells me the call has been hung up and 
allows the dialplan to do some "end of call" processing.

However, if the calleE hangs up instead, no hangup extension is called at all, 
so my dialplan cannot tell that the call has ended (which is important, 
because it has to send data to another application at both call start and call 
end).

The only thing I do see is the h@Hold extension being activated, but at the 
time when the channels are bridged back together again to resume the call, and 
the channel name which is passed to h@Hold is a Surrogate/... channel.

I guess it's correct that when hold music stops and the channels are re-
bridged, the Surrogate channel has in fact hung up, but the timing of this is 
nothing to do with the actual end of the call.

What do I need to do to get dialplan control passed to somewhere or other when 
the "real" callee channel hangs up?


Incidentally, if the call comes in, gets answered, and then the callee hangs 
up, without the channels ever having been put on hold, the dialplan does go to 
the h@DialOn extension (where DialOn is the context in which the second call 
is dialled out to the callee).  This doesn't happen if the channels have been 
redirected and then bridged back together again, though.


I know there is an F() parameter to the Dial() command which can pass the 
callee to a context/extension when the caller hangs up, but I don't see any 
equivalent for when the callee hangs up.


Does anyone have some helpful ideas on how to detect callee hangup in this 
situation?


Thanks,


Antony.

-- 
Software development can be quick, high quality, or low cost.

The customer gets to pick any two out of three.

   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] Channel names with semicolons

2022-09-07 Thread Antony Stone
On Wednesday 07 September 2022 at 15:32:50, Thomas Ray wrote:

> From https://wiki.asterisk.org/wiki/display/AST/Channels
> 
> "The primary exception is with Local Channels. In the case of local
> channels, you'll typically have two local channel legs, one that is
> treated as outbound and the other as inbound. In this case both are really
> inside Asterisk, but one is executing dialplan and the other is not. The
> leg executing dialplan is the one treated as inbound."
> 
> In your case, context-0ce9;1 is the inbound channel because you did
> Dial(Local/number@context) and context-0ce9;2 is the outbound channel
> because it did the Dial to another destination. Simply, the numbers
> represent each leg of a local channel.

Thanks - so, which one should I pass as the parameter to ChannelRedirect() 
when I want to put the call on hold (and then Bridge() when I want to join it 
back to the other caller again)?


Antony.

-- 
"Once you have a panic, things tend to become rather undefined."

 - murble

   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] Channel names with semicolons

2022-09-07 Thread Antony Stone
On Wednesday 07 September 2022 at 15:21:59, Joshua C. Colp wrote:

> On Wed, Sep 7, 2022 at 11:17 AM Antony Stone wrote:
> > 
> > This is a follow-up to an email I posted earlier today to the list,

> There's nothing in the moderator queue that I can see.

Thanks, sent again, and immediately received back.

> > I see something very similar in the documentation about local channels at
> > 
> > https://wiki.asterisk.org/wiki/display/AST/Using+Callfiles+and+Local+
> > Channels - there are examples of both devices-ecf0;1 and devices-ecf0;2
> > but no mention of what the final digit means.
> > 
> > Can anyone enlighten me please?
> 
> A single channel can't do two things at once (you can't have a channel
> talking to Alice while also executing the Voicemail dialplan application
> for example) - so Local channels solve this by having two independent
> channels that exchange things back and forth internally. The ;2 leg is the
> one that gets sent into the dialplan, while the ;1 leg is doing whatever
> dialed it decides to do with it. If you send audio to ;1 it then pops out
> of ;2, and vice versa.

Ah, splendid - thanks for the clarification.

So, coming back to my original difficulty, if I want to put this "thing" on 
hold, should I do ChannelRedirect() on the ;1 or the ;2 part?  Maybe even 
both??

I *believe* I have tried each (today my dialplan is processing ;2) and in both 
cases, as soon as the channel is put on hold, the hangup handler is called and 
the call ends.

I am perfectly successful in using ChannelRedirect() for putting calls on hold 
when they are a SIP/ channel and not a Local/ one.


Regards,


Antony.

-- 
If you can't find an Open Source solution for it, then it isn't a real problem.

   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] Channel names with semicolons (sending again)

2022-09-07 Thread Antony Stone
Hi.

I'm trying to deal with a problem regarding putting a call on hold and then 
later resuming it.  I am using chan_sip throughout, and Asterisk 16.

I have two scenarios:

First (works):

1. An inbound call arrives, the dialplan does not Answer() it.

2. The dialplan performs a Dial() to an external number, and when that gets 
answered, Asterisk automatically bridges the two channels together.  The 
Dial() command includes an F() parameter to call a subroutine when the call 
ends.

3. In this case I get channel names such as SIP/Trunkname-2ab6 and 
SIP/Trunkname-2ab7

4. I can then put those channels on hold using the ChannelRedirect() command.

5. I can later resume the conversation (join the channels back together) with 
the Bridge() command.


Second (doesn't work):

1. An Originate command (AMI) is used to tell Asterisk to Dial() out to an 
external number, and the call gets answered.

2. The dialplan then Dial()s out to a second external number, and when that is 
answered, Asterisk automatically bridges the channels together.  The second 
Dial() command also contains an F() parameter to call a subroutine when the 
call ends.

3. In this case I get channel names such as Local/number@context-0ce9;2 
for the first call and SIP/Trunkname-2b52 for the second call.

4. When I then put those channels on hold using the ChannelRedirect() command, 
the calls are placed on hold, and then the F() parameter hangup handler is 
immediately called and the calls end.


The main thing which is puzzling me about this is that I see examples of both 
Local/number@context-0ce9;1 and Local/number@context-0ce9;2 during the 
processing of the calls.

What is the significance of the number following the semi-colon?

I also see in verbose logging output:

[2022-09-07 09:37:57.310706] pbx VERBOSE[29148]: dial.c:598 in handle_frame: 
Local/number@context-0ce9;1 answered

[2022-09-07 09:37:57.310792] pbx VERBOSE[29155][C-1265]: 
bridge_channel.c:2252 in bridge_channel_internal_push_full: Channel 
SIP/Trunkname-2b55 joined 'simple_bridge' basic-bridge <7e260e93-
abd4-48ea-96f1-33601165dba2>

[2022-09-07 09:37:57.310937] pbx VERBOSE[29149][C-1265]: 
bridge_channel.c:2252 in bridge_channel_internal_push_full: Channel 
Local/number@context-0ce9;2 joined 'simple_bridge' basic-bridge <7e260e93-
abd4-48ea-96f1-33601165dba2>


So, when the channel Local/number@context-0ce9;1 gets answered, the result 
is to bridge the channels Local/number@context-0ce9;2 and 
SIP/Trunkname-2b55


So, is Local/number@context-0ce9;1 some sort of "controlling channel" and 
I should be using this as the parameter to the ChannelRedirect() command, or 
is Local/number@context-0ce9;2 the "real channel" which is bridged to the 
other call, in which case why does the hangup handler get called when I use 
ChannelRedirect() on this?

Maybe I should only be using Local/number@context-0ce9 with no semicolon 
suffix in the ChannelRedirect()?


Any advice / guidance / explanation / pointers to documentation welcome :)


Thanks,

-- 
These clients are often infected by viruses or other malware and need to be 
fixed.  If not, the user at that client needs to be fixed...

 - Henrik Nordstrom, on Squid users' mailing list

   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] Channel names with semicolons

2022-09-07 Thread Antony Stone
On Wednesday 07 September 2022 at 11:44:54, Antony Stone wrote:

> Hi.

This is a follow-up to an email I posted earlier today to the list, although I 
haven't seen it come back yet.  If it's under moderation for some reason, I 
hope some kindly admin will release it :)

> I'm trying to deal with a problem regarding putting a call on hold and then
> later resuming it.  I am using chan_sip throughout, and Asterisk 16.



> The main thing which is puzzling me about this is that I see examples of
> both Local/number@context-0ce9;1 and Local/number@context-0ce9;2
> during the processing of the calls.
> 
> What is the significance of the number following the semi-colon?
> 
> I also see in verbose logging output:
> 
> [2022-09-07 09:37:57.310706] pbx VERBOSE[29148]: dial.c:598 in
> handle_frame: Local/number@context-0ce9;1 answered
> 
> [2022-09-07 09:37:57.310792] pbx VERBOSE[29155][C-1265]:
> bridge_channel.c:2252 in bridge_channel_internal_push_full: Channel
> SIP/Trunkname-2b55 joined 'simple_bridge' basic-bridge <7e260e93-
> abd4-48ea-96f1-33601165dba2>
> 
> [2022-09-07 09:37:57.310937] pbx VERBOSE[29149][C-1265]:
> bridge_channel.c:2252 in bridge_channel_internal_push_full: Channel
> Local/number@context-0ce9;2 joined 'simple_bridge' basic-bridge
> <7e260e93- abd4-48ea-96f1-33601165dba2>
> 
> 
> So, when the channel Local/number@context-0ce9;1 gets answered, the
> result is to bridge the channels Local/number@context-0ce9;2 and
> SIP/Trunkname-2b55

I see something very similar in the documentation about local channels at 
https://wiki.asterisk.org/wiki/display/AST/Using+Callfiles+and+Local+Channels - 
there are examples of both devices-ecf0;1 and devices-ecf0;2 but no mention of 
what the final digit means.

Can anyone enlighten me please?


Antony.

-- 
Never automate fully anything that does not have a manual override capability. 
Never design anything that cannot work under degraded conditions in emergency.

   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] Originate with label?

2022-08-31 Thread Antony Stone
On Wednesday 31 August 2022 at 15:01:57, Mark Murawski wrote:

> On 8/31/22 05:29, Antony Stone wrote:
> > 
> > I realise that a better solution might be to wrap assignments (inside
> > Set() or MSet(), no matter) with $[..] *only* if the expressions contain
> > arithmetic operators + - * / and not if they are simple a=b assignments,
> > including a=${b}.
> > 
> > This would ensure that even if ${b} expanded to something containing a
> > dash, it would be interpreted as a mathematical minus sign in a=${b}
> 
> I would hesitate about making this happen as well.. without a
> migration-plan in place.

Agreed; I didn't mean "please change it now"!

> How is the compiler supposed to tell the difference between the
> following examples, for intent
> var1 = ${a} + ${b} / ${c};
> var2 = Hello World / Hello Bob / Hello Sue
> var3 = *1*1*1* HEY THERE IS A PROBLEM *1*1*1
> var4 = This-Is-Some-Dash-Separated-Data: 1-2-3-4-5-6

Agreed, but for text strings containing such symbols, I have to say that my 
natural inclination would be to put them in quote marks, as you say:

> I think what you're looking for is quoted strings.
> var1 = "This-Is-Some-Dash-Separated-Data: 1-2-3-4-5-6"

It's when the *value of a variable* on the right hand side of the assignment 
happens to contain an arithmetic operator that the real surprise occurs.

> Which considering MSet actually has a desired behavior here of removing
> quotes, your value of var1 will be exactly what you expect it to be

Strangely enough, I just discovered that as a solution to my example problem, 
which was:

-
Set(Tracker=${CDR(uniqueid)});

resulting in:

Set(Tracker=eagle.domain.com-1661872057.2349)

Just what I want.

However:

Tracker=${CDR(uniqueid)};

results in:

MSet(Tracker=-1661872057.2349)
-

If I simply do

Tracker="${CDR(uniqueid)}";

it works as required.

It's just not the sort of syntax I've seen in any other language, and it feels 
(to me) weird.

Maybe the documentation: "NOTE: AEL wraps the right hand side of an assignment 
with $[ ] to allow expressions to be used If this is unwanted, you can protect 
the right hand side from being wrapped by using the Set() application." could 
be enhanced to point out that quote marks can overcome the problem as well?

https://wiki.asterisk.org/wiki/display/AST/AEL+Variables


Antony.

-- 
"640 kilobytes (of RAM) should be enough for anybody."

 - Bill Gates

   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] AEL switch & case

2022-08-31 Thread Antony Stone
Replying to list this time...

On Wednesday 31 August 2022 at 12:47:13, aster...@phreaknet.org wrote:

> On 8/31/2022 6:32 AM, Antony Stone wrote:
> > Hi.
> > 
> > I think I've discovered a bug in either the implementation or the
> > documentation of the AEL switch command.
> > 
> > https://wiki.asterisk.org/wiki/display/AST/AEL+Conditionals gives an
> > example of using switch, and states at the bottom:
> > 
> > "Neither the switch nor case values are wrapped in $[ ]; they can be
> > constants, or ${var} type references only."
> > 
> > However, I've run into a problem, which can be demonstrated by the simple
> > context:
> > 
> > context SwitchTest {
> >s => {
> >  Set(FortyTwo=42);
> >  Set(SixByNine=54);
> >  switch(${SixByNine}) {
> >case 123:
> >  NoOp(123);
> >  break;
> >case ${FortyTwo}:
> >  NoOp(${FortyTwo});
> >  break;
> >  }
> >}
> > }

> > Am I misundertanding "they can be constants, or ${var} type references
> > only."?
> 
> I don't think this is a bug. ${FortyTwo} is not defined when the AEL
> dialplan is transpiled into dialplan. It only gets set at runtime.

Agreed, however that is surely a perfectly reasonable "${var} type reference"?

> This might work if you made FortyTwo a global variable, which would be
> available when this gets parsed.

Quite possibly, but I would expect switch() to work in the same way as 
multiple if() statements:

switch(${a}) {
  case ${b}: NoOp(${b} matches); break;
  case ${c}: NoOp(${c} matches); break;
// etc
}

should be equivalent to:

if(${a}=${b}) NoOp(${b} matches);
if(${a}=${c}) NoOp(${c} matches);
// etc

The latter works perfectly well, no matter when ${b} and ${c} are assigned 
their values.

I've adjusted my dialplan to use multiple if()s, but I still thik that either 
the implementation or the documentation of switch is incorrect.


Antony.

-- 
I bought a book on memory techniques, but I've forgotten where I put it.

   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] AEL switch & case

2022-08-31 Thread Antony Stone
Hi.

I think I've discovered a bug in either the implementation of the 
documentation of the AEL switch command.

https://wiki.asterisk.org/wiki/display/AST/AEL+Conditionals gives an example 
of using switch, and states at the bottom:

"Neither the switch nor case values are wrapped in $[ ]; they can be 
constants, or ${var} type references only."

However, I've run into a problem, which can be demonstrated by the simple 
context:

context SwitchTest {
  s => {
Set(FortyTwo=42);
Set(SixByNine=54);
switch(${SixByNine}) {
  case 123:
NoOp(123);
break;
  case ${FortyTwo}:
NoOp(${FortyTwo});
break;
}
  }
}

This gets converted by AEL into:

[ Context 'SwitchTest' created by 'pbx_ael' ]
  's' =>1. MSet(~~EXTEN~~=${EXTEN})
2. Set(FortyTwo=42)
3. Set(SixByNine=54)
4. Goto(sw_5410_${SixByNine},10)
5. NoOp(Finish switch_SwitchTest_5410)
  'sw_5410_' => 10. Goto(sw_5410_.,10)
11. Goto(s,5)
  'sw_5410_123' =>  10. NoOp(123)
11. Goto(s,5)
  '_sw_5410_.' =>   10. Goto(s,5)

So, there was no implementation of the "case ${FortyTwo}" match.

Am I misundertanding "they can be constants, or ${var} type references only."?


Antony.

-- 
Normal people think "If it ain't broke, don't fix it".
Engineers think "If it ain't broke, it doesn't have enough features yet".

   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] Originate with label?

2022-08-31 Thread Antony Stone
On Tuesday 30 August 2022 at 23:51:34, Mark Murawski wrote:

> On 8/30/22 12:34, Antony Stone wrote:

> >>>   Tracker=${CDR(uniqueid)};
> >>> 
> >>> results in:
> >>>   MSet(Tracker=-1661872057.2349)
> >>> 
> >>> systemname is missing.
> 
> Please re-evaluate what I wrote previously.  Again, this is not a
> problem with MSet.  You can see this for yourself if you do an inline
> MSet(Tracker=${CDR(uniqueid)});  this will work fine.

Aha - now I see that my problems (or confusions) are being caused by the 
automatic wrapping in $[..] and not by MSet itself, thank you.

> Just because the documentation says that MSet should not be used, it's
> not appropriate to blame all undesirable behaviors on MSet(), since
> clearly MSet() is not the problem here.

Agreed.

> > I think we'll have to disagree on what a programmer "expects" a syntax
> > like var=value to do, then.

> > What I am suggesting is that Tracker=${CDR(uniqueid)} should be converted
> > by AEL into Set(Tracker=${CDR(uniqueid)}) in order to avoid this sort of
> > surprise.
> 
> On the flip-side... anyone who currently relies on purely
> numeric/boolean handling of the current implementation would be
> incredibly surprised to find their AEL suddenly broken... so we need to
> take that into account.

Indeed.

I realise that the better solution might be to wrap assignments (inside Set() 
or MSet(), no matter) with $[..] *only* if the expressions contain arithmetic 
operators + - * / and not if they are simple a=b assignments, including 
a=${b}.

This would ensure that even if ${b} expanded to something containing a dash, 
it would be interpreted as a mathematical minus sign in a=${b}

> I'm a huge fan of enhancements and improvements and bug fixes, but as
> noted, MSet isn't the problem here.

Indeed, I agree with you now.  I was focusing on MSet and not $[..]

> But... currently I don't see a justifiable reason to make this a thing,
> unless there's actual problems demonstrated with the fact that MSet is being
> used.

I would still be interested to know whether there are any examples of MSet() 
doing what one expects and Set() in the same situation causing a problem.


Thanks,


Antony.

-- 
This sentence contains exacly three erors.

   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] Originate with label?

2022-08-30 Thread Antony Stone
On Tuesday 30 August 2022 at 18:17:08, Mark Murawski wrote:

> On 8/30/22 11:16, Antony Stone wrote:
> > If I write in my AEL dialplan:
> > Set(Tracker=${CDR(uniqueid)});
> > 
> > this results in executing:
> > Set(Tracker=eagle.domain.com-1661872057.2349)
> > 
> > Just what I want.
> > 
> > However writing:
> > Tracker=${CDR(uniqueid)};
> > 
> > results in:
> > MSet(Tracker=-1661872057.2349)
> > 
> > systemname is missing.
> 
> Hi Antony,
> 
> This is not a problem with MSet.

No, it is indeed the documented behaviour of MSet "MSet behaves in a similar 
fashion to the way Set worked in 1.2/1.4 and is thus prone to doing things 
that you may not expect."

> Keep in mind that AEL is a transpiler, the AEL itself is not evaluated
> at the time of execution... extensions.conf-style dialplan is what's
> being executed.

Agreed.

> Also... keep in mind that var=val assignments always use surround the
> value with $[]  which will either evaluate math or boolean expressions.
> 
> Since 'eagle.domain.com' is not numeric, and not boolean, it's expected
> it would not be included in the final value.

Yes, but to be fair, that is not what I would expect Tracker=${CDR(uniqueid)} 
to do in any other language.

> If you do a 'dialplan show' on the context after AEL has processed it,
> you'll clearly see the MSet and ${CDR(uniqueid)} being inside $[]

Yes.

> If you run the same code through extensions.conf you'll get exactly the
> same result... so I would call this expected behavior.

I think we'll have to disagree on what a programmer "expects" a syntax like 
var=value to do, then.

> The fix/workaround is to explicitly use Set() when you need to work with
> anything non-numeric and non-boolean

True, and that is precisely what I have been doing in order to avoid such 
problems.  This example slipped through my conversion process (I've been 
converting previously-non-AEL dialplans into AEL because I prefer the general 
style).

What I am suggesting is that Tracker=${CDR(uniqueid)} should be converted by 
AEL into Set(Tracker=${CDR(uniqueid)}) in order to avoid this sort of 
surprise.

If someone knows they want to perform arithmetic, they can write 
Result=$[${var1}-4] and end up with Set(Result=$[${var1}-4]) after AEL has 
done its transpilation.


Maybe you could offer an example of where MSet() does what most people would 
expect, and Set() does not?


I still intend to abide by the documentation for MSet "Avoid its use if 
possible.", and I simply think it would be good if AEL: did the same.



Antony.

-- 
+++ Divide By Cucumber Error.  Please Reinstall Universe And Reboot +++

   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] Originate with label?

2022-08-30 Thread Antony Stone
On Monday 29 August 2022 at 16:29:42, Antony Stone wrote:

> On Monday 29 August 2022 at 16:19:17, Mark Murawski wrote:
>
> > what specific situation prevents you from using a=1; style syntax?  Why are
> > you feeling the need to use Set(a=1) instead of a=1.  What are specific
> > examples where the 'straight-assignment' isn't working for you?
> 
> I don't have any examples where MSet() ends up doing something I do not
> want

I do now.

I use CDR UniqueIDs to track calls being processed through my system, so at 
the start of a context where a call arrives, I assign the value to a variable 
I can use later in the dialplan.

In /etc/asterisk/asterisk.conf I have:

; Prefix uniqueid with a system name for
; Global uniqueness issues.
autosystemname = yes

If I write in my AEL dialplan:

Set(Tracker=${CDR(uniqueid)});

this results in executing:

Set(Tracker=eagle.domain.com-1661872057.2349)

Just what I want.

However writing:

Tracker=${CDR(uniqueid)};

results in:

MSet(Tracker=-1661872057.2349)

systemname is missing.


Antony.

-- 
I don't know, maybe if we all waited then cosmic rays would write all our 
software for us. Of course it might take a while.

 - Ron Minnich, Los Alamos National Laboratory

   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] Originate with label?

2022-08-29 Thread Antony Stone
On Monday 29 August 2022 at 17:00:23, Mark Murawski wrote:

> On 8/29/22 09:30, Antony Stone wrote:
> > It is, although there are ways I think it can be improved - I'm wondering
> > how best to go about proposing these.
> > 
> > The most obvious for now are:
> >   - please can "a=1;" be converted to use Set() instead of MSet()
> >   (especially since MSet is officially deprecated)?
> 
> Currently being discussed!  We can definitely continue talking about the
> pros and cons of adding an option for this or maybe finding another way
> altogether.

Yes, it would useful to implement "backward compatibility" options for AEL, 
just as exist for whatever "non-AEL" is called.

Some equivalent of [general] in extensions.conf might be good?

> >   - same thing for for (;;)
> 
> I see that for (;;) produces an empty MSet().

No, no - I didn't literally mean "(;;)", I meant this as an abbreviation for 
the generic format of the for() syntax.

> Definitely this can be cleaned up.  Thanks for bringing this up.  In the
> meantime you can use while (1)

True; that works for literally "for(;;)", but I think I've never bothered to 
use that :)

I meant it wouod be good to use Set() instead of MSet() for the first and third 
parts of "for (one; two; three);"

> >   - please can gosub be added, to convert into Gosub() (matching goto
> > converting to Goto())?

> I agree that AEL keyword 'gosub' should exist.  That's been one of my
> todo items.  From not only a consistency perspective, but from a syntax
> checking perspective it would benefit from reporting whether or not your
> gosub destination exists or not, just like goto will complain that the
> destination doesn't exist when the context/extension/priority used is
> not valid.

Sounds good.

> The '&' syntax does use GoSub under the hood, and not the deprecated
> Macro().

Yes, agreed.

> And I'm not sure what you mean by redundant parameters?  When you use AEL
> 'macro' to define a '& destination', it uses the positional parameters that
> are passed in as ARG1/ARG2/etc that are inherent in using GoSub and converts
> them to more friendly named-parameters (as defined in the macro definition).

That's precisely what I mean :)

If you use Gosub(), you can reference your parameters as ARG1/2/3/etc, but if 
you use &, you end up with several "MSet(xxx=${ARG1});" etc at the start of 
your subroutine.

These, in my opinion, are redundant,

> This is why there's always a group of MSet's generated when using AEL
> 'macro'.

See above :)

> If you don't want these extra MSets, then feel free to define a straight up
> context to GoSub into and you can do your own parameter processing using
> ARG1/ARG2/etc

I do.

I just wish there were a gosub in AEL mapping to Gosub() to match goto mapping 
to Goto().

> >   - it would be great if the redundant NoOp()s which get created by if ..
> > else, while ... and for(;;) could be (maybe optionally?) removed from
> > the resultant dialplan code - otherwise you end up with lots of added
> > commands such as NoOp(Finish if_if_fromTrunk_208_209); in the output.
> 
> They aren't redundant specifically, they were left in there (not by me)
> for debugging/tracing purposes.

Hence my "maybe optionally" suggestion.

> But for the casual user, I agree they are mysterious and not very useful. My
> idea to address this is to instead report on the actual if condition to
> assist with tracing/troubleshooting.

I'd prefer to see an option in extensions.ael to say whether you want them at 
all or not.

> This is a mockup of what the new-style if/else processor would output
> 
>  26. NoOp(AEL IF("\${DIALSTATUS}" == "BUSY") --
> extensions.ael:1405)
>  27. GotoIf($["${DIALSTATUS}" == "BUSY"]?28:30)
>  28. Set(voiceMailOptions=b)
>  29. Goto(32)
>  30. NoOp(AEL ELSE -- extensions.ael:1409)
>  31. Set(voiceMailOptions=u)
>  31. NoOp(AEL END ELSE -- extensions.ael:1410)
>  32. NoOp(AEL END IF("\${DIALSTATUS}" == "BUSY") --
> extensions.ael:1411)
>  33. NoOp(DoStuff)

I would disagree with *any* extra NoOp()s being included in the resultant 
output unless the user has asked for them.

Let the code simply express what the user wrote and not add anything 
(especially stuff which will end up in a verbose log) which doesn't correspond 
to the original input (unless necessary for the logic to work).

> My idea is that the 'if' block would be preceded by outputting the
> logical condition we're about to check, along with t

Re: [asterisk-users] Originate with label?

2022-08-29 Thread Antony Stone
On Monday 29 August 2022 at 16:19:17, Mark Murawski wrote:

> On 8/29/22 10:15, Antony Stone wrote:
> >> But!  What specific reason do you have for wanting Set() instead of
> >> MSet() for all assignments that can't be otherwise just written as an
> >> in-line Set() instead?
> > 
> > I *am* currently writing inline Set() everywhere, but surely the syntax
> > "a=1;" instead of "Set(a=1);" is supposed to be one of the advantages of
> > AEL over standard Asterisk dialplan language?
> 
> Hi Antony,
> 
> Right... using a=1; one advantage of using AEL, so you don't have to
> type Set() everywhere... but what I'm trying to get at is... and my
> original question is:  what specific situation prevents you from using
> a=1; style syntax?  Why are you feeling the need to use Set(a=1) instead
> of a=1.  What are specific examples where the 'straight-assignment'
> isn't working for you?

I don't have any examples where MSet() ends up doing something I do not want, 
but going by the documentation saying "avoid its use if possible", that's what 
I prefer to do.

> Note: Make sure to use 'Reply All'.. I typically do a list reply and
> direct reply.

Okay, replying to you as well this time, but please don't do the same back to 
me (see sig).


Antony.

-- 
If the human brain were so simple that we could understand it,
we'd be so simple that we couldn't.

   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] Originate with label?

2022-08-29 Thread Antony Stone
On Monday 29 August 2022 at 15:35:09, Joshua C. Colp wrote:

> MSet is not deprecated.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_MSet 
includes the sentence "MSet behaves in a similar fashion to the way Set worked 
in 1.2/1.4 and is thus prone to doing things that you may not expect." and 
ends with "Avoid its use if possible."

So, that may not mean "officially deprecated", but it still strongly suggests 
to 
me that it's undesirable for AEL to convert all assignments into MSet instead 
of Set (allowing the user to explicitly write MSet if that's what's desired).


Antony.

-- 
Atheism is a non-prophet-making organisation.

   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] Originate with label?

2022-08-29 Thread Antony Stone
On Monday 29 August 2022 at 14:51:27, Mark Murawski wrote:

> On 8/29/22 08:48, Mark Murawski wrote:
> > 
> > Hi Antony,
> > 
> > I love to hear about AEL use-cases.  I'm happy that AEL is working out
> > for you.

It is, although there are ways I think it can be improved - I'm wondering how 
best to go about proposing these.

The most obvious for now are:

 - please can "a=1;" be converted to use Set() instead of MSet() (especially 
since MSet is officially deprecated)?

 - same thing for for (;;)

 - please can gosub be added, to convert into Gosub() (matching goto 
converting to Goto())?  The & syntax is completely different from the rest of 
the language, and also creates redundant assignments at the start of the 
subroutine for parsing the parameters.  Now that macros are deprecated in 
favour of subroutines, it makes sense, I think, to make gosub a part of AEL.

 - it would be great if the redundant NoOp()s which get created by if .. else, 
while ... and for(;;) could be (maybe optionally?) removed from the resultant 
dialplan code - otherwise you end up with lots of added commands such as 
NoOp(Finish if_if_fromTrunk_208_209); in the output.

 - finally, it would be good if the documentation could be clear about whether 
the extensions.conf [general] section can be substituted using AEL.  I haven't 
yet worked out whether this is possible or not.

> > Without modifying the code for Originate(), you can do this while
> > staying purely in AEL
> > Here's your workaround:
> > 
> > context something {
> >   s => {
> > Originate(Local/${Dest}@Dialout,exten,${CONTEXT},GotoLabel,1,,v(GotoExten
> > =${EXTEN}^GotoLabel=LabelName)); }
> > 
> >   GotoLabel => {
> > goto ${CONTEXT}, ${GotoExten}, ${GotoLabel};
> >   }
> > }

Right, I had wondered about using the v option.  Thanks for the suggestion.

In the meantime I came up with:

Originate(Local/${Dest}@Dialout,exten,${CONTEXT},Orig${EXTEN},1);

_OrigX. => goto ${EXTEN:4},target;

> And, additionally.  You really *should* be breaking down components into
> their own macros or extension blocks.  Adding labels to jump into the
> middle of an extension is typically a sign that you've outgrown your
> overall design.

Oh, I already have plenty of contexts and a fair number of extensions.  I'm 
not writing the entire dialplan in one context :)

There's a good reason why I need to jump to another location in the same 
context once the Originate has completed.

> It's much. much. much easier to build a system up from different
> contexts,extensions and use goto/gosub and make your system more modular
> instead of having one-giant-context with one-giant-extension that tries
> to do everything.

Very much agreed.


Antony.

-- 
I conclude that there are two ways of constructing a software design: One way 
is to make it so simple that there are _obviously_ no deficiencies, and the 
other way is to make it so complicated that there are no _obvious_ 
deficiencies.

 - C A R Hoare

   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] Originate with label?

2022-08-29 Thread Antony Stone
Hi.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Originate

I need to use Originate() in a dialplan, pointing to another location in the 
same extension of the same context, so for example:

Originate(Local/${Dest}@Dialout,exten,${CONTEXT},${EXTEN},158);

I don't seem to be able to substitute the priority 158 with a label - is this 
deliberate or is this a bug?

If it is deliberate, is there any workaround which would enable me to use 
Originate when the dialplan is written in AEL, which makes it not possible for 
me to define priority numbers?

(Alternatively, is there a way to define priority numbers in AEL?)

I'd prefer the first solution - being able to use Originate with a label as the 
target - as it's neater and more generic.


Thanks,


Antony.

-- 
"this restriction will not apply in the event of the occurrence (certified by 
the United States Centers for Disease Control or successor body) of a 
widespread viral infection transmitted via bites or contact with bodily fluids 
that causes human corpses to reanimate and seek to consume living human flesh, 
blood, brain or nerve tissue and is likely to result in the fall of organized 
civilization."

 - https://aws.amazon.com/service-terms/ paragraph 42.10

   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] extensions.conf [General] settings

2022-08-22 Thread Antony Stone
On Monday 22 August 2022 at 18:55:08, List Support wrote:

> Hi
> 
> Le 22/08/2022 à 17:16, Antony Stone a écrit :
> > Hi.
> > 
> > Is there any way to find out the values of variables set in the [General]
> > section of extensions.conf from the Asterisk CLI (not from inside the
> > dialplan, I just mean at the "hostname*CLI>" prompt)?
> > 
> > https://www.voip-info.org/asterisk-dialplan-general/
> 
> CLI> dialplan show globals ?

No, global variables are different.

They are defined in the [globals] section of extensions.conf.

I'm talking about the [general] section.


Antony.

-- 
"The problem with television is that the people must sit and keep their eyes 
glued on a screen; the average American family hasn't time for it."

 - New York Times, following a demonstration at the 1939 World's Fair.

   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] extensions.conf [General] settings

2022-08-22 Thread Antony Stone
Hi.

Is there any way to find out the values of variables set in the [General] 
section of extensions.conf from the Asterisk CLI (not from inside the 
dialplan, I just mean at the "hostname*CLI>" prompt)?

https://www.voip-info.org/asterisk-dialplan-general/

Thanks,


Antony.

-- 
If you can smile when all about you things are going wrong, you must have 
someone in mind to take the blame.

   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] Community Forum

2022-07-05 Thread Antony Stone
On Tuesday 05 July 2022 at 11:30:35, Joshua C. Colp wrote:

> Kia ora,
> 
> Kind of a random email here but thought I'd remind everyone of the
> community forums at https://community.asterisk.org/ which see more activity
> than the mailing list. If you've got questions/issues, you may find an
> answer there instead of the mailing list.

Does that forum software support sending & receiving emails to/from it?

I'm on a few forums/lists such as Icinga, Grafana and InfluxDB which allow me 
to create an account and then receive a copy of all postings by email, to 
which I can also reply if I am able to, and the replies go back to the forum.

That way, people who want separate web browser logins to each forum they're on 
can have their preferred interface, and people who want to manage everything 
in a single mail client can have theirs.


Antony.

-- 
Why is "dyslexia" so difficult to spell, and why can I never remember "aphasia" 
when I want to?

   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] Docs for AEL?

2022-06-29 Thread Antony Stone
Hi.

I'm wondering where the current documentation for AEL is.

I've found https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=4620445 
but there's hardly any content there and it's over 10 years old.

Where should I be looking, please?


Antony.

-- 
I don't know, maybe if we all waited then cosmic rays would write all our 
software for us. Of course it might take a while.

 - Ron Minnich, Los Alamos National Laboratory

   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] Logging different verbosity levels

2022-05-25 Thread Antony Stone
On Wednesday 25 May 2022 at 16:54:43, aster...@phreaknet.org wrote:

> On 5/25/2022 10:41 AM, Antony Stone wrote:
> > On Wednesday 25 May 2022 at 15:27:38, aster...@phreaknet.org wrote:
> >> 
> >> If I want to log something from the dialplan, I generally send it to a
> >> custom log level, as opposed to one of the built in ones.
> > 
> > How are you doing this?
> 
> See the custom_levels option in the sample logger.conf[1].
> You'll need a version of Asterisk from the last ~7 months or so, I think.

Ah.  I use the Debian packaged version, which for the current stable Debian 
release is Asterisk 16.16.1 dated Feb 2021.

custom_levels definitely isn't in there.

> It does sound like using custom levels might be better than your use case.
> You can also set up custom log files to log only the log levels you want to
> create the different "views" you want.

Indeed - thanks for the suggestion - looks like a nice feature.


Antony.

-- 
This email was created using 100% recycled electrons.

   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] Logging different verbosity levels

2022-05-25 Thread Antony Stone
On Wednesday 25 May 2022 at 15:27:38, aster...@phreaknet.org wrote:

> On 5/25/2022 8:11 AM, Antony Stone wrote:
> > On Tuesday 24 May 2022 at 01:12:46, Kevin Harwell wrote:
> >> So this turned out more complicated than I originally thought!
> > 
> > Wow, thank you very much for:
> > 
> > a) such a comprehensive answer
> > 
> > b) confirming my findings
> > 
> > c) most of all, working out why and how all this stuff works (or,
> > perhaps, doesn't).
> > 
> > I wonder that nobody has discovered this before - do people not want
> > selective logging levels in their dialplans?
> 
> If I want to log something from the dialplan, I generally send it to a
> custom log level, as opposed to one of the built in ones.

How are you doing this?

> That way, it's not combined with a bunch of other stuff from Asterisk itself
> that I generally don't want. This also allows filtering on specific custom log
> levels. Verbose gets used for so much that if something got logged there
> it would just get lost.

Indeed - that was precisely my reasoning for wanting to use the different 
Verbose(N,message) levels and corresponding log files - so that I could keep 
specific things separate from each other.


Antony.

-- 
There's a good theatrical performance about puns on in the West End.  It's a 
play on words.

   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] Logging different verbosity levels

2022-05-25 Thread Antony Stone
On Tuesday 24 May 2022 at 01:12:46, Kevin Harwell wrote:

> So this turned out more complicated than I originally thought!

Wow, thank you very much for:

a) such a comprehensive answer

b) confirming my findings

c) most of all, working out why and how all this stuff works (or, perhaps, 
doesn't).

I wonder that nobody has discovered this before - do people not want selective 
logging levels in their dialplans?

Hm.


Thanks again,

Antony.

-- 
Don't procrastinate - put it off until tomorrow.

   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] Logging different verbosity levels

2022-05-23 Thread Antony Stone
Hi.

Does no-one else know either?  I thought this was a simple question, and it 
was just me being unable to find the appropriate documentation to explain how 
these logging levels work.

Please, can anyone help?

On Friday 20 May 2022 at 15:33:45, Antony Stone wrote:

> Hi.
> 
> I'm trying to use different logging verbosity levels to get dialplan output
> into different log files, and there's clearly something I haven't
> understood about how Asterisk does this...
> 
> 
> I have the following in /etc/asterisk/logger.conf:
> 
> [logfiles]
> logtest.verbose.0 => verbose(0)
> logtest.verbose.1 => verbose(1)
> logtest.verbose.2 => verbose(2)
> logtest.verbose.3 => verbose(3)
> logtest.verbose.4 => verbose(4)
> logtest.verbose.5 => verbose(5)
> logtest.verbose.6 => verbose(6)
> logtest.verbose.7 => verbose(7)
> logtest.verbose.8 => verbose(8)
> logtest.verbose.9 => verbose(9)
> 
> I then put the following at a particular point in my dialplan:
> 
> same => n,Verbose(0,Test message verbosity 0)
> same => n,Verbose(1,Test message verbosity 1)
> same => n,Verbose(2,Test message verbosity 2)
> same => n,Verbose(3,Test message verbosity 3)
> same => n,Verbose(4,Test message verbosity 4)
> same => n,Verbose(5,Test message verbosity 5)
> same => n,Verbose(6,Test message verbosity 6)
> same => n,Verbose(7,Test message verbosity 7)
> same => n,Verbose(8,Test message verbosity 8)
> same => n,Verbose(9,Test message verbosity 9)
> 
> I was expecting to get each message output into the respective filename,
> but instead I got 10 files with the expected filenames, and all containing
> every test message, no matter which verbosity level it was output at.
> 
> I'm sure there's just something basic which I haven't understaood from
> 
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Verbose
> 
> and
> 
> https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration
> 
> 
> Can someone please show me what I'm missing, so that I can get each
> Verbose(N,Message) dialplan command to send its message into the log file
> numbered N?
> 
> 
> Thanks,
> 
> 
> Antony.

-- 
The Magic Words are Squeamish Ossifrage.

   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] Logging different verbosity levels

2022-05-20 Thread Antony Stone
On Friday 20 May 2022 at 15:33:45, Antony Stone wrote:

> Hi.
> 
> I'm trying to use different logging verbosity levels to get dialplan output
> into different log files, and there's clearly something I haven't
> understood about how Asterisk does this...
> 
> 
> I have the following in /etc/asterisk/logger.conf:

Hm, the formatting of this mail seems to have got somewhat mangled on its way 
through the list server, I think - I'll edit it and try again, just so it's 
easier for people to see what I did:

> [logfiles]
> logtest.verbose.0 => verbose(0)
> logtest.verbose.1 => verbose(1)
> logtest.verbose.2 => verbose(2)
> logtest.verbose.3 => verbose(3)
> logtest.verbose.4 => verbose(4)
> logtest.verbose.5 => verbose(5)
> logtest.verbose.6 => verbose(6)
> logtest.verbose.7 => verbose(7)
> logtest.verbose.8 => verbose(8)
> logtest.verbose.9 => verbose(9)
> 
> I then put the following at a particular point in my dialplan:
> 
> same => n,Verbose(0,Test message verbosity 0)
> same => n,Verbose(1,Test message verbosity 1)
> same => n,Verbose(2,Test message verbosity 2)
> same => n,Verbose(3,Test message verbosity 3)
> same => n,Verbose(4,Test message verbosity 4)
> same => n,Verbose(5,Test message verbosity 5)
> same => n,Verbose(6,Test message verbosity 6)
> same => n,Verbose(7,Test message verbosity 7)
> same => n,Verbose(8,Test message verbosity 8)
> same => n,Verbose(9,Test message verbosity 9)
> 
> I was expecting to get each message output into the respective filename,
> but instead I got 10 files with the expected filenames, and all containing
> every test message, no matter which verbosity level it was output at.
> 
> I'm sure there's just something basic which I haven't understaood from
> 
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Verbose
> 
> and
> 
> https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration
> 
> 
> Can someone please show me what I'm missing, so that I can get each
> Verbose(N,Message) dialplan command to send its message into the log file
> numbered N?
> 
> 
> Thanks,
> 
> 
> Antony.

-- 
"There is no reason for any individual to have a computer in their home."

 - Ken Olsen, President of Digital Equipment Corporation (DEC, later consumed 
by Compaq, later merged with HP)

   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] Logging different verbosity levels

2022-05-20 Thread Antony Stone
Hi.

I'm trying to use different logging verbosity levels to get dialplan output 
into different log files, and there's clearly something I haven't understood 
about how Asterisk does this...


I have the following in /etc/asterisk/logger.conf:

[logfiles]
logtest.verbose.0 => verbose(0) 




logtest.verbose.1 => verbose(1) 




logtest.verbose.2 => verbose(2) 




logtest.verbose.3 => verbose(3) 




logtest.verbose.4 => verbose(4) 




logtest.verbose.5 => verbose(5) 




logtest.verbose.6 => verbose(6) 




logtest.verbose.7 => verbose(7) 




logtest.verbose.8 => verbose(8) 




logtest.verbose.9 => verbose(9)

I then put the following at a particular point in my dialplan:

same => n,Verbose(0,Test message verbosity 0)   




same => n,Verbose(1,Test message verbosity 1)
same => n,Verbose(2,Test message verbosity 2)
same => n,Verbose(3,Test message verbosity 3)
same => n,Verbose(4,Test message verbosity 4)
same => n,Verbose(5,Test message verbosity 5)
same => n,Verbose(6,Test message verbosity 6)
same => n,Verbose(7,Test message verbosity 7)
same => n,Verbose(8,Test message verbosity 8)
same => n,Verbose(9,Test message verbosity 9)

I was expecting to get each message output into the respective filename, but 
instead I got 10 files with the expected filenames, and all containing every 
test message, no matter which verbosity level it was output at.

I'm sure there's just something basic which I haven't understaood from

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Verbose

and

https://wiki.asterisk.org/wiki/display/AST/Logging+Configuration


Can someone please show me what I'm missing, so that I can get each 
Verbose(N,Message) dialplan command to send its message into the log 

Re: [asterisk-users] Decimal seconds?

2022-03-16 Thread Antony Stone
On Wednesday 16 March 2022 at 13:38:44, Tom Ray wrote:

> What have you actually tried? STRFTIME(NOW,America/Detroit,%3q) doesn't
> work?

That works - thank you for the pointer.  I was not aware of the word "NOW" - I 
have always used the variable ${EPOCH} when I needed a timestamp.

Do you know where this is documented?  I would have expected it to be in 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables 
for example, which does mention ${EPOCH}, and also shows an example of 
${STRFTIME()}, using ${EPOCH} as the timestamp value.


Antony.

> -Original Message-
> From: asterisk-users  On Behalf Of
> Antony Stone Sent: Wednesday, March 16, 2022 8:20 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
>  Subject: Re: [asterisk-users] Decimal
> seconds?
> 
> Hi.
> 
> Has nobody got a clue for me about this?
> 
> It must be possible somehow, otherwise the %3q parameter wouldn't exist...
> 
> On Friday 11 March 2022 at 17:31:54, Antony Stone wrote:
> > Hi.
> > 
> > I'm looking at
> > https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_STRFTIME
> > and trying to work out how to obtain an Epoch timestamp for "now"
> > containing fractional / decimal seconds so that the %3q format parameter
> > works.
> > 
> > https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Vari
> > ab les doesn't seem to tell me.
> > 
> > Can someone point me in the right direction please?
> > 
> > 
> > Antony.

-- 
Programming is a Dark Art, and it will always be. The programmer is
fighting against the two most destructive forces in the universe:
entropy and human stupidity. They're not things you can always
overcome with a "methodology" or on a schedule.

 - Damian Conway, Perl God

   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] Decimal seconds?

2022-03-16 Thread Antony Stone
Hi.

Has nobody got a clue for me about this?

It must be possible somehow, otherwise the %3q parameter wouldn't exist...

On Friday 11 March 2022 at 17:31:54, Antony Stone wrote:

> Hi.
> 
> I'm looking at
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_STRFTIME
> and trying to work out how to obtain an Epoch timestamp for "now"
> containing fractional / decimal seconds so that the %3q format parameter
> works.
> 
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variab
> les doesn't seem to tell me.
> 
> Can someone point me in the right direction please?
> 
> 
> Antony.

-- 
My life is going completely according to plan.

I do sometimes wish it had been *my* plan, though.

   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] Decimal seconds?

2022-03-11 Thread Antony Stone
Hi.

I'm looking at 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_STRFTIME and 
trying to work out how to obtain an Epoch timestamp for "now" containing 
fractional / decimal seconds so that the %3q format parameter works.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables 
doesn't seem to tell me.

Can someone point me in the right direction please?


Antony.

-- 
I lay awake all night wondering where the sun went, and then it dawned on me.

   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] How to escape the & in BackGround

2022-01-28 Thread Antony Stone
On Friday 28 January 2022 at 02:43:17, John Covici wrote:

> I have been using system commands in my dialplan for years and the &
> goes through and puts the process in background like it should,
> asterisk does not do anything, so you are left with what the shell
> does.

That's completely different from trying to put an & into the Background() or 
Playback() commands, where Asterisk does treat the symbol specially.


Antony.

-- 
+++ Divide By Cucumber Error.  Please Reinstall Universe And Reboot +++

   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] How to escape the & in BackGround

2022-01-27 Thread Antony Stone
On Thursday 27 January 2022 at 21:31:35, Kingsley Tart wrote:

> Does asterisk follow HTTP redirects? If so can you use something like
> tinyurl.com to produce an alternative URL?

I'm (pretty) sure that that would work.

The other similar idea I had was to use a reverse proxy server to accept an 
Asterisk-compatible URL and convert it into whatever the outisde world 
requires.

> Or, base64 encode the URL, and then set a variable with
> Set(url=${BASE64_DECODE(${encodedURL})) ?

No, doesn't work - I tried several things yesterday to see if I could get this 
to work, and you don't even need to use Base64 en/de-coding - you can set an 
Asterisk variable to the URL including the &, and then pass that to the 
Background() command, and it fails.

I tried it pointing to a web server I run, so I can see the requests which are 
sent, and a ? gets through, but a & doesn't.  Converting it to %26 simply 
sends that through as-is, which fails at the web server end.

So, I think this is a bug/feature-fail in Asterisk, which can't be worked 
around.


Antony.

-- 
"In fact I wanted to be John Cleese and it took me some time to realise that 
the job was already taken."

 - Douglas Adams

   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] ConfBridge user joining not getting video

2022-01-13 Thread Antony Stone
On Thursday 13 January 2022 at 15:45:02, Jerry Geis wrote:

> > Hi Josh
> >
> >chan_sip did not add a video stream. What is the actual configuration for
> >
> > it? What is the actual call file used for it?
> 
> sip.conf has videosupport in the general section.
> 
> I did find that where I am "joining" the person in the conference I did not
> have the Codecs: set.  I added that - doing better - its negotiating video
> now - but still not showing me video for a conference.

Can you make a 1-to-1 video call between two of the devices (which I assume 
does give you video?), and then get just those two to join a conference, and 
see the difference in SDP?


Antony.

-- 
The first fifty percent of an engineering project takes ninety percent of the 
time, and the remaining fifty percent takes another ninety percent of the time.

   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] extensions.conf asterisk 18.8.0 question

2022-01-11 Thread Antony Stone
On Tuesday 11 January 2022 at 17:20:44, Michael Englehorn wrote:

> If you're on RHEL or CentOS or one of its descendants,

Oh, now that reminds me that those systems also tend to alias "rm" to "rm -i", 
so they won't delete files without confirmation.

Irritating in general IMHO, but it might be the cause of your puzzlement...

> ‐‐‐ Original Message ‐‐‐
> 
> On Monday, January 10th, 2022 at 1:03 PM, Jerry Geis wrote:
> > I am trying to run this command:
> > exten => _4XX,n,System(/usr/bin/rm /tmp/test.incoming.txt)
> > 
> > 
> > From the log:
> > Executing [402@smvoice-sip:7] System("SIP/103-0018", "/usr/bin/rm
> > /tmp/test.incoming.txt") in new stack
> > 
> > 
> > Is "rm" not an allowed command - the above file is not removed.
> > -rw-rw-rw- 1 silentm silentm 3 Jan 10 14:02 /tmp/test.incoming.txt


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] extensions.conf asterisk 18.8.0 question

2022-01-10 Thread Antony Stone
On Monday 10 January 2022 at 20:03:55, Jerry Geis wrote:

> I am trying to run this command:
> exten => _4XX,n,System(/usr/bin/rm /tmp/test.incoming.txt)
> 
> From the log:
> Executing [402@smvoice-sip:7] System("SIP/103-0018", "/usr/bin/rm
> /tmp/test.incoming.txt") in new stack
> 
> 
> Is "rm" not an allowed command - the above file is not removed.
> -rw-rw-rw- 1 silentm silentm 3 Jan 10 14:02 /tmp/test.incoming.txt

1. Does your asterisk instance run as user "silentm"?

2. What happens if you add the "-f" parameter to the "rm" command in the 
dialplan?

3. What does "sudo -u asteriskuser rm /tmp/test.incoming.txt" do, if you run 
it as the root user, and substituting whichever user your asterisk instance 
runs as in place of "asteriskuser"?


Antony.

-- 
A user interface is like a joke.
If you have to explain it, it means it doesn't work.

   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 and maybe a freepbx question

2022-01-08 Thread Antony Stone
On Sunday 09 January 2022 at 00:50:27, John Covici wrote:

> Hi.  I am using asterisk 18.3 and freepbx.

Hm, which version of FreePBX uses Asterisk 18.3?

> How can both sip and pjsip be listening at port 5060 at the same time

They can't.

One might be on TCP and the other on UDP, but you can't have them both 
listening on the same port with the same protocol.

> for instance I get:
> 
> [2022-01-08 17:08:59] SECURITY[244351] res_security_log.c:
> SecurityEvent="FailedACL",EventTV="2022-01-08T17:08:59.957-0500",Severity="
> Error",Service="PJSIP",EventVersion="1",AccountID="anonymous",SessionID="20
> 25076022",LocalAddress="IPV4/UDP/166.84.7.53/5060",RemoteAddress="IPV4/UDP/
> 45.134.144.118/5823",ACLName="registrar_attempt_without_configured_aors"

What makes you think chan_sip and pjsip are both listening on UDP 5060?

> I would like pjsit not to listen,till I figure out how to configure
> the thing, so my logs don't fill up with messages.
> 
> Thanks in advance for any suggestions.

As far as I recall using FreePBX, there is a selector for the SIP protocol to 
tell it whether you want it to use pjsip or chan_sip.  I don't think it even 
supports using both at the same time, so simply make sure that is set to 
chan_sip and you should be fine.

On the other hand, why do you need to learn "how to configure the thing" if 
you're using FreePBX?  Part of the whole point is that it does the fiddly 
techie sutff in the background for you, and you just need to use the personnel-
department-friendly web GUI.


Antony.

-- 
"Good health" is merely the slowest rate at which you can die.

   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] Called number changed on SNOM 821

2021-12-31 Thread Antony Stone
On Friday 31 December 2021 at 15:54:01, Luca Bertoncello wrote:

> Am 31.12.2021 um 14:39 schrieb Antony Stone:
> 
> Hi Antony
> 
> >> Last very strange problem is, that the list of missed calls on the phone
> >> is always empty...
> > 
> > Check the SIP notifications which are being sent to the telephone for
> > these calls, and whether any of them contain a "Reason" code for
> > "Answered elsewhere".
> 
> Got it...

> Now the very question is how to remove this header...

Check the Dial() command which places the call to the phone.  Does it contain 
the "c" option?

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Dial


Antony.

-- 
In science, one tries to tell people
in such a way as to be understood by everyone
something that no-one ever knew before.

In poetry, it is the exact opposite.

 - Paul Dirac

   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] Called number changed on SNOM 821

2021-12-31 Thread Antony Stone
On Friday 31 December 2021 at 12:29:19, Luca Bertoncello wrote:

> Am 28.12.2021 um 21:21 schrieb Antony Stone:
> 
> Hi
> 
> > However, at least you've got as far as ruling out Telekom as being the
> > source of the problem, which I think is good.
> 
> So, I setted:
> 
>   sendrpid=rpid
> 
> instead of:
> 
>   sendrpid=pai
> 
> and now it seems to work. The called number does not change anymore.

Glad you found a solution to this.

> Last very strange problem is, that the list of missed calls on the phone
> is always empty...

Check the SIP notifications which are being sent to the telephone for these 
calls, and whether any of them contain a "Reason" code for "Answered 
elsewhere".

See https://datatracker.ietf.org/doc/html/rfc3326#section-2 - the first example 
at the top of page 3 shows the sort of thing I mean.

This "answered elsewhere" code is usually used when telephones are in a ring 
group or agents subscribed to a queue, and nobody wants to know about the 
calls which someone else answered, even if their telephone rang, so the phone 
sees this code and eliminates the call from its history.


Antony.

-- 
Pavlov is in the pub enjoying a pint.
The barman rings for last orders, and Pavlov jumps up exclaiming "Damn!  I 
forgot to feed the dog!"

   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] Called number changed on SNOM 821

2021-12-28 Thread Antony Stone
On Tuesday 28 December 2021 at 20:39:37, Luca Bertoncello wrote:

> After about 6 seconds I get from the Telekom:
> 
> Via: SIP/2.0/UDP
> 87.191.224.158:5060;received=87.191.224.158;rport=5060;branch=z9hG4bKPj43be
> 873a-cf55-4348-8867-5c2bb97bd76a
> To: ;
> tag=h7g4Esbg_p65544t1640719676m169304c9321s1_3514393582-932943693
> From:
> ;tag=4781eb96-b155-421e-8206-593d44c9f7c4
> Call-ID: 478ba582-946c-46ac-984d-6f1835e3391b
> CSeq: 15716 INVITE
> Contact: 
> Record-Route: 
> P-Early-Media: sendrecv, gated
> Require: 100rel
> RSeq: 2
> Content-Type: application/sdp
> Content-Length: 281
> Allow: REGISTER, REFER, NOTIFY, SUBSCRIBE, PUBLISH, MESSAGE, UPDATE,
> PRACK, INFO, INVITE, ACK, OPTIONS, CANCEL, BYE

So, no PAID header there, and no mention of "Sekretariat" either.

> Then I see Asterisk sends this to the phone:
> 
> Via: SIP/2.0/UDP
> 192.168.60.53:3072;branch=z9hG4bK-igym6msxn88p;received=192.168.60.53;rport
> =3072
> From: "Sekretariat" ;tag=ts2ye4krhs
> To: ;tag=as32fe51ba
> Call-ID: 313634303731393637343630373636-ex7145moy1mt
> CSeq: 2 INVITE
> Server: Asterisk PBX 16.2.1~dfsg-1+deb10u2
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
> INFO, PUBLISH, MESSAGE
> Supported: replaces
> Contact: 
> P-Asserted-Identity: "03529529874" 
> Content-Length: 0
> 
> So, it seems Asterisk receives from Deutsche Telekom _one_ "Ringing" and
> sends the phone _two_ "Ringing", the second one with the
> P-Asserted-Identity...

Indeed.

> Maybe help it to identify the problem?

I would look at whatever part of the dial plan is responsible for inserting 
"Sekretariat", and also check whether you have "sendrpid=yes" in sip.conf.

However, at least you've got as far as ruling out Telekom as being the source 
of the problem, which I think is good.


Antony.

-- 
I bought a book about anti-gravity.  The reviews say you can't put it down.

   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] Called number changed on SNOM 821

2021-12-28 Thread Antony Stone
On Tuesday 28 December 2021 at 20:07:22, Luca Bertoncello wrote:

> Am 28.12.2021 um 20:00 schrieb Antony Stone:
> > 
> > From your earlier packet capture, it looked to me like you were dialling
> > an external number from an internal telephone.
> 
> This is correct!
> I called my mobile phone using a VoIP phone connected to an Asterisk.
> 
> > If that is true, then you should be looking for a packet *from Telekom*
> > coming in to Asterisk, and a packet *from Asterisk* to the internal
> > telephone - remember that these packets are the _reply_ to the INVITE.
> > 
> > INVITE goes from callING telephone to callED telephone.
> > 
> > Response "180 Ringing" goes from the callED telephone to the callING
> > telephone.
> 
> So do I have to compare the INVITE with the Ringing?

No, you want to look at the "180 Ringing" response in both cases - what goes 
in to Asterisk, and what comes out of it.

The INVITE does not contain the data which gets displayed on the calling 
telephone.

> OK, so I have to sniff the data to Deutsche Telekom and not the internal
> network...

No, data FROM Deutsche Telekom.  They are the ones sending the "180 Ringing" 
back to you once they think the external telephone is ringing.

> Since the Asterisk is not my own, but of a company, I have to ask
> someone to call me from the phone when I sniff the traffic...
> I hope, I find someone tomorrow.

I don't quite follow that, but what I am saying is that the callEE's number 
(the number of the telephone you are calling) may be contained in an RPID 
header of the "180 Ringing" packet which comes back from the telephone being 
called.

You want to find out whether this header, and the strange number you are not 
expecting, exists in the packets coming from your upstream provider IN to 
Asterisk, and also whether it exists in the packet coming FROM asterisk to 
your internal telephone which made the call, and is showing the strange data.


I hope that is clear.


Antony.

-- 
These clients are often infected by viruses or other malware and need to be 
fixed.  If not, the user at that client needs to be fixed...

 - Henrik Nordstrom, on Squid users' mailing list

   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] Called number changed on SNOM 821

2021-12-28 Thread Antony Stone
On Tuesday 28 December 2021 at 19:52:46, Luca Bertoncello wrote:

> Am 28.12.2021 um 19:41 schrieb Antony Stone:
> 
> Hi Antony,
> 
> > Okay, so, returning to my question, do you see any difference between the
> > packet inbound to Asterisk from the called telephone, and the packet
> > outbound from Asterisk to the calling telephone?
> 
> I'm trying to understand what you mean...
> 
> You mean that I should compare what the "180 ringing" in the internal
> network (phone to asterisk) and the external one (asterisk to Telekom)?

Which way round are you making the telephone call?

From your earlier packet capture, it looked to me like you were dialling an 
external number from an internal telephone.

If that is true, then you should be looking for a packet *from Telekom* coming 
in to Asterisk, and a packet *from Asterisk* to the internal telephone - 
remember that these packets are the _reply_ to the INVITE.

INVITE goes from callING telephone to callED telephone.

Response "180 Ringing" goes from the callED telephone to the callING 
telephone.

> If so, then I have to check again, since I only sniffed the internal
> traffic...

I think it's important to find out what Asterisk is receiving from your 
upstream provider, and whether it is then changing this in what it sends on to 
the calling telephone (the one on which you see the unexpected display).


Antony.

-- 
"It would appear we have reached the limits of what it is possible to achieve 
with computer technology, although one should be careful with such statements; 
they tend to sound pretty silly in five years."

 - John von Neumann (1949)

   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] Called number changed on SNOM 821

2021-12-28 Thread Antony Stone
On Tuesday 28 December 2021 at 18:17:00, Luca Bertoncello wrote:

> Am 28.12.2021 um 17:35 schrieb Antony Stone:
> > 
> > Where exactly were those packets captured?
> 
> tcpdump on the Asterisk-Server on the interface of the VLAN for the phones.
> All traffic captured.

Okay, so, returning to my question, do yu see any difference between the packet 
inbound to Asterisk from the called telephone, and the packet outbound from 
Asterisk to the calling telephone?

Antony.

-- 
I have an excellent memory.
I can't think of a single thing I've forgotten.

   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] Called number changed on SNOM 821

2021-12-28 Thread Antony Stone
On Tuesday 28 December 2021 at 17:28:47, Luca Bertoncello wrote:

> Am 28.12.2021 um 17:22 schrieb Antony Stone:
> 
> Hi Antony
> 
> > I mean the response from the called telephone in reply to the INVITE,
> > which contains the SIP code "180 Ringing" and may optionally have an
> > RPID header.
> 
> OK, I see something strange...
> 
> Here what I see if I call my mobile phone (then the number "changes"):

.

> and here what I see if I call another mobile phone (then the number does
> NOT change):

.

> So, I see, there is a "P-Asserted-Identity"... But I can't understand
> why...
> 
> Any idea?

Where exactly were those packets captured?

On the connection from the called telephone sending the reponse in to 
Asterisk?

Or on the connection from Asterisk sending the response out to the calling 
telephone?

(It looks like the latter to me.)

It may well be a good idea to do both and compare, to see whether Asterisk is 
actually adding the header.


Antony.

-- 
3 logicians walk into a bar. The bartender asks "Do you all want a drink?"
The first logician says "I don't know."
The second logician says "I don't know."
The third logician says "Yes!"

   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] Called number changed on SNOM 821

2021-12-28 Thread Antony Stone
On Tuesday 28 December 2021 at 16:58:01, Luca Bertoncello wrote:

> Am 28.12.2021 um 15:42 schrieb Antony Stone:
> 
> Hi Antony,
> 
> > Sounds like something strange is happening with Remote-Party-ID.>
> > Do a packet capture and see whether the 180 response from the callee's
> > phone contains an RPID header with silly content.
> 
> I captured the packet but I don't see anything strange...
> Btw, what do you mean with "180 response"?

I mean the response from the called telephone in reply to the INVITE, which 
contains the SIP code "180 Ringing" and may optionally have an RPID header.


Antony.

-- 
"Measuring average network latency is about as useful as measuring the mean 
temperature of patients in a hospital."

 - Stéphane Bortzmeyer

   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] Called number changed on SNOM 821

2021-12-28 Thread Antony Stone
On Tuesday 28 December 2021 at 14:30:17, Luca Bertoncello wrote:

> I have a Debian Server with Asterisk 16.2.1 from Debian repos and some
> SNOM phones (SNOM 821, last firmware  snom821-SIP 8.7.5.35).
> If I call a number I can see in the display the called number, after a
> few seconds the number changes to the own numer.
> After hangup I just see my own number in the call log.

Sounds like something strange is happening with Remote-Party-ID.

Do a packet capture and see whether the 180 response from the callee's phone 
contains an RPID header with silly content.


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] Exec two commands with ExecIf

2021-12-23 Thread Antony Stone
On Thursday 23 December 2021 at 22:16:26, John Harragin wrote:

> gotoif accomplishes exactly what you want (except the one line part).

Goto() and GotoIf() always remind me of programming in BASIC in the 1980s.


Antony.

-- 
"In fact I wanted to be John Cleese and it took me some time to realise that 
the job was already taken."

 - Douglas Adams

   Please reply to the list;

-- 
_
-- 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] Exec two commands with ExecIf

2021-12-23 Thread Antony Stone
On Thursday 23 December 2021 at 18:31:38, aster...@phreaknet.org wrote:

> > -Original Message-
> > From: asterisk-users  On Behalf
> > Of Dovid Bender
> > Sent: Thursday, December 23, 2021 12:11 PM
> > To: Asterisk Users Mailing List - Non-Commercial Discussion  > us...@lists.digium.com>
> > Subject: Re: [asterisk-users] Exec two commands with ExecIf
> > 
> > Anyone know why this never made it into Asterisk?
> 
> I believe it was deemed not to be of interest to the community.

Assuming that the dates in that ticket refer to 2021 (I see only months and 
days, not years), I don't recall any discussion taking place with the 
community about it, so that seems to me like a surprising explanation.

After all, if GotoIf(), ExecIf() and While() are "deemed to be of interest", 
and therefore exist, why would a simple If() be deemed not to be of interest?

And, taking it from the other point of view, even if many people genuinely 
think "meh, I don't think I'd use this", then surely they just avoid using it, 
as I suspect the majority of people do with DumpChan() (for example, to take a 
pretty obscure, yet still available, command at random).

In short, what's the drawback to making If() available for those who would use 
it?

Personally, I would very much like to see an If() statement made available.


Antony.

-- 
Tinned food was developed for the British Navy in 1813.

The tin opener was not invented until 1858.

   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] PJSIP to Twilio over TLS - wildcard cert problem

2021-12-01 Thread Antony Stone
On Wednesday 01 December 2021 at 22:43:47, Kingsley Tart wrote:

> On Wed, 2021-12-01 at 21:49 +0100, Antony Stone wrote:
> > 
> > What is the exact "complaint"?

> [Nov 29 16:44:08] ERROR[25803] pjproject:   tlsc0x7f1c74246778 RFC
> 5922 (section 7.2) does not allow TLS wildcard certificates. Advise your
> SIP provider, please!

So, https://datatracker.ietf.org/doc/html/rfc5922#section-7.2 does seem pretty 
clear about this.  "Implementations MUST NOT match any form of wildcard"

Have you contacted the provider who is using a wildcard certificate in this way 
and referred them to the RFC?


Antony.

-- 
"Can you keep a secret?"
"Well, I shouldn't really tell you this, but... no."


   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] PJSIP to Twilio over TLS - wildcard cert problem

2021-12-01 Thread Antony Stone
On Wednesday 01 December 2021 at 21:39:52, Kingsley Tart wrote:

> Hi,
> 
> I can't get Asterisk to send a SIP call to Twilio over TLS because it
> complains about Twilio's wildcard certificate.

What is the exact "complaint"?

> Is there a way round this?

Maybe, once we know what the error message is :)


Antony.

-- 
I wasn't sure about having a beard at first, but then it grew on me.

   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] Dial() after the h extension has been invoked?

2021-11-13 Thread Antony Stone
On Friday 12 November 2021 at 23:34:25, Steve Edwards wrote:

> On Fri, 12 Nov 2021, Antony Stone wrote:
> > I've never used AGI, so what would your suggested solution involve?
> 
> If all you need is to update/insert/delete some rows in a database, ODBC
> could be a solution.

I already use ODBC for that purpose, and it works well.

However, in this case it's the Asterisk internal database, purely local to the 
machine, which needs manipulating.


Antony.

-- 
#define SIX 1+5
#define NINE 8+1

int main() {
printf("%d\n", SIX * NINE);
}
- thanks to ECB for bringing this to my attention

   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] Dial() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
On Friday 12 November 2021 at 18:08:11, aster...@phreaknet.org wrote:

> On 11/12/2021 12:39 PM, Antony Stone wrote:
> > On Friday 12 November 2021 at 17:36:07, Eric Wieling wrote:
> >> Create a spool file from the 'h' extension to generate the call.
> > 
> > Yes, I thought of that, but it somehow feels a bit clunky, and was hoping
> > for a neater solution :)
> 
> Use Originate() instead of spooling a call file, so it's a single line
> of dialplan. Much less clunky :)

Originate() does not support special SIP headers :(


Antony.

-- 
Wanted: telepath.   You know where to apply.

   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] Dial() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
On Friday 12 November 2021 at 18:18:03, Eric Wieling wrote:

> On 11/12/21 12:39, Antony Stone wrote:
> > On Friday 12 November 2021 at 17:36:07, Eric Wieling wrote:
> >> Create a spool file from the 'h' extension to generate the call.
> > 
> > Yes, I thought of that, but it somehow feels a bit clunky, and was hoping
> > for a neater solution :)
> 
> Dialing post call to update a database is clunky.  The solutions will be
> clunky too.
> 
> I use a hangup handler with an AGI script.  The script makes a database
> connection to close out the call.  Much cleaner.

Would you care to give a little more in the way of detail?

I've never used AGI, so what would your suggested solution involve?


Antony.

-- 
She did not swoon, but she did get a look on her face that said 'This 
conversation is over', which Jack took as a sign he was going in the right 
direction.

 - Neal Stephenson, Quicksilver

   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] Dial() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
On Friday 12 November 2021 at 17:36:07, Eric Wieling wrote:

> Create a spool file from the 'h' extension to generate the call.

Yes, I thought of that, but it somehow feels a bit clunky, and was hoping for 
a neater solution :)


Antony.

-- 
Software development can be quick, high quality, or low cost.

The customer gets to pick any two out of three.

   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] Dial() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
On Friday 12 November 2021 at 17:20:39, Frank Vanoni wrote:

> On Fri, 2021-11-12 at 16:56 +0000, Antony Stone wrote:
> > I use Dial() commands with custom SIP headers to pass information
> > (eg: about the current state of a call) between the front-end and back-end
> > machines, and this works very well.
> > 
> >  I need to perform a Dial() command after an inbound channel has hung up. 
> >  I do not expect the Dial() to bridge to anything (the context being
> >  dialled simply does some database manipulation and then hangs up without
> >  even bothering to answer).
> > 
> > 
> > Any suggestions welcome :)
> 
> Maybe you can use the "g" option in the first Dial(...) and proceed in
> the dial plan with the second Dial(...)

Hm, in fact I am already using the g option, because I want to detect channel 
states such as Unavailable and Congestion (in which case I try an alternative 
route to dial out with).

I suppose if I detect the DIALSTATUS is ANSWER then I know the call got 
answered and has now ended.

Sounds good - thank you :)


Antony.

-- 
I wasn't sure about having a beard at first, but then it grew on me.

   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] Dial() after the h extension has been invoked?

2021-11-12 Thread Antony Stone
Hi.

I have a setup which comprises some "front-end" Asterisk servers which have 
SIP trunks to external providers, and very simple dial plans, and some "back-
end" servers which only talk to the front-end machines, and have the majority 
of my dialplan logic on them.

I use Dial() commands with custom SIP headers to pass information (eg: about 
the current state of a call) between the front-end and back-end machines, and 
this works very well.

However, I can't use a Dial() command in the h extension to notify the other 
machines that a call has ended and they can now delete their state information 
about that call.  If I try to, I get the error:

app_dial.c:2245 in dial_exec_full: Caller hung up before dial.

I guess i can see why Asterisk complains about being asked to Dial() after the 
inbound call leg has ended, but in this case I have a reason for doing so.

Can anyone suggest how I might be able to do this?  I need to perform a Dial() 
command after an inbound channel has hung up.  I do not expect the Dial() to 
bridge to anything (the context being dialled simply does some database 
manipulation and then hangs up without even bothering to answer).


Any suggestions welcome :)


Antony.

-- 
90% of networking problems are routing problems.
9 of the remaining 10% are routing problems in the other direction.
The remaining 1% might be something else, but check the routing anyway.

   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] Willing to pay for patch to Asterisk fax detection

2021-11-11 Thread Antony Stone
On Thursday 11 November 2021 at 22:29:34, David Cunningham wrote:

> Hello,
> 
> We have a commercial client

> If anyone has ideas for other places to advertise this request let me know!

I would suggest http://lists.digium.com/mailman/listinfo/asterisk-biz because 
that is the commercial list (you have currently posted to the "non-commercial 
discussion" list), and http://lists.digium.com/mailman/listinfo/asterisk-dev


Antony.

-- 
"I find the whole business of religion profoundly interesting.  But it does 
mystify me that otherwise intelligent people take it seriously."

 - Douglas Adams

   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] Notifying missed calls

2021-11-03 Thread Antony Stone
On Wednesday 03 November 2021 at 21:29:46, Luca Bertoncello wrote:

> I tried so:
> 
> exten => h,n(hang),Gosub(noanswer,s,1)

The n there should be 1, surely?

> exten => h,n,Hangup

I would say "remove that line".  The call has already been hung up, so calling 
Hangup is at best going to go into a recursive loop - it certainly isn't going 
to help.


Antony.

-- 
"The future is already here.   It's just not evenly distributed yet."

 - William Gibson

   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] no audio both ways with ipv6

2021-10-14 Thread Antony Stone
On Thursday 14 October 2021 at 19:22:00, hw wrote:

> Hi,
> 
> when asterisk registers with the VOIP provider via ipv6 and when
> local phones don't work with ipv6 but only with ipv4, am I to
> expect issues?

Do a SIP packet capture and see what the SDP in the INVITE is telling each end 
to expect from the other.

> I'm receiving incoming calls via the provider, asterisk correctly
> dials the phone where the calls are suposed to go to, the phone
> rings --- and when I pick it up, there is no audio in either direction.

Sounds like the setup is trying to do direct media - which obviously cannot 
work between an IPv4-only phone and an IPv6-only provider.

Make sure Asterisk remains in the audio path and it should "almost transcode" 
for you.

I have audio working over just such an arrangement (in my case, an IPv4-only 
provider, and phones connected via IPv6) without problems.


Antony.

-- 
The difference between theory and practice is that in theory there is no 
difference, whereas in practice there is.

   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] Asterisk 16 Realtime outbound register

2021-10-12 Thread Antony Stone
Hi.

I'm using Asterisk 16 with a MySQL realtime DB, containing both outbound 
registrations to other PBXs (Asterisk as SIP client) and inbound accounts for 
clients to register to (Asterisk as SIP server).

All in all, working well.

However, I just had a requirement to register outbound to a PBX on port 5070 
instead of 5060, and placing "5070" in the "port" field of the realtime 
database made no difference - Asterisk continued to try to register to port 
5060.

If I add ":5070" to the end of the "host" field, Asterisk correctly registers 
to port 5070 on the remote PBX.

So, what is the "port" field in the SIP peers DB table for, and how can I 
correctly specify the hostname and the port number separately?


Thanks,


Antony.

-- 
Python is executable pseudocode.
Perl is executable line noise.

   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] problems with natted phones

2021-09-09 Thread Antony Stone
On Thursday 09 September 2021 at 17:56:10, Marek Greško wrote:

> Hello,
> 
> I would not like to open whole range of udp ports for rtp.

Why not?  What is the risk?

What would possibly be listening on UDP ports 1 - 2 (the Asterisk 
default range) which an external scanner / attacker could make use of?


Antony.

-- 
Too many people spend money they haven't earned
to buy things they don't want,
to impress people they don't like.

 - Will Rogers

   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] problems with natted phones

2021-09-07 Thread Antony Stone
On Monday 06 September 2021 at 23:05:27, Duncan Turnbull wrote:

> > On 7/09/2021, at 8:30 AM, Marek Greško  wrote:
> > 
> > Hello,
> > 
> > it is only local nftables with nf_conntrack_sip on the asterisk
> > server. Probably a kernel bug? It did not trigger with previous
> > providers since they had working SIP ALG. Now I hear no audio in both
> > directions because outgoing rtp stream from asterisk goes to private
> > address space and incoming stream is blocked. So the outgoing rtp
> > could not be learnt to send to nat addess.
> 
> Maybe a bug but that’s less likely than a config error. Time to debug your
> nftables.

Try temporarily simply turning the firewall off - allow all traffic through 
(although leave in place any NAT rules).

If you then find that RTP works, you know where the problem lies.


Antony.

-- 
Perfection in design is achieved not when there is nothing left to add, but 
rather when there is nothing left to take away.

 - Antoine de Saint-Exupery

   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] problems with natted phones

2021-09-04 Thread Antony Stone
On Sunday 05 September 2021 at 00:54:10, Marek Greško wrote:

> the local provider's router does not possess any ipv4 address on the
> external interface, only ipv6.

So, what do the two addresses which you have labelled in the packet captures 
as 198.51.100.1 and 192.0.2.2 correspond to?

I see nothing at all in your packet captures which indicate IPv6.

Please tell us which address means what:

 - which is the public address of the Asterisk server?

 - which is the public address of the telephone?

(I'm assuming that the private address of the telephone is 192.168.100.235, 
please confirm).

We really do need to understand enough about your network arrangement to be 
able to help here.


Antony.

-- 
Your work is both good and original.  Unfortunately the parts that are good 
aren't original, and the parts that are original aren't good.

 - Samuel Johnson

   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] problems with natted phones

2021-09-04 Thread Antony Stone
On Thursday 08 July 2021 at 20:57:30, Marek Greško wrote:

> Hello,
> 
> I have an asterisk setup using pjsip. Everything used to work
> correctly until one remote site changed internet provider and thier
> router does not support sip protocol algorithms.

I'm slightly bothered by the word "algorithms" in that comment, but I do 
wonder whether it simply means that this is a connectivity provider (possibly 
a mobile phone network?) which actively blocks SIP.

Some of them (in my experience) do this by blocking UDP port 5060, but others 
are more subtle about it, and (for example) block the authentication responses 
to a Register request, thereby meaning that UDP port 5060 is in general 
accessible, but any attempt to Register to it using SIP will fail.

Have you asked the new Internet connectivity provider whether they support or 
block SIP across their network?


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] problems with natted phones

2021-09-04 Thread Antony Stone
On Sunday 05 September 2021 at 00:19:41, Marek Greško wrote:

> Hello,
> 
> could you please answer my previous question about anonymizing several
> parameters? I have the data ready, but will post after answer. I have
> no clue whether I could disclose some important data not deleting
> them.

Nothing other than IP addresses (if you consider those to be sensitive) needs 
to be anonymised.

> The tcpdumps are made on the asterisk side. I have currently no means
> of capturing on phone side.

I suspect that is in fact ideal.


Antony.

-- 
I thought I had type A blood, but it turned out to be a typo.

   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] problems with natted phones

2021-09-04 Thread Antony Stone
On Saturday 04 September 2021 at 22:13:32, Marek Greško wrote:

> Hello,
> 
> I agree my knowledge of SIP itself is poor, but I have quite well
> general tcp/ip understanding. What sip parameters should be
> anonymized? How about tag, branch, call-id, cseq values?

Show us your packet captures with meaningful addresses (not necessarily 
accurate ones, but at least unambiguous - see my previous suggestion re 
RFC5737) and we can help you to understand them and what they mean.


Antony.

-- 
Heisenberg, Gödel, and Chomsky walk in to a bar.
Heisenberg says, "Clearly this is a joke, but how can we work out if it's 
funny or not?"
Gödel replies, "We can't know that because we're inside the joke."
Chomsky says, "Of course it's funny. You're just saying it wrong."

   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] problems with natted phones

2021-09-03 Thread Antony Stone
On Saturday 04 September 2021 at 00:34:49, Duncan Turnbull wrote:

> > On 4/09/2021, at 7:53 AM, Marek Greško  wrote:
> > 
> > So you suspect something is messing up SIP protocol? Maybe the phone
> > itself is not working properly. The phone itself is not aware of the
> > internet address, so is sending lan private address in the sip
> > protocol.
> 
> I doubt it’s the phone. You need to check your data again and ideally
> explain what you mean by the names you have substituted for the ip
> addresses

My advice (regarding the IP addresses) is:

 - where you have https://tools.ietf.org/html/rfc1918 addresses, leave them as 
they are - you're not giving away any sensitive information by telling us 
about your internal addresses which can't be routed over the Internet

 - where you have public addresses and would prefer not to reveal what these 
are, substitute with https://tools.ietf.org/html/rfc5737 addresses instead.

 - always ensure that you substitute address A in the same way each time, and 
address B, etc.


Antony.

-- 
You can spend the whole of your life trying to be popular,
but at the end of the day the size of the crowd at your funeral
will be largely dictated by the weather.

 - Frank Skinner

   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] Between a dumb client and a capable server...

2021-08-20 Thread Antony Stone
On Friday 20 August 2021 at 19:06:09, George Joseph wrote:

> On Fri, Aug 20, 2021 at 8:33 AM Antony Stone wrote:
> > 
> > So, if I have Asterisk registered as a SIP client to some remote server,
> > how can I get Asterisk to tell that remote server to put the call on hold
> > (which a standard SIP telephone would normally do by sending a ReINVITE
> > with the SDP parameter 'sendonly')?
> 
> On the outgoing pjsip endpoint, set "moh_passthrough = yes".   If you then
> put incoming call on hold, a reinvite with sendonly will be sent to the
> upstream server.

So... how do I put the incoming call on hold, when the dumb client I'm 
starting from cannot do that bit?

I already know (from this list) that Asterisk as a SIP client cannot do ore 
than (a) place a call, (b) answer a call, and (c) hang up a call.

So, I'm still intrigued as to how you think this might be possible.

If it *is* possible, I'd be really interested, but all my researches so far 
suggest that Asterisk, acting in the middle like this, just cannot add the 
necessary "put call on hold" which the original client cannot do.


Antony.

-- 
Some things the German language doesn't easily distinguish between:
 - slugs and snails
 - cucumbers and gherkins
 - snakes and queues
 - wearing something, or carrying it
 - mothers and nuts
 - driving a car, riding a bicycle, or travelling by train
 - a man and a husband
 - a woman and a wife
 - changing clothes and moving house
 - pockets and bags

   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] Between a dumb client and a capable server...

2021-08-20 Thread Antony Stone
On Friday 20 August 2021 at 16:14:44, George Joseph wrote:

> On Wed, Aug 18, 2021 at 3:33 AM Antony Stone wrote:
> > Hi.
> > 
> > Just to summarise: I have a SIP client talking to a SIP server, and I
> > need something which can send commands to that server to put calls,
> > which were created by the existing client, on hold (that's the simplest
> > scenario).  I do not want to build a SIP server / PBX myself which can
> > itself perform call hold & transfer etc (I know how to do that with
> > Asterisk) - I need those functions to be performed by the existing server.
> 
> Sounds like you're looking for something to do 3rd Party Call Control
> (3PCC).

Okay, that sounds like useful terminology.

> It also sounds like the 'SIP server" isn't Asterisk and you can't change
> that either right?

It *might* be Asterisk, but if it is, I have no access to it other than the 
SIP credentials a standard telephone would use to register to it.  Then again, 
I might not even *know* what it is - it's just a SIP-based PBX...

> You could actually use a tiny Asterisk instance to do this.

Hm, I'm very dubious about that, based on what I've seen in docs so far...

> The dumb client would call Asterisk and Asterisk would simply send the call
> to your existing SIP server.

Okay, so far, so good, I can get Asterisk to do that.

> You could then use AMI or ARI to watch for the call events and tell
> Asterisk to transfer to some other extension on your SIP server or whatever.

So, let's just take the simplest example - how can I get Asterisk to tell the 
other server to put a call on hold and play that other server's hold music to 
the remote party?

> The big question is...  what triggers the action to take?

That's easy, I have a web interface which is on the same machine as the dumb 
SIP softphone, and that can talk to this "tiny Asterisk server" you speculate 
about, for example by sending in AMI Originate commands to it, which can 
trigger dial plan actions, which can do anything Asterisk is capable of.

My doubts are whether Asterisk as a SIP *client* is capable of this.

So, if I have Asterisk registered as a SIP client to some remote server, how 
can I get Asterisk to tell that remote server to put the call on hold (which a 
standard SIP telephone would normally do by sending a ReINVITE with the SDP 
parameter 'sendonly')?


Thanks,


Antony.

-- 
"The future is already here.   It's just not evenly distributed yet."

 - William Gibson

   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] Between a dumb client and a capable server...

2021-08-18 Thread Antony Stone
On Wednesday 18 August 2021 at 16:47:35, d...@donkelly.biz wrote:

> I think I would start by finding an open source SIP client that can manage
> calls like you want,

I can certainly find those.

> then figure out how to divide the control and audio responsibilities between
> these two SIP clients.

Do you believe it is possible for one SIP client to place a call, and for 
another one then to contact the server which is handling it and send commands 
to manage that call in progress?

I'm puzzled about how the authentication would work for identifying the call 
to the server in such a way that it thinks the request is valid, and acts upon 
it.

I can put the same SIP credentials (username & password) into two clients, but 
they'd be placing quite independent calls through the server - how could I get 
a second client to manipulate a call placed by the first one?

> Curious about why you can't just use the more capable SIP client.

It's built into a bigger application and can't just be swapped out.


Antony.

-- 
90% of networking problems are routing problems.
9 of the remaining 10% are routing problems in the other direction.
The remaining 1% might be something else, but check the routing anyway.

   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] Between a dumb client and a capable server...

2021-08-18 Thread Antony Stone
Hi.

I wonder if anyone has some helpful advice or suggestions for me?

I have a very basic SIP client application, which can make and receive phone 
calls, and that's about it.  Regard it as a pretty dumb softphone.  
Unfortunately I cannot change it for a smarter one.

This client is talking to a completely capable SIP server (PBX) which can do 
all the standard PBX stuff like putting calls on hold, transferring them, 
conferencing, etc.

The problem is that the simple SIP client cannot itself tell the server to do 
any of these things - it can send an INVITE to place a call, and it can 
REGISTER and then accept an INVITE to receive a call, but it doesn't know how 
to send any other commands to the server to "manage" calls once they're in 
progress.

I'm looking for something which I can place in the network path between the 
client and the server, which can send these call control commands on to the 
server, so that it can then put calls on hold, transfer them, etc.

I'm assuming this "thing" needs to sit in the network path, so that it sees 
the INVITEs and OKs and is then aware of the Call-IDs and sequence numbers, 
etc, and can therefore present the correct call reference to the SIP server 
when it wants to say "please put this one on hold".  I have full access to the 
SIP credentials used to authenticate the client to the server.

I had thought that Kamailio might be what I was looking for, but I've asked on 
their mailing list and people are telling me that it isn't, and that I need 
something like Asterisk to do this.  I'm trying to get some specifics from them 
about *how* I would get Asterisk to do this (because I personally can't see 
how Asterisk could sit between a SIP client and a SIP server, and generate 
commands to manipulate the RTP stream and send them to the server, which is 
what the Kamailio people are saying I should do), but I thought it was worth 
asking here just in case what they're telling me is in fact quite easy when 
you only know enough about Asterisk.

So, if someone here thinks this is possible using Asterisk, please could you 
point me at some documentation showing what commands I would use or the basics 
of how I should go about it?

If anyone thinks there is another, perhaps better, way of achieving this, then 
I'm quite open to alternative solutions (as I say, I was initially thinking 
that Kamailio might be the way forward), so anything that shows me *how* such 
a thing might be achieved, with any tool at all, would be very welcome.

Just to summarise: I have a SIP client talking to a SIP server, and I need 
something which can send commands to that server to put calls, which were 
created by the existing client, on hold (that's the simplest scenario).  I do 
not want to build a SIP server / PBX myself which can itself perform call hold 
& transfer etc (I know how to do that with Asterisk) - I need those functions 
to be performed by the existing server.

Any constructive ideas are most welcome :)


Thanks,


Antony.

-- 
Numerous psychological studies over the years have demonstrated that the 
majority of people genuinely believe they are not like the majority of people.

   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

  1   2   3   4   >