Re: [asterisk-users] CDR gets lost

2023-09-19 Thread TTT
Yes - update your my.conf to increase the timeouts by a large amount, then
restart mysql daemon.  Here's some details:

 

https://telium.io/en/topic/mysql-server-has-gone-away/

 

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On
Behalf Of Federico
Sent: Tuesday, September 19, 2023 11:36 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'

Subject: [asterisk-users] CDR gets lost

 

I noticed that of Asterisk is idle many hours, then the CDR (with
batch=yes) does not get written to the MySQL database anymore. Is there a
keepalive command for ODBC? 

 

cdr show status

 

Call Detail Record (CDR) settings

--

  Logging:Enabled

  Mode:   Simple

  Log calls by default:   Yes

  Log unanswered calls:   Yes

  Log congestion: Yes

 

  Ignore bridging changes:No

 

  Ignore dial state changes:  No

 

* Registered Backends

  ---

Adaptive ODBC

cdr_manager (suspended) 

cdr-custom

csv 

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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Question about Sip Trunks who support Stir Shaken

2023-08-18 Thread TTT
Check out Twilio

 

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On
Behalf Of Federico
Sent: Thursday, August 17, 2023 11:49 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'

Subject: [asterisk-users] Question about Sip Trunks who support Stir Shaken

 

I am looking for a decent provider of SIP Trunks but it has to pass the Stir
Shaken token to the next carrier. Does anybody know about any? Sipstation
from Sangoma, does not support Stir Shaken. ( Case #01466843 /
001300G8PLG / MAIN / Open [ ref:_00D306mPe._5004U1BlBLF:ref ])

Although it's mandatory, somehow they think it's ok. Go figure.

-- 
_
-- 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] Subscribing to events on AMI login

2023-08-08 Thread TTT
Ok – so if I forgot to add “security” to the read= line in manager.conf for 
this user, will that cause the user to be unable to subscribe to the “security” 
events upon login?  (in other words, although subscribed at login, no security 
events will be shown to this user)

 

Thanks

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Tuesday, August 8, 2023 11:57 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Subscribing to events on AMI login

 

On Tue, Aug 8, 2023 at 12:44 PM TTT mailto:li...@telium.io> > 
wrote:

I'm looking at an old app I wrote that upon AMI login would subscribe to events 
as follows:

 

Action: Login

ActionID: myid

Username: myun

Secret: mypw

Events: call, system, security

 

I noticed this old code isn't working, and I *think* that the events parameter 
of login has been deprecated; I don't see it referenced in:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_Login

 

I’m using Asterisk 20, so Is the events parameter still valid?  I don't seem to 
receive any events other than the "FullyBooted" event after login.  If not 
valid, how should I subscribe to events programmatically?

 

The parameter appears to be valid, just implemented in such a way that it 
likely got missed when writing the documentation. As for not working, you'd 
need to provide the manager.conf configuration as well. There is also the 
Events AMI action[1] for changing it after login.

 

[1] 
https://docs.asterisk.org/Asterisk_20_Documentation/API_Documentation/AMI_Actions/Events/

 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com <http://www.sangoma.com>  and www.asterisk.org 
<http://www.asterisk.org> 

-- 
_
-- 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] Subscribing to events on AMI login

2023-08-08 Thread TTT
I'm looking at an old app I wrote that upon AMI login would subscribe to
events as follows:

 

Action: Login

ActionID: myid

Username: myun

Secret: mypw

Events: call, system, security

 

I noticed this old code isn't working, and I *think* that the events
parameter of login has been deprecated; I don't see it referenced in:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_Login

 

I'm using Asterisk 20, so Is the events parameter still valid?  I don't seem
to receive any events other than the "FullyBooted" event after login.  If
not valid, how should I subscribe to events programmatically?

-- 
_
-- 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] Get manager user info after AMI authentication

2023-07-12 Thread TTT
Is there an AMI command/action which reports back the username used to
authenticate (to the AMI), and the permissions in effect for that user/

-- 
_
-- 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] Manager permissions for CoreSettings command

2023-07-12 Thread TTT
I want to use CoreSettings via the AMI.  I checked the documentation for the 
action (command) and it doesn’t list any required permissions:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_CoreSettings

 

I tried using the CLI “manager show command coresettings” and it returns 

 

[Privilege]

system,reporting,all

 

Which I thought might be the same as permissions, but why ask for system + 
reporting when also asking for all? (Doesn’t all include all the rest)  Or is 
privilege something else?

 

-- 
_
-- 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] AMI versions

2023-07-11 Thread TTT
I’m trying coresettings through the AMI but getting a permission denied error.  
I think I’ve added all permissions:

 

read=system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate

write=system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate

 

Where can I find the permission needed for this command?

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Tuesday, July 11, 2023 2:43 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] AMI versions

 

On Tue, Jul 11, 2023 at 3:40 PM Joshua C. Colp mailto:jc...@sangoma.com> > wrote:

On Tue, Jul 11, 2023 at 3:38 PM TTT mailto:li...@telium.io> > 
wrote:

That answers part two…but is there any mapping of AMI version to Asterisk 
versions?

 

No, there is not.

 

I can say that Asterisk 13 is 2.x.x though because I just looked, so you can 
use the version policy to determine what each release is subsequently.

 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com <http://www.sangoma.com>  and www.asterisk.org 
<http://www.asterisk.org> 

-- 
_
-- 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] AMI versions

2023-07-11 Thread TTT
That answers part two…but is there any mapping of AMI version to Asterisk 
versions?

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Sean Bright
Sent: Tuesday, July 11, 2023 11:58 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] AMI versions

 

https://docs.asterisk.org/latest/Configuration/Interfaces/Asterisk-Manager-Interface-AMI/Asterisk-Manager-Interface-AMI-Changes/

 

 

 

On Tue, Jul 11, 2023 at 11:54 AM, TTT mailto:On%20Tue,%20Jul%2011,%202023%20at%2011:54%20AM,%20TTT%20%3c%3ca%20href=>
 > wrote:

Is there a web page that lists the AMI versions mapped to Asterisk versions?

 

I noticed that the AMI version increased quickly to 9.0.0.  Will the AMI 
version increase with each Asterisk version increase in the future?

 

Thanks

Brian

-- 
_
-- 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] AMI versions

2023-07-11 Thread TTT
Is there a web page that lists the AMI versions mapped to Asterisk versions?

 

I noticed that the AMI version increased quickly to 9.0.0.  Will the AMI
version increase with each Asterisk version increase in the future?

 

Thanks

Brian

-- 
_
-- 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] Getvar of CHANNEL not working for a couple of items

2023-07-06 Thread TTT
I found a clue as to why the second leg is not returning a local or remote 
address:

 

[2023-07-06 11:40:35] WARNING[253072]: pjsip/dialplan_functions.c:903 
channel_read_pjsip: No transport information for channel PJSIP/222-007d

[2023-07-06 11:40:35] WARNING[935126]: func_channel.c:527 func_channel_read: 
Unknown or unavailable item requested: 'pjsip,local_addr'

[2023-07-06 11:40:35] WARNING[40100]: pjsip/dialplan_functions.c:917 
channel_read_pjsip: No transport information for channel PJSIP/222-007d

[2023-07-06 11:40:35] WARNING[935126]: func_channel.c:527 func_channel_read: 
Unknown or unavailable item requested: 'pjsip,remote_addr'

 

Well…maybe not a root cause but certainly something of interest.  This works 
with the first leg, but not the second leg of the call.

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Wednesday, July 5, 2023 12:02 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Getvar of CHANNEL not working for a couple of 
items

 

On Wed, Jul 5, 2023 at 12:50 PM TTT mailto:li...@telium.io> > 
wrote:

  Channel A: "1688509741.112" , name:  "PJSIP/111-0064" , is originator:  Y 
, call-Id:  "u.l6kcou25ca...@mydomain.com <mailto:u.l6kcou25ca...@mydomain.com> 
" , local_uri:  "mailto:sip%3a...@mydomain.com> 
;user=phone>" , local_tag:  "1734d973-c4da-4ae8-a37d-5f7065f1fe54" , 
local_addr:  "172.31.253.4:5060 <http://172.31.253.4:5060> " , remote_uri:  
"\\\"TestPhone x111\\\" mailto:sip%3a...@mydomain.com> 
>" , remote_tag:  "yinue4v5ufa4" , remote_addr:  "172.31.253.20:5060 
<http://172.31.253.20:5060> "

 

 

  Channel B: "1688509741.113" , name:  "PJSIP/222-0065" , is originator:  N 
, call-Id:  "1f104544-fc1a-4414-ba74-68c526e294de" , local_uri:  
"\\\"TestPhone\\\" mailto:sip%3A111@172.31.253.4> >" , 
local_tag:  "ac5eeb59-f559-4bb7-a3c2-170ca7f05f8b" , local_addr:  "" , 
remote_uri:  "mailto:sip%3A222@172.31.253.20> 
;line=46922>" , remote_tag:  "klwqxe1fvt5wk" , remote_addr:  ""

 

And here's what seems strange:

Channel A's local_uri looks like Channel B's uri

Channel A's remote_uri looks like channel A's uri

Channel B's local_uri looks like channel A's uri

Channel B's remote_uri looks like channel B;s uri

 

These aren't strange. They look alike because of callerid and target dialed 
information. They are still independent call legs.

 

 

I’m having trouble understanding your explanation (googling just led me to 
generic callerid and target info).  I thought a phone’s local_uri would be how 
to reach that phone (not the other party), and vice versa for the remote_uri.  
If the above URI info is correct then I must misunderstand their meaning.  
Could you provide more explanation on how to interpret them (why they seems 
reversed to me), or a link?

 

I assumed the remote & local URI where equivalent to the to & from lines 
(respectively) in the invite…

 

They are the From and To header, but what remote_uri and local_uri refers to 
changes depending on the direction of the SIP dialog.

 

Received call: From = remote_uri, To = local_uri

Sent call: From = local_uri, To = remote_uri

 

The contents of each depend on callerid information, settings, the Contact of 
the target when doing an outgoing call, what the remote endpoint chose for To 
URI on a received call.

 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com <http://www.sangoma.com>  and www.asterisk.org 
<http://www.asterisk.org> 

-- 
_
-- 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] Getvar of CHANNEL not working for a couple of items

2023-07-05 Thread TTT
  Channel A: "1688509741.112" , name:  "PJSIP/111-0064" , is originator:  Y 
, call-Id:  "u.l6kcou25ca...@mydomain.com  
" , local_uri:  "mailto:sip%3a...@mydomain.com> 
;user=phone>" , local_tag:  "1734d973-c4da-4ae8-a37d-5f7065f1fe54" , 
local_addr:  "172.31.253.4:5060  " , remote_uri:  
"\\\"TestPhone x111\\\" mailto:sip%3a...@mydomain.com> 
>" , remote_tag:  "yinue4v5ufa4" , remote_addr:  "172.31.253.20:5060 
 "

 

 

  Channel B: "1688509741.113" , name:  "PJSIP/222-0065" , is originator:  N 
, call-Id:  "1f104544-fc1a-4414-ba74-68c526e294de" , local_uri:  
"\\\"TestPhone\\\" mailto:sip%3A111@172.31.253.4> >" , 
local_tag:  "ac5eeb59-f559-4bb7-a3c2-170ca7f05f8b" , local_addr:  "" , 
remote_uri:  "mailto:sip%3A222@172.31.253.20> 
;line=46922>" , remote_tag:  "klwqxe1fvt5wk" , remote_addr:  ""

 

And here's what seems strange:

Channel A's local_uri looks like Channel B's uri

Channel A's remote_uri looks like channel A's uri

Channel B's local_uri looks like channel A's uri

Channel B's remote_uri looks like channel B;s uri

 

These aren't strange. They look alike because of callerid and target dialed 
information. They are still independent call legs.

 

 

I’m having trouble understanding your explanation (googling just led me to 
generic callerid and target info).  I thought a phone’s local_uri would be how 
to reach that phone (not the other party), and vice versa for the remote_uri.  
If the above URI info is correct then I must misunderstand their meaning.  
Could you provide more explanation on how to interpret them (why they seems 
reversed to me), or a link?

 

I assumed the remote & local URI where equivalent to the to & from lines 
(respectively) in the invite…

-- 
_
-- 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] Getvar of CHANNEL not working for a couple of items

2023-07-04 Thread TTT
Building on my last message, I am trying to get CHANNEL data using getvar 
(through the AMI).  And although I'm getting responses, some  values returned 
seem illogical.  For example, phone 111 calls phone 222 via the PBX.  Here's 
the data I get back

 

 

  Channel A: "1688509741.112" , name:  "PJSIP/111-0064" , is originator:  Y 
, call-Id:  "u.l6kcou25ca...@mydomain.com" , local_uri:  
"" , local_tag:  
"1734d973-c4da-4ae8-a37d-5f7065f1fe54" , local_addr:  "172.31.253.4:5060" , 
remote_uri:  "\\\"TestPhone x111\\\" " , remote_tag:  
"yinue4v5ufa4" , remote_addr:  "172.31.253.20:5060"

 

 

  Channel B: "1688509741.113" , name:  "PJSIP/222-0065" , is originator:  N 
, call-Id:  "1f104544-fc1a-4414-ba74-68c526e294de" , local_uri:  
"\\\"TestPhone\\\" " , local_tag:  
"ac5eeb59-f559-4bb7-a3c2-170ca7f05f8b" , local_addr:  "" , remote_uri:  
"" , remote_tag:  "klwqxe1fvt5wk" , 
remote_addr:  ""

 

And here's what seems strange:

Channel A's local_uri looks like Channel B's uri

Channel A's remote_uri looks like channel A's uri

Channel B's local_uri looks like channel A's uri

Channel B's remote_uri looks like channel B;s uri

Channel B's local_addr is blank

Channel B's remote_addr is blank

 

I double checked my code and I'm definitely asking for the right info.  In 
regards to the reversed URI's, am I reading them wrong?  Should A's local URI 
be how to reach A, and A's remote URI be how to reach B ?

 

The missing local and remote addresses for B is just strange (mentioned in 
previous email)

 

Thanks

Brian

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of TTT
Sent: Tuesday, July 4, 2023 6:37 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 

Subject: [asterisk-users] Getvar of CHANNEL not working for a couple of items

 

The following AMI command works well for all of the information I want:

action: Getvar
actionid: act1
channel: PJSIP/Twilio-NA-W-3-In-0028
Variable: CHANNEL(pjsip,)

Where  can be one of the many available items.  However, when I create a 
call from A to B, all of the items return properly except: local_addr and 
remote_addr.  More specifically, they return correctly for the A leg (that 
initiated the call), but are blank for the B leg.  According to the 
asterisk.org docs:

* local_addr - On inbound calls, the full IP address and port number 
that the INVITE request was received on. On outbound calls, the full IP address 
and port number that the INVITE request was transmitted from.

* remote_addr - On inbound calls, the full IP address and port number 
that the INVITE request was received from. On outbound calls, the full IP 
address and port number that the INVITE request was transmitted to.

So they should be set for the B leg (outbound invite) as well but they are not; 
they are blank.  Is this a bug or am I misunderstanding something?

 

Thanks

Brian

-- 
_
-- 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] Getvar of CHANNEL not working for a couple of items

2023-07-04 Thread TTT
The following AMI command works well for all of the information I want:

action: Getvar
actionid: act1
channel: PJSIP/Twilio-NA-W-3-In-0028
Variable: CHANNEL(pjsip,)

Where  can be one of the many available items.  However, when I create a 
call from A to B, all of the items return properly except: local_addr and 
remote_addr.  More specifically, they return correctly for the A leg (that 
initiated the call), but are blank for the B leg.  According to the 
asterisk.org docs:

* local_addr - On inbound calls, the full IP address and port number 
that the INVITE request was received on. On outbound calls, the full IP address 
and port number that the INVITE request was transmitted from.

* remote_addr - On inbound calls, the full IP address and port number 
that the INVITE request was received from. On outbound calls, the full IP 
address and port number that the INVITE request was transmitted to.

So they should be set for the B leg (outbound invite) as well but they are not; 
they are blank.  Is this a bug or am I misunderstanding something?

 

Thanks

Brian

-- 
_
-- 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] Get channel variables via ARI/AMI

2023-07-03 Thread TTT
The uppercase command made a difference.  I now get a call-id as show below.  
However, does the call-id look valid?  The @0.0.0.0 seems strange.

 

action: Getvar

actionid: act1

channel: PJSIP/Twilio-NA-W-3-In-0028

Variable: CHANNEL(pjsip,call-id)

 

 

Response: Success

ActionID: act1

Variable: CHANNEL(pjsip,call-id)

Value: 4decf884e3ae74595906283a74f7154e@0.0.0.0

 

 

As well, can I request many pieces of data at once?  The syntax on this page 
(https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Function_CHANNEL) seems 
to suggest you pass a single parameter, “item”, yet passing just call-id did 
not work.  I had to pass “pjsip,call-id”.  Is the first parameter a category 
and the second the detailed item?  What if I want to retrieve multiple items 
(or all “pjsip” items)?

-- 
_
-- 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] Get channel variables via ARI/AMI

2023-07-02 Thread TTT
>> You use the AMI action Getvar[1] which allows channel variables and dialplan 
>> functions.

>> [1] 
>> https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_Getvar 

 

I actually tried that, and although I get “success” I never get useful data.  
For example:

 

action: Getvar

actionid: act1

channel: PJSIP/Twilio-NA-W-2-In-0025

Variable: channel(pjsip,call-id)

 

Response: Success

ActionID: act1

Variable: channel(pjsip,call-id)

Value:

 

And the channel in use was I from a call in progress.

Thanks

Brian

 

-- 
_
-- 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] Get channel variables via ARI/AMI

2023-07-02 Thread TTT
>> There are SOME protocol level things accessible using CHANNEL[1] but that's 
>> it.

>> [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Function_CHANNEL

 

 

I am trying to use the CHANNEL function listed above from the AMI.  Since it is 
not an AMI “action”, but rather a dialplan “function”, I’m trying to figure out 
how to call this from the AMI.  Using a telnet session to the AMI I’ve tried 
variations of:

 

action: command

actionid: id123

command: channel(PJSIP/24-1a)

 

but they don’t work.  Is the basic concept correct that I can using the 
“command” action to run a statement that would work in the dialplan?  If not, 
how would I call “channel” from the AMI ?

 

Thanks

Brian

 

 

 

-- 
_
-- 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] SetCallerPres command gone

2023-07-01 Thread TTT
I should have included the debug output:

AGI Rx << CALLERPRES(allowed)
AGI Tx >> 510 Invalid or unknown command


-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of TTT
Sent: Saturday, July 1, 2023 11:37 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 

Subject: [asterisk-users] SetCallerPres command gone

The AGI debug command worked well, and I found the offending command:

SetCallerPres(allowed)

That worked in Asterisk 13, but from my google searching it looks like this 
command has disappeared in Asterisk 20 (actually everything after ver 13).  I 
thought it was replaced with CALLERPRES(allowed) but this generated an error 
too in Asterisk 20.

Is there a replacement command?


-Original Message-
From: Eric Wieling [mailto:ewiel...@nyigc.com]
Sent: Saturday, July 1, 2023 1:02 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 
; TTT 
Subject: Re: [asterisk-users] AGI script commands

You have to read stdin to accept the data Asterisk sends when the AGI 
starts before you can send any AGI commands to Asterisk.   Also, "agi 
set debug on".

On 6/30/23 21:52, TTT wrote:
> I have an AGI script written in PHP that worked great with Asterisk 13.  
> I’m porting it to an Asterisk 20 site and have a strange problem.  I 
> tried running the script from the command line and it works fine; I 
> see the script commands written to stdout like
> 
> VERBOSE “SmartScreen v1”
> 
> But when run from asterisk the CLI shows:
> 
> [2023-06-30 15:50:47] VERBOSE[1264031][C-0025] pbx.c: Executing 
> [s@function-smartscreen:2] EAGI("PJSIP/Twilio-NA-W-3-In-0068",
> "smartscreen/smartscreen.php,"GEORGE SMITH" <+1234567890>") in new 
> stack
> 
> [2023-06-30 15:50:47] VERBOSE[1264031][C-0025] res_agi.c: Launched 
> AGI Script /var/lib/asterisk/agi-bin/smartscreen/smartscreen.php
> 
> [2023-06-30 15:50:48] VERBOSE[1264031][C-0025] res_agi.c: 
> AGI Script 
> smartscreen/smartscreen.php completed, returning 0
> 
> I never see any messages or commands sent from the script to stdout 
> (to
> asterisk)  Has the way EAGI operates changed?  This script doesn’t use 
> any AGI libraries…just simply read/write to stdin/stdout.
> 
> 

--
http://help.nyigc.net/


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] SetCallerPres command gone

2023-07-01 Thread TTT
The AGI debug command worked well, and I found the offending command:

SetCallerPres(allowed)

That worked in Asterisk 13, but from my google searching it looks like this 
command has disappeared in Asterisk 20 (actually everything after ver 13).  I 
thought it was replaced with CALLERPRES(allowed) but this generated an error 
too in Asterisk 20.

Is there a replacement command?


-Original Message-
From: Eric Wieling [mailto:ewiel...@nyigc.com] 
Sent: Saturday, July 1, 2023 1:02 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 
; TTT 
Subject: Re: [asterisk-users] AGI script commands

You have to read stdin to accept the data Asterisk sends when the AGI 
starts before you can send any AGI commands to Asterisk.   Also, "agi 
set debug on".

On 6/30/23 21:52, TTT wrote:
> I have an AGI script written in PHP that worked great with Asterisk 13.  
> I’m porting it to an Asterisk 20 site and have a strange problem.  I 
> tried running the script from the command line and it works fine; I 
> see the script commands written to stdout like
> 
> VERBOSE “SmartScreen v1”
> 
> But when run from asterisk the CLI shows:
> 
> [2023-06-30 15:50:47] VERBOSE[1264031][C-0025] pbx.c: Executing 
> [s@function-smartscreen:2] EAGI("PJSIP/Twilio-NA-W-3-In-0068",
> "smartscreen/smartscreen.php,"GEORGE SMITH" <+1234567890>") in new 
> stack
> 
> [2023-06-30 15:50:47] VERBOSE[1264031][C-0025] res_agi.c: Launched 
> AGI Script /var/lib/asterisk/agi-bin/smartscreen/smartscreen.php
> 
> [2023-06-30 15:50:48] VERBOSE[1264031][C-0025] res_agi.c: 
> AGI Script 
> smartscreen/smartscreen.php completed, returning 0
> 
> I never see any messages or commands sent from the script to stdout 
> (to
> asterisk)  Has the way EAGI operates changed?  This script doesn’t use 
> any AGI libraries…just simply read/write to stdin/stdout.
> 
> 

--
http://help.nyigc.net/


-- 
_
-- 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] AGI script commands

2023-06-30 Thread TTT
I have an AGI script written in PHP that worked great with Asterisk 13.  I'm
porting it to an Asterisk 20 site and have a strange problem.  I tried
running the script from the command line and it works fine; I see the script
commands written to stdout like 

 

VERBOSE "SmartScreen v1"

 

But when run from asterisk the CLI shows:

 

[2023-06-30 15:50:47] VERBOSE[1264031][C-0025] pbx.c: Executing
[s@function-smartscreen:2] EAGI("PJSIP/Twilio-NA-W-3-In-0068",
"smartscreen/smartscreen.php,"GEORGE SMITH" <+1234567890>") in new stack

[2023-06-30 15:50:47] VERBOSE[1264031][C-0025] res_agi.c: Launched AGI
Script /var/lib/asterisk/agi-bin/smartscreen/smartscreen.php

[2023-06-30 15:50:48] VERBOSE[1264031][C-0025] res_agi.c:
AGI Script smartscreen/smartscreen.php
completed, returning 0

 

I never see any messages or commands sent from the script to stdout (to
asterisk)  Has the way EAGI operates changed?  This script doesn't use any
AGI libraries.just simply read/write to stdin/stdout.

-- 
_
-- 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] Get channel variables via ARI/AMI

2023-06-26 Thread TTT
And I have to admit, I have learned a lot just investigating this.  (And 
appreciate the advice)

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Jeff LaCoursiere
Sent: Monday, June 26, 2023 6:22 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Get channel variables via ARI/AMI

 

On 6/26/23 5:19 PM, Jeff LaCoursiere wrote:

On 6/26/23 9:00 AM, Joshua C. Colp wrote:

On Mon, Jun 26, 2023 at 10:57 AM TTT mailto:li...@telium.io> 
> wrote:

I am connecting to the ARI with subscribe all, so I can see channels being 
created.  I now want to extract a variety of header variables (at the moment 
the from and to tag).  I tried to read them from the ARI but Asterisk refuses 
since the channel is not in a  stasis app.

 

Is there a way to read these from either the ARI or AMI ?  I’m trying not to 
modify the dialplan.

 

ARI, No.

AMI, Yes[1]. 

 

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_Getvar


 

I'm curious what the actual application is here - you want to connect to AMI to 
pull information that you will use to pretend to be a leg, just to send "BYE", 
when you could just hangup the leg with AMI (or do just about anything else you 
might think of).  Sometimes it is better to fully explain what you are trying 
to accomplish, and some folks here can try to steer you towards a workable 
solution.  It almost sounds... nefarious.

Meant that towards TTT, not Josh, in case that wasn't clear.



-- 
Jeff LaCoursiere
StratusTalk, Inc.
703 496 4990 x108
815 546 6599 cell
-- 
_
-- 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] Get channel variables via ARI/AMI

2023-06-26 Thread TTT
I’m in training, so I have to demonstrate something SIP related.  I figure it 
would be cool to hack a call, hanging it up while in progress from outside 
Asterisk.  Doing so will demonstrate use/knowledge of ARI, AMI, SIP, 
route-sets, UDP, etc.

 

Practical value: zero

 

:)

 

Who knows, maybe this will have an actual application for someone someday.  In 
practical terms I think building a proxy would be the right way to manipulate 
the SIP for a call in progress, but that sounds like a huge project.  I’ve got 
to demonstrate something by end of week.

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Jeff LaCoursiere
Sent: Monday, June 26, 2023 6:20 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Get channel variables via ARI/AMI

 

On 6/26/23 9:00 AM, Joshua C. Colp wrote:

On Mon, Jun 26, 2023 at 10:57 AM TTT mailto:li...@telium.io> 
> wrote:

I am connecting to the ARI with subscribe all, so I can see channels being 
created.  I now want to extract a variety of header variables (at the moment 
the from and to tag).  I tried to read them from the ARI but Asterisk refuses 
since the channel is not in a  stasis app.

 

Is there a way to read these from either the ARI or AMI ?  I’m trying not to 
modify the dialplan.

 

ARI, No.

AMI, Yes[1]. 

 

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_Getvar


 

I'm curious what the actual application is here - you want to connect to AMI to 
pull information that you will use to pretend to be a leg, just to send "BYE", 
when you could just hangup the leg with AMI (or do just about anything else you 
might think of).  Sometimes it is better to fully explain what you are trying 
to accomplish, and some folks here can try to steer you towards a workable 
solution.  It almost sounds... nefarious.

Cheers,

-- 
Jeff LaCoursiere
StratusTalk, Inc.
703 496 4990 x108
815 546 6599 cell
-- 
_
-- 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] Get channel variables via ARI/AMI

2023-06-26 Thread TTT
According to RFC3261 :

 

It is possible for the CSeq sequence number to be higher than the remote 
sequence number by more than one. This is not an error condition, and a UAS 
SHOULD be prepared to receive and process requests with CSeq values more than 
one higher than the previous received request.

 

So if I use a high value integer (maxint) I’m hoping the UAC will accept my 
message (though this will mess up future transactions, so other than BYE this 
is not a viable solution for an ongoing dialog).  The other problem I see is 
that I can't get the route set, so this this would work only with UAC’s on the 
same network (not NAT/proxies/etc).   If I needed to traverse NAT I would need 
something like Kamilio as Eric points out, to get the route set).  Or…maybe 
PJSIP_HEADERS will give me the route set..I need to experiment with that one).

 

Since this is just for my learning, I want to see if I can hangup a call in 
progress, running through the asterisk server.  This is fun for my learning, so 
I realize there is of little practical value :)

 

Brian

 

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Monday, June 26, 2023 3:56 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Get channel variables via ARI/AMI

 

On Mon, Jun 26, 2023 at 4:35 PM TTT mailto:li...@telium.io> > 
wrote:

I think that’s getting me close.  I’m trying to get (or recreate) the FROM and 
TO lines of the header, from a system running PJSIP.  I think if I use CHANNEL 
to get local_uri and local_tag I can recreate a FROM line like:

FROM=;tag=TAG

 

And if I use CHANNEL to get remote_uri and remote_tag I can recreate a FROM 
line like:

TO=;tag=TAG

 

Would it be correct to assume that with this info (and ip:port info) I should 
be able to send a UDP SIP message from the PBX to the UA which appears to be 
part of the current call dialog?  I realize this is an odd thing to do, but I’m 
just interested in technical feasibility at this point.  Before I try to code 
this I want to ensure I’m not missing something stupid.

 

Probably not. Sequence number also matters.

 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com <http://www.sangoma.com>  and www.asterisk.org 
<http://www.asterisk.org> 

-- 
_
-- 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] Get channel variables via ARI/AMI

2023-06-26 Thread TTT
I think that’s getting me close.  I’m trying to get (or recreate) the FROM and 
TO lines of the header, from a system running PJSIP.  I think if I use CHANNEL 
to get local_uri and local_tag I can recreate a FROM line like:

FROM=;tag=TAG

 

And if I use CHANNEL to get remote_uri and remote_tag I can recreate a FROM 
line like:

TO=;tag=TAG

 

Would it be correct to assume that with this info (and ip:port info) I should 
be able to send a UDP SIP message from the PBX to the UA which appears to be 
part of the current call dialog?  I realize this is an odd thing to do, but I’m 
just interested in technical feasibility at this point.  Before I try to code 
this I want to ensure I’m not missing something stupid.

 

Thanks

Brian

 

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Monday, June 26, 2023 3:08 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Get channel variables via ARI/AMI

 

On Mon, Jun 26, 2023 at 4:04 PM TTT mailto:li...@telium.io> > 
wrote:

It looks like if I call Getvar and pass PJSIP_HEADERS() I can get the entire 
SIP header for a channel.  I also read (on stackoverflow) that the PJSIP_HEADER 
function will only return the headers from the INVITE of the inbound channel.

 

If that’s correct, how would I get the headers from the outbound channel 
(second leg of the bridged call) INVITE ?  Or will PJSIP_HEADERS() in fact 
return the header from either inbound out outbound legs?

 

The answer is, you can't. There are SOME protocol level things accessible using 
CHANNEL[1] but that's it.

 

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Function_CHANNEL

 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com <http://www.sangoma.com>  and www.asterisk.org 
<http://www.asterisk.org> 

-- 
_
-- 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] Get channel variables via ARI/AMI

2023-06-26 Thread TTT
It looks like if I call Getvar and pass PJSIP_HEADERS() I can get the entire 
SIP header for a channel.  I also read (on stackoverflow) that the PJSIP_HEADER 
function will only return the headers from the INVITE of the inbound channel.

 

If that’s correct, how would I get the headers from the outbound channel 
(second leg of the bridged call) INVITE ?  Or will PJSIP_HEADERS() in fact 
return the header from either inbound out outbound legs?

 

Thanks

Brian

 

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Monday, June 26, 2023 10:00 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Get channel variables via ARI/AMI

 

On Mon, Jun 26, 2023 at 10:57 AM TTT mailto:li...@telium.io> 
> wrote:

I am connecting to the ARI with subscribe all, so I can see channels being 
created.  I now want to extract a variety of header variables (at the moment 
the from and to tag).  I tried to read them from the ARI but Asterisk refuses 
since the channel is not in a  stasis app.

 

Is there a way to read these from either the ARI or AMI ?  I’m trying not to 
modify the dialplan.

 

ARI, No.

AMI, Yes[1]. 

 

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_Getvar


 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com <http://www.sangoma.com>  and www.asterisk.org 
<http://www.asterisk.org> 

-- 
_
-- 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] Get channel variables via ARI/AMI

2023-06-26 Thread TTT
I am connecting to the ARI with subscribe all, so I can see channels being
created.  I now want to extract a variety of header variables (at the moment
the from and to tag).  I tried to read them from the ARI but Asterisk
refuses since the channel is not in a  stasis app.

 

Is there a way to read these from either the ARI or AMI ?  I'm trying not to
modify the dialplan.

 

Thanks

Brian

-- 
_
-- 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] Why is WebRTC treated differently from regular SIP in Asterisk

2023-06-23 Thread TTT
I'm learning about WebRTC clients, and am wondering why Asterisk treats them
differently from any other SIP client.

 

The media (RTP) should be no different, so the only difference should be on
the signaling side.  I noticed that the Asterisk wiki mentions the need for
res_pjsip_transport_websocket, so does that mean Asterisk requires the
signaling to occur over a websocket?  

 

If I used a SIPJS fork which places the signaling over UDP (eg
https://github.com/cwysong85/sipjs-udp) will it just be a regular SIP client
and I shouldn't have to configure anything special in Asterisk, just regular
PJSIP.

 

-- 
_
-- 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] WebRTC signaling

2023-06-23 Thread TTT
I'm looking at using Asterisk 20 with WebRTC clients (sipjs).  I know the
media runs over TCP, but what about the signaling?

 

I read something about signaling over UDP was proposed as part of a webrtc
standard, but can't find if that was ever ratified or if Asterisk can even
use UDP for the signaling instead of TCP for the signaling.

 

Does encryption of the signaling (SIPS) change anything?  

 

Thanks

Brian

-- 
_
-- 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 not replacing private FROM ip with public IP in INVITE

2023-06-21 Thread TTT
Something perhaps noteworth, since this is a multihomed system I bound the 
transport to 172.31.253.4:5060

I don't *think* that would cause Asterisk to use that IP in the FROM...at least 
it shouldn't. 

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of TTT
Sent: Wednesday, June 21, 2023 2:58 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 

Subject: Re: [asterisk-users] Asterisk not replacing private FROM ip with 
public IP in INVITE

I tried that (only needed to add rewrite_contact=yes) but it didn't help.

BTW, the CONTACT: line holds the correct ip!  Only the FROM: line holds the 
wrong (private) IP.

I'm still learning SIP...but I assume the FROM should also hold the rewritten 
public IP.  Just don't know how to force Asterisk to do that.

-Original Message-
From: Eric Wieling [mailto:ewiel...@nyigc.com] 
Sent: Wednesday, June 21, 2023 2:46 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 
; TTT 
Subject: Re: [asterisk-users] Asterisk not replacing private FROM ip with 
public IP in INVITE

type=endpoint
rewrite_contact=yes
force_rport=yes
rtp_symmetric=yes


On 6/21/23 14:36, TTT wrote:
> I've split this thread off from another (PJSIP authentication) because I 
> think the root cause is something different.I think the problem is the 
> following FROM line in my SIP INVITE transaction:
> 
> From: "MYNAME" 
> ;tag=773a3e6a-a677-4fb1-95fc-54b379b650a4
> 
> The IP address above is an internal/non-routable IP, so Twilio is rejecting 
> it.  For some reason Asterisk is not replacing the private IP with my public 
> IP address.  My pjsip.transport.conf contains a stanza for this transport 
> with:
> 
> local_net=172.31.0.0/16
> 
> Is that all that's needed for Asterisk to replace the from IP with the 
> external IP?  I'm not clear on why Asterisk is not substituting the private 
> FROM ip with a public one...
> 
> 
> 

-- 
http://help.nyigc.net/


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk not replacing private FROM ip with public IP in INVITE

2023-06-21 Thread TTT
I tried that (only needed to add rewrite_contact=yes) but it didn't help.

BTW, the CONTACT: line holds the correct ip!  Only the FROM: line holds the 
wrong (private) IP.

I'm still learning SIP...but I assume the FROM should also hold the rewritten 
public IP.  Just don't know how to force Asterisk to do that.

-Original Message-
From: Eric Wieling [mailto:ewiel...@nyigc.com] 
Sent: Wednesday, June 21, 2023 2:46 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 
; TTT 
Subject: Re: [asterisk-users] Asterisk not replacing private FROM ip with 
public IP in INVITE

type=endpoint
rewrite_contact=yes
force_rport=yes
rtp_symmetric=yes


On 6/21/23 14:36, TTT wrote:
> I've split this thread off from another (PJSIP authentication) because I 
> think the root cause is something different.I think the problem is the 
> following FROM line in my SIP INVITE transaction:
> 
> From: "MYNAME" 
> ;tag=773a3e6a-a677-4fb1-95fc-54b379b650a4
> 
> The IP address above is an internal/non-routable IP, so Twilio is rejecting 
> it.  For some reason Asterisk is not replacing the private IP with my public 
> IP address.  My pjsip.transport.conf contains a stanza for this transport 
> with:
> 
> local_net=172.31.0.0/16
> 
> Is that all that's needed for Asterisk to replace the from IP with the 
> external IP?  I'm not clear on why Asterisk is not substituting the private 
> FROM ip with a public one...
> 
> 
> 

-- 
http://help.nyigc.net/


-- 
_
-- 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 not replacing private FROM ip with public IP in INVITE

2023-06-21 Thread TTT
I've already done that.  However, I used the FQDN instead of an IP address 
which I think should be ok.

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Carlos Chavez
Sent: Wednesday, June 21, 2023 2:53 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Asterisk not replacing private FROM ip with 
public IP in INVITE

You need to put your external IP in the transport configuration:

external_media_address=X.X.X.X
external_signaling_address=X.X.X.X
external_signaling_port=5060


On 21/06/23 12:36, TTT wrote:
> I've split this thread off from another (PJSIP authentication) because I 
> think the root cause is something different.I think the problem is the 
> following FROM line in my SIP INVITE transaction:
>
> From: "MYNAME" 
> ;tag=773a3e6a-a677-4fb1-95fc-54b379b650a4
>
> The IP address above is an internal/non-routable IP, so Twilio is rejecting 
> it.  For some reason Asterisk is not replacing the private IP with my public 
> IP address.  My pjsip.transport.conf contains a stanza for this transport 
> with:
>
> local_net=172.31.0.0/16
>
> Is that all that's needed for Asterisk to replace the from IP with the 
> external IP?  I'm not clear on why Asterisk is not substituting the private 
> FROM ip with a public one...
>
>
>
-- 
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)8116-9161


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Asterisk not replacing private FROM ip with public IP in INVITE

2023-06-21 Thread TTT
I've split this thread off from another (PJSIP authentication) because I think 
the root cause is something different.I think the problem is the following 
FROM line in my SIP INVITE transaction:

From: "MYNAME" 
;tag=773a3e6a-a677-4fb1-95fc-54b379b650a4

The IP address above is an internal/non-routable IP, so Twilio is rejecting it. 
 For some reason Asterisk is not replacing the private IP with my public IP 
address.  My pjsip.transport.conf contains a stanza for this transport with:

local_net=172.31.0.0/16

Is that all that's needed for Asterisk to replace the from IP with the external 
IP?  I'm not clear on why Asterisk is not substituting the private FROM ip with 
a public one...



-- 
_
-- 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 not performing outbound authentication

2023-06-21 Thread TTT
In case it helps, here's the invite my Asterisk system sends to the ITSP 
(obfuscated a bit).  This should be triggering a 407 from the ITSP but it's 
not.  So I must be missing something in this message...can't see what

<--- Transmitting SIP request (930 bytes) to UDP:54.172.60.0:5060 --->
INVITE sip:1222333@54.172.60.0:5060 SIP/2.0
Via: SIP/2.0/UDP 
122.59.105.83:5060;rport;branch=z9hG4bKPj1b1875dc-11b7-4882-bbe3-d56c6041043a
From: "MYNAME" 
;tag=d147259b-dc0a-454e-8c6c-14ac59e85197
To: 
Contact: 
Call-ID: db46e226-73de-46f9-8b96-388eb5f0dd5e
CSeq: 13035 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, 
UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: MyUA
Content-Type: application/sdp
Content-Length:   235

v=0
o=- 954636103 954636103 IN IP4 122.59.105.83
s=Asterisk
c=IN IP4 122.59.105.83
t=0 0
m=audio 15860 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv



-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of TTT
Sent: Wednesday, June 21, 2023 1:55 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 

Subject: Re: [asterisk-users] PJSIP not performing outbound authentication

I didn't use pjsip_wizard, I'm kind of crafting this by hand as I learn.  I 
actually have a plain asterisk, and a FreePBX, system to help me learn.  I 
sometimes create something in FreePBX to see what it does to the config files.  
So that's how I modelled my pjsip.X.conf files

If I issue the command "pjsip show endpoint Twilio" it does show that 
outbound_auth=Twilio

Does that mean the initial invite will contain authentication info?  Or does 
Asterisk still wait for a 407??  (I'm wondering if maybe Asterisk is working 
normally, this is a Twilio config problem).  And I confirmed the CID info 
matches an account on Twilio, so it's not that.

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Henning Follmann
Sent: Wednesday, June 21, 2023 1:31 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] PJSIP not performing outbound authentication

On Wed, Jun 21, 2023 at 05:19:11PM +, TTT wrote:
> I am using Asterisk 20.3.0 with PJSIP.  I have setup a trunk to my ISP
> (Twilio) who requires outbound authentication.  My pjsip.auth.conf contains:
> 
> [Twilio]
> type=auth
> auth_type=userpass
> password=mysecret
> username=myun
> 
> However, my calls using the trunk are rejected with a 403. Using pjsip 
> logging I notice that the outgoing invite does not have an 
> authentication line. Why is Asterisk not sending credentials to the 
> ISP? SIP transactions
> are:
>  > INVITE
>  < 100 TRYING
>  < 403 FORBIDDEN
> 
> Or is this normal?  Must Twilio respond with a 407 which will cause 
> Asterisk to authenticate?
> 
> 


Twilio has a nice technical document to setup a trunk with PJSIP.
It includes an example for a pjsip_wizard.conf 
https://assets.cdn.prod.twilio.com/documents/TwilioElasticSIPTrunking-AsteriskPBX-Configuration-Guide-Version2-1-FINAL-09012018.pdf

Maybe that helps.

And make sure for your outgoing calls to set the callerid to a valid caller Id 
which ist authorized with your twilio account. It will not allow outgoing calls 
if the number is not recognized by twilio

-H


-- 
Henning Follmann   | hfollm...@itcfollmann.com


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- 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 not performing outbound authentication

2023-06-21 Thread TTT
I didn't use pjsip_wizard, I'm kind of crafting this by hand as I learn.  I 
actually have a plain asterisk, and a FreePBX, system to help me learn.  I 
sometimes create something in FreePBX to see what it does to the config files.  
So that's how I modelled my pjsip.X.conf files

If I issue the command "pjsip show endpoint Twilio" it does show that 
outbound_auth=Twilio

Does that mean the initial invite will contain authentication info?  Or does 
Asterisk still wait for a 407??  (I'm wondering if maybe Asterisk is working 
normally, this is a Twilio config problem).  And I confirmed the CID info 
matches an account on Twilio, so it's not that.

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Henning Follmann
Sent: Wednesday, June 21, 2023 1:31 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] PJSIP not performing outbound authentication

On Wed, Jun 21, 2023 at 05:19:11PM +, TTT wrote:
> I am using Asterisk 20.3.0 with PJSIP.  I have setup a trunk to my ISP
> (Twilio) who requires outbound authentication.  My pjsip.auth.conf contains:
> 
> [Twilio]
> type=auth
> auth_type=userpass
> password=mysecret
> username=myun
> 
> However, my calls using the trunk are rejected with a 403. Using pjsip 
> logging I notice that the outgoing invite does not have an 
> authentication line. Why is Asterisk not sending credentials to the 
> ISP? SIP transactions
> are:
>  > INVITE
>  < 100 TRYING
>  < 403 FORBIDDEN
> 
> Or is this normal?  Must Twilio respond with a 407 which will cause 
> Asterisk to authenticate?
> 
> 


Twilio has a nice technical document to setup a trunk with PJSIP.
It includes an example for a pjsip_wizard.conf 
https://assets.cdn.prod.twilio.com/documents/TwilioElasticSIPTrunking-AsteriskPBX-Configuration-Guide-Version2-1-FINAL-09012018.pdf

Maybe that helps.

And make sure for your outgoing calls to set the callerid to a valid caller Id 
which ist authorized with your twilio account. It will not allow outgoing calls 
if the number is not recognized by twilio

-H


-- 
Henning Follmann   | hfollm...@itcfollmann.com


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Multiple phones on same PJSIP account

2023-06-21 Thread TTT
Thanks was it!  Upping max_contacts to 5 solved it.  

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Antony Stone
Sent: Wednesday, June 21, 2023 12:02 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Multiple phones on same PJSIP account

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


-- 
_
-- 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 not performing outbound authentication

2023-06-21 Thread TTT
Yes, I set 

Outbound_auth=Twilio

In the [Twilio] section of pjsip.endpoint.conf

But does that mean the initial invite should contain an authentication line, or 
only that it will expect a 407? 

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Carlos Chavez
Sent: Wednesday, June 21, 2023 1:26 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] PJSIP not performing outbound authentication

 Dis you set "outbound_auth" in your endpoint configuration to Twilio?

On 21/06/23 11:19, TTT wrote:
> I am using Asterisk 20.3.0 with PJSIP.  I have setup a trunk to my ISP
> (Twilio) who requires outbound authentication.  My pjsip.auth.conf contains:
>
> [Twilio]
> type=auth
> auth_type=userpass
> password=mysecret
> username=myun
>
> However, my calls using the trunk are rejected with a 403. Using pjsip 
> logging I notice that the outgoing invite does not have an 
> authentication line. Why is Asterisk not sending credentials to the 
> ISP? SIP transactions
> are:
>   > INVITE
>   < 100 TRYING
>   < 403 FORBIDDEN
>
> Or is this normal?  Must Twilio respond with a 407 which will cause 
> Asterisk to authenticate?
>
>
--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)8116-9161


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] PJSIP not performing outbound authentication

2023-06-21 Thread TTT
I am using Asterisk 20.3.0 with PJSIP.  I have setup a trunk to my ISP
(Twilio) who requires outbound authentication.  My pjsip.auth.conf contains:

[Twilio]
type=auth
auth_type=userpass
password=mysecret
username=myun

However, my calls using the trunk are rejected with a 403. Using pjsip
logging I notice that the outgoing invite does not have an authentication
line. Why is Asterisk not sending credentials to the ISP? SIP transactions
are:
 > INVITE
 < 100 TRYING
 < 403 FORBIDDEN

Or is this normal?  Must Twilio respond with a 407 which will cause Asterisk
to authenticate?


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

Is this by design or a bug?  Does only the most recently registered phone set 
ring when I call the extension?  Seems odd...is there a way to change it so ALL 
phones on the same extension will ring?  (I'm using SNOM + PANASONIC + Aastra 
phones)

Thanks
Brian

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Antony Stone
Sent: Monday, June 19, 2023 10:47 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Multiple phones on same PJSIP account

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


-- 
_
-- 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 TTT
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?  Or 
would the first phone answered need to somehow conference in the other phone?

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Antony Stone
Sent: Monday, June 19, 2023 10:00 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Multiple phones on same PJSIP account

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


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

2023-06-19 Thread TTT
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)? 

 

Thanks

Brian (ast newb)

-- 
_
-- 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] Get SIP Call-ID from ARI

2023-06-17 Thread TTT
I tried 

GET /channels/{channelid}/variable?variable=CHANNEL(pjsip,call-id)

 

But it responds with

"message": "Channel not in Stasis application"

 

Since I want to get the call-id for a channel not in stasis I guess that won’t 
work.  Similarly, I can’t force the channel through my own code in the 
dialplan, so the PJSIP_HEADER function won’t work.  So it looks like I’ll have 
to upgrade my Asterisk test system to get the Call-ID from the ARI event.  It 
looks like it was added in Ast 16.

 

Out of curiosity, I see that call-id is returned in the “protocol_id” field of 
channel data structure.  However, since all channels in the same call must have 
the same Call-ID, how can this data be associated with a channel?  Wouldn’t it 
have to be associated with a bridge?  The Call-ID should not be available until 
two legs are bridged (I think).

 

Brian

 

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Saturday, June 17, 2023 2:25 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Get SIP Call-ID from ARI

 

On Sat, Jun 17, 2023 at 2:55 PM TTT mailto:li...@telium.io> > 
wrote:

Based on postings it should be possible to get the SIP Call-ID header value 
from the ARI.  At what point is this value available ?  As well, how do I 
retrieve that value – something like

 

GET /channels/{channelId}/pjsip_header?key=Call-Id

 

But that doesn’t work.

 

'pjsip_header' is not a valid route. All possible routes are documented on the 
wiki, if it's not there then it doesn't exist.

 

Instead you would use variable[1] to execute the PJSIP_HEADER dialplan 
function[2] or a better way would be the CHANNEL dialplan function[3] such as:

 

GET /channels/{channelid}/variable?variable=CHANNEL(pjsip,call-id)

 

Though I haven't tested that.

 

Newer versions also include the protocol identifier (Call-ID) in the channel 
ARI structure[4] which would be in events, or explicitly retrieved[5].

 

[1] 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Channels+REST+API#Asterisk20ChannelsRESTAPI-getChannelVar

[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Function_PJSIP_HEADER

[3] https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Function_CHANNEL

[4] 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+REST+Data+Models#Asterisk20RESTDataModels-Channel

[5] 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Channels+REST+API#Asterisk20ChannelsRESTAPI-get

 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com <http://www.sangoma.com>  and www.asterisk.org 
<http://www.asterisk.org> 

-- 
_
-- 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] Get SIP Call-ID from ARI

2023-06-17 Thread TTT
Based on postings it should be possible to get the SIP Call-ID header value
from the ARI.  At what point is this value available ?  As well, how do I
retrieve that value - something like

 

GET /channels/{channelId}/pjsip_header?key=Call-Id

 

But that doesn't work.

-- 
_
-- 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] Add user to conference via ReST/ARI

2023-06-15 Thread TTT
I'm trying to join a user (at SIP/99) into a conference via REST/ARI.  I
want the PBX to call the user, and then join him into an existing
conference.

 

I have created a conference in FreePBX with number 1234, and name "conf".
Conceptually the steps I have so far:

 

1. Call Application_Dial(SIP/99) (via REST)

2. Wait for user to answer (via ARI)

3. Add the channel to a bridge (via REST)

 

I'm getting stuck on step #3.  Should I call Application_BridgeAdd(channel),
where channel is provided via ARI event?  Or do I use
Application_ConfBridge(1234)?

 

I'm not sure with the latter option if "conference" parameter is the
conference number (1234), or name ("conf"), or some other value.

 

Thanks

Brian (ast newb)

-- 
_
-- 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] Event showing who called who

2023-06-08 Thread TTT
I'm monitoring the ARI, and if extension 1 calls extension 2, it seems that
extension 2 enters the bridge first, then extension 1 enters the bridge.
Can I safely (always) determine who initiated the call by who is the latest
endpoint to enter the bridge?  Or is there a better way to know who
initiates the call?  

 

I want to make this dialplan agnostic, so I don't want to listen for
ChannelDialplan events.  I see a Dial event that holds caller and peer
information but that doesn't mean a bridge will be successful,  so do I have
to start tracking the id's of each endpoint, track who 'dialed', and once a
bridge is entered try to related that data?

 

Looking ahead I wonder how to handle if extension 1 calls a call group..but
I'll ignore that for now.

 

Thanks

Brian

(ast newb)

-- 
_
-- 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] Listen to ARI events

2023-06-07 Thread TTT
I’ve been looking through the docs (near 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Applications+REST+API) 
and am searching for a list of events I can subscribe to.  Is this list 
published?  Or can I query the ARI for a list of available events?

 

Thanks

Brian

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Wednesday, June 7, 2023 11:08 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Listen to ARI events

 

On Wed, Jun 7, 2023 at 12:04 PM TTT mailto:li...@telium.io> > 
wrote:

Ok that worked.

 

Since I have not declared a statis app called “test”, does that mean any 
non-existent app name on the URL will subscribe to all system events?  (Or is 
test a built-in app name)

 

Applications are not declared or configured anywhere. The act of connecting a 
websocket with an app name creates them. And no, you have to pass 
subscribeAll=yes to have the websocket subscribed to all events. 

 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com <http://www.sangoma.com>  and www.asterisk.org 
<http://www.asterisk.org> 

-- 
_
-- 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] Listen to ARI events

2023-06-07 Thread TTT
Ok that worked.

 

Since I have not declared a statis app called “test”, does that mean any 
non-existent app name on the URL will subscribe to all system events?  (Or is 
test a built-in app name)

 

Brian

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Wednesday, June 7, 2023 9:56 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Listen to ARI events

 

On Wed, Jun 7, 2023 at 10:46 AM TTT mailto:li...@telium.io> > 
wrote:

I’ve reread the documentation a few times, and what isn’t clear is whether I 
need an app=X parameter in the url.  In other words, can I only get events for 
a single named statis app?  Or can I get events for the entire Asterisk server?

 

The command below (without app= parameter) results in no events being shown, 
but no error either.

 

You must specify an app as well. If you don't, it should reply with a 400. If 
it's not... then are you connecting to Asterisk? What does the console say? For 
example I did the following:

 

wscat --connect 
"ws://kappa:8088/ari/events?api_key=asterisk:asterisk&subscribeAll=yes&app=test"

 

Which connected successfully and then I did a call which resulted in:

 

 
{"type":"ChannelCreated","timestamp":"2023-06-07T10:54:56.295-0300","channel":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-","state":"Down","protocol_id":"","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"from-external","exten":"s","priority":1,"app_name":"","app_data":""},"creationtime":"2023-06-07T10:54:56.295-0300","language":"en"},"asterisk_id":"0c:c4:7a:ba:b3:5a","application":"test"}
< 
{"type":"ChannelDialplan","timestamp":"2023-06-07T10:54:56.295-0300","dialplan_app":"AppDial2","dialplan_app_data":"(Outgoing
 
Line)","channel":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-","state":"Down","protocol_id":"d89ddae0-6568-4ab4-995b-8feb39366a58","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"from-external","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing
 
Line)"},"creationtime":"2023-06-07T10:54:56.295-0300","language":"en"},"asterisk_id":"0c:c4:7a:ba:b3:5a","application":"test"}
< 
{"type":"Dial","timestamp":"2023-06-07T10:54:56.295-0300","dialstatus":"","forward":"","dialstring":"mytrunk_endpoint","peer":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-","state":"Down","protocol_id":"d89ddae0-6568-4ab4-995b-8feb39366a58","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"from-external","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing
 
Line)"},"creationtime":"2023-06-07T10:54:56.295-0300","language":"en"},"asterisk_id":"0c:c4:7a:ba:b3:5a","application":"test"}
< 
{"cause":34,"type":"ChannelHangupRequest","timestamp":"2023-06-07T10:54:56.296-0300","channel":{"id":"1686146096.1","name":"PJSIP/mytrunk_endpoint-","state":"Down","protocol_id":"d89ddae0-6568-4ab4-995b-8feb39366a58","caller":{"name":"Electron","number":"1009"},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"con

Re: [asterisk-users] Listen to ARI events

2023-06-07 Thread TTT
I’ve reread the documentation a few times, and what isn’t clear is whether I 
need an app=X parameter in the url.  In other words, can I only get events for 
a single named statis app?  Or can I get events for the entire Asterisk server?

 

The command below (without app= parameter) results in no events being shown, 
but no error either.

 

Thanks

Brian

(Ast newbie)

 

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of TTT
Sent: Tuesday, June 6, 2023 8:39 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 

Subject: Re: [asterisk-users] Listen to ARI events

 

I tried the command below (with subscribeAll=yes).  I made a couple of calls 
but didn’t see any events.  Should I see events?

 

From: asterisk-users [ <mailto:asterisk-users-boun...@lists.digium.com> 
mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Joshua C. Colp
Sent: Tuesday, June 6, 2023 6:31 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion < 
<mailto:asterisk-users@lists.digium.com> asterisk-users@lists.digium.com>
Subject: Re: [asterisk-users] Listen to ARI events

 

On Tue, Jun 6, 2023 at 6:04 PM TTT mailto:li...@telium.io> > 
wrote:

I have the ARI enabled on my Asterisk test box, and want to listen to all 
events.  I can’t find the syntax to do that.  Can I only listen to events 
related to a stasis app?  

 

I was hoping that a simple wscat command like this would show me all events:

 

wscat -c "ws://localhost:8088/ari/events?api_key=asterisk:asterisk "

 

This does not listen to all events by default. If you want to listen to 
everything you can pass subscribeAll=yes[1] like so:

 

ws://localhost:8088/ari/events?api_key=asterisk:asterisk&subscribeAll=yes

 

[1] 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Events+REST+API#Asterisk20EventsRESTAPI-userEvent


 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at  <http://www.sangoma.com> www.sangoma.com and  
<http://www.asterisk.org> www.asterisk.org

-- 
_
-- 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] Listen to ARI events

2023-06-06 Thread TTT
I tried the command below (with subscribeAll=yes).  I made a couple of calls 
but didn’t see any events.  Should I see events?

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Joshua C. Colp
Sent: Tuesday, June 6, 2023 6:31 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Listen to ARI events

 

On Tue, Jun 6, 2023 at 6:04 PM TTT mailto:li...@telium.io> > 
wrote:

I have the ARI enabled on my Asterisk test box, and want to listen to all 
events.  I can’t find the syntax to do that.  Can I only listen to events 
related to a stasis app?  

 

I was hoping that a simple wscat command like this would show me all events:

 

wscat -c "ws://localhost:8088/ari/events?api_key=asterisk:asterisk "

 

This does not listen to all events by default. If you want to listen to 
everything you can pass subscribeAll=yes[1] like so:

 

ws://localhost:8088/ari/events?api_key=asterisk:asterisk&subscribeAll=yes

 

[1] 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Events+REST+API#Asterisk20EventsRESTAPI-userEvent


 

-- 

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com <http://www.sangoma.com>  and www.asterisk.org 
<http://www.asterisk.org> 

-- 
_
-- 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] Listen to ARI events

2023-06-06 Thread TTT
I have the ARI enabled on my Asterisk test box, and want to listen to all
events.  I can't find the syntax to do that.  Can I only listen to events
related to a stasis app?  

 

I was hoping that a simple wscat command like this would show me all events:

 

wscat -c "ws://localhost:8088/ari/events?api_key=asterisk:asterisk "

 

I know how to do it form the AMI.looking for something similar.

 

Thanks

Brian

(Ast newbie)

-- 
_
-- 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] FW: Ready to throw up my hands in defeat

2023-05-22 Thread TTT
You don't say what happens when you start Asterisk, but I'll assume your 
registration with your provider is failing.  If you turn on SIP debug from CLI 
you can watch your registration attempts, and see the exact reason for failure. 
 (eg: unreachable vs credentials).  Post that output into the list email if you 
aren’t sure what to make of it.

 

The numerous similar stanzas have to do with pjsip.  Many of the older 
examples/guides reference a simpler (deprecated) SIP stack, with slightly 
different syntax.  If you google PJSIP + Asterisk config you'll send the 
purpose of all of those stanza's.  PJSIP adds a lot of complexity for the 
outlier use cases (99% of people don't need all of PJSIP's capabilities) - but 
you have to fill it all in.  There are some nice diagrams here 
(https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships)
 which explains it fairly well.

 

Please reply to the list only (so anyone can jump in and benefit from the 
discussion too)

 

 

 

-Original Message-

From: Steve Matzura [mailto:s...@noisynotes.com] 

Sent: Monday, May 22, 2023 12:15 PM

To: TTT 

Subject: Re: [asterisk-users] Ready to throw up my hands in defeat

 

Thanks. Further reading and digging did in fact prove out that the RTP is a lot 
of what's been throwing me. I won't bother with that any longer.

 

 

I did make the "hello world" example from the Asterisk wiki work. It was 

simple enough--lift the example right out of the book, paste it into the 

appropriate files, install and configure Zoipr, restart Asterisk,  and 

it just worked. Good.

 

 

So now I'm branching out, ready to add my DID provider info and actually 

be able to call in from outside.

 

 

The following file contents come from my DID provider, voip.ms. The only 

thing I added was my specific DID registration info, which has been 

redacted here:

 

 

pjsip.conf:

 

 

[transport-udp]

 

type = transport

protocol = udp

bind = 0.0.0.0

 

[voipms]

type = registration

transport = transport-udp

outbound_auth = voipms

client_uri = sip:**@newyork6.voip.ms:5060

server_uri = sip:newyork6.voip.ms:5060

 

[voipms]

type = auth

auth_type = userpass

username = **

password = **

 

[voipms]

type = aor

contact = sip:**@newyork6.voip.ms

 

[voipms]

type = endpoint

transport = transport-udp

context = mycontext

disallow = all

allow = ulaw

; allow=g729 ; uncomment if you support g729

from_user = **

auth = voipms

outbound_auth = voipms

aors = voipms

; NAT parameters:

rtp_symmetric = yes

rewrite_contact = yes

send_rpid = yes

 

 

*** NOTE: I left those lines in because I am after all behind a home 

router so I thought I'd need it. ***

 

 

[voipms]

type = identify

endpoint = voipms

match = newyork6.voip.ms

 

 

Why so many stanzas all called 'voipms'? I see that they all have 

different types, so why not have everything in the same stanza?

 

 

Here's extensions.conf:

 

 

[mycontext]

; Make sure to include inbound prior to outbound because the _NXXNXX 

handler will match the incoming call and create a loop

include => voipms-inbound

include => voipms-outbound

 

[voipms-outbound]

exten => _1NXXNXX,1,Dial(PJSIP/${EXTEN}@voipms)

exten => _1NXXNXX,n,Hangup()

exten => _NXXNXX,1,Dial(PJSIP/1${EXTEN}@voipms)

exten => _NXXNXX,n,Hangup()

exten => _011.,1,Dial(PJSIP/${EXTEN}@voipms)

exten => _011.,n,Hangup()

exten => _00.,1,Dial(PJSIP/${EXTEN}@voipms)

exten => _00.,n,Hangup()

 

; inbound context example for your DID numbers, do not add the number 1 

in front

 

[voipms-inbound]

exten => 3115552368,1,Answer() ; fake DID number

 

 

Now, I have the block of text from the hello-world wiki:

 

 

[from-internal]

exten = 100,1,Answer()

same = n,Wait(1)

same = n,Playback(hello-world)

same = n,Hangup()

 

 

That's certainly clear enough.

 

 

My question is, how do I connect the two extensions.conf fragments? 

i.e., where's the routing from the system answering the inbound connect 

request to the actions in the extension 100 statements?

 

 

The book talks a lot about registering phones through SQL. Looking at 

pjsip.conf is a little bewildering--all those '[6001]' examples. Which 

ones do I absolutely need? I have two kinds of phones to register--one 

on my own LAN and one remote, presumably coming in with NAT'ing and 

definitely behind its own firewall on its own LAN.

 

 

On 5/22/2023 10:59 AM, TTT wrote:

 

> There are lots of little tweaks/adjustments overlooked in most guides/books.  
> The examples work most of the time, but even a small difference in your 
> environment might break them.

> 

> I'm pretty sure the list will be able to answer questions to help you figure 
> it out.  If you break down your current prob

Re: [asterisk-users] Ready to throw up my hands in defeat

2023-05-22 Thread TTT
There are lots of little tweaks/adjustments overlooked in most guides/books.  
The examples work most of the time, but even a small difference in your 
environment might break them.

I'm pretty sure the list will be able to answer questions to help you figure it 
out.  If you break down your current problem into the basic step/task and 
explain what's not working then you'll likely get a good explanation.

If you're not sure where to start, just add one physical phone  and a screaming 
monkeys entry in the dialplan (lots of examples out there).  If that' doesn't 
work, post the CLI output with verbose turned up.

In general stay away from realtime (I assume that is the SQL reference)


-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Steve Matzura
Sent: Monday, May 22, 2023 10:19 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: [asterisk-users] Ready to throw up my hands in defeat

I am not comfortable with admitting this on a public userlist [;-)] but after 
over forty years in software development and manual-reading and 
-interpretation, I've finally hit one that I can't get past.


I've mention previously that I worked with Asterisk in older days--like in 
around 2003--and never had any trouble understanding what to do and how to do 
it in order to make it work. I am attempting to build what's probably the 
world's most basic system--one incoming trunk from a DID provider going to one 
internal extension that answers, plays a couple things, and possibly takes a 
message. I'd also like to add two extensions with real physical 
endpoints--phones--one local, one remote. 
I think I can manage that part. It's the initial SIP stuff that's making me 
dizzy.


The book I am now reading--"Asterisk, the Definitive Guide" by Madsen, Bryant 
and Meggelin for Asterisk version 16-- assumes I have built an implementation 
from source, and that includes SQL. There are tons of references to SQL 
databases in the book which I understand, but having installed Asterisk from a 
distribution package, that component is not part of the installation, so I am 
presumably expected to supply the information by manually entering it into 
configuration files. I'm OK with doing that, too. The part I'm having trouble 
with is that the samples in the configuration files, particularly pjsip.conf, 
offer several choices for some of the stanzas, like all the things defining 
trunks and endpoints, and that's where I'm losing it. The book makes it sound 
and look so easy--add a couple records to a couple SQL tables according to your 
instruments and DID providers, and it probably works just that smoothly and 
easily. But how does one make these choices when one has to manually edit these 
configurations and choose the one that at least halfway looks like the SQL 
stuff in the book?


I think I need a little hand-holding and am willing to buy some from someone 
who has the time and inclination to provide it. I'm a fast learner, I record 
all such sessions, and I'm sure I can get what I need in a couple hours, most 
likely less. if you're interested, or know someone who is, please contact me 
off-list, with my eternal thanks in advance.


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] DUNDI anyone?

2023-05-02 Thread TTT
DUNDI was a great idea and we saw it deployed, but we've watched clients 
struggle with it.  And many eventually give up on it.

I don't consider it overly complex, but I suspect it's proper (and safe) 
configuration is beyond a lot of tel admins.  Im curious what the state of 
dundi deployments is.

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Benoit Panizzon
Sent: Tuesday, May 2, 2023 7:45 AM
To: Asterisk Users 
Subject: [asterisk-users] DUNDI anyone?

Hi

Well it is well some time that my last DUNDI peer has become unreachable.

I guess too many issues with spoofed numbers etc.

But I am wondering, do people, especially larger entities like telcos, still 
use DUNDI?

I know that in some Hamradio communities, DUNDI is used to interconnect PBXes, 
but that is with private phone number ranges, not connected to the public.

Want some DUNDI peering? DM me :-)

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Asterisk unable to do DNS lookups

2022-11-30 Thread TTT
I've noticed on several occasions that if Asterisk starts without a network
connection, then even if the network connection is restored, DNS lookups
fail.

 

After the connection is restored I can successfully do NSLOOKUPs from the
command line, but the IAX2 registration attempts keep failing because
Asterisk has a problem.

 

My questions are:

1.   Is there a way to make Asterisk update (whatever is wrong) and
resume successful DNS lookups?

2.   Is there a way from the Asterisk CLI to detect when Asterisk enters
this state of failed DNS lookups?  (Other than tracking IAX2/SIP
registration failures)

 

-- 
_
-- 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] Name of module to reload for dialplan

2022-07-18 Thread TTT
I want to reload the dialplan via the AMI, and I found the documentation
showing the command:

 

Action: Reload

ActionID: 

Module: 

 

And the module names are

* cdr

* dnsmgr

* extconfig

* enum

* acl

* manager

* http

* logger

* features

* dsp

* udptl

* indications

* cel

* plc

But which of the above are equivalent to "dialplan"?  I want to reload the
dialplan only.

-- 
_
-- 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] externnotify script not running

2022-03-17 Thread TTT
Unless someone else chimes in (who knows for sure)...

I wonder if Asterisk restricts location of file it will run.  Try moving to 
/var/lib/asterisk as a test and see if it executes

Next I would start to wonder about the other obvious stuff...very hard to see 
if you have been looking at it for hours.  Try 777 permission on the file and 
perhaps up the path leading to the file.  (just to experiment)

Try complete service restart of Asterisk

...and after that I'm out of helpful ideas.  You may have to retrace your steps 
for something you missed, since this all seems pretty straight forward.  (I 
haven't tryied, but if verbose it up on the CLI will you see a message/error 
when ast tries to run your scrip)


-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Mike Diehl
Sent: Thursday, March 17, 2022 4:55 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 

Subject: Re: [asterisk-users] externnotify script not running

These were all good ideas.  I changed my script to a bash script called
deliver_vm.sh:

==
#!/bin/bash

echo testme >> /home/phones/test.txt
==

The permissions are correct:

# ls -la commands/deliver_vm.*
-rwxr-xr-x 1 root root 254 Mar 16 21:12 commands/deliver_vm.pl -rwxrwxrwx 1 
root root  50 Mar 17 14:17 commands/deliver_vm.sh

It does run from the command line, but still not from Asterisk.

It feels like a configuration issue in Asterisk.  Here is what I have:

externnotify=/home/phones/commands/deliver_vm.sh ${VM_NAME} ${VM_DUR} $ 
{VM_MSGNUM} ${VM_MAILBOX} ${VM_CALLERID} ${VM_DATE}

After I made the change, I did:

module reload app_voicemail.so


Anything else I can check/do?

Thanks again,

Mike.



On Thursday, March 17, 2022 3:53:46 PM EDT TTT wrote:
> Can I suggest you eliminate a few obvious factors...
> 
> Like 1. try a bash script first instead of perl, 2. Have the bash 
> script just issue a "logger' command
> 
> If that works go back to perl which does the same.  If that works, 
> change you perl script to dump all vars to a file..etc.
> 
> Also, check your script for nonprintable characters.  Does the script 
> run from the command line?  (if you feed it vars)
> 
> -Original Message-
> From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] 
> On Behalf Of Mike Diehl Sent: Thursday, March 17, 2022 3:37 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion 
>  Subject: Re: [asterisk-users] 
> externnotify script not running
> 
> No, this machine doesn't have selinus installed/configured/enforced.
> 
> Is there a debug setting I could use to debug this?  I didn't see 
> anything in the logs.
> 
> Perhaps there is a working configuration that someone would share?
> 
> Thanks again,
> 
> Mike.
> 
> On Thursday, March 17, 2022 2:22:47 AM EDT Marek Greško wrote:
> > Hello,
> > 
> > maybe selinux could be the cause?
> > 
> > Marek
> > 
> > 
> > Sent with ProtonMail secure email.
> > 
> > --- Original Message ---
> > 
> > On Wednesday, March 16th, 2022 at 21:10, Mike Diehl 
> > 
> 
> wrote:
> > > Hi all,
> > > 
> > > I'm trying to build a custom voicemail delivery system using 
> > > externnotify in
> > > 
> > > voicemail.conf. But, the configured script doesn't seem to run.
> > > 
> > > I have:
> > > 
> > > externnotify=/home/phones/commands/deliver_vm.pl ${VM_NAME} 
> > > ${VM_DUR} $
> > > 
> > > {VM_MSGNUM} ${VM_MAILBOX} ${VM_CALLERID} ${VM_DATE}
> > > 
> > > The deliver_vm.pl has read and execute permissions.
> > > 
> > > Here is the file I have:
> > > 
> > > ===
> > > 
> > > #!/usr/bin/perl
> > > 
> > > $a = join("\t", @ARGV);
> > > 
> > > open FILE, ">>/tmp/test.txt";
> > > 
> > > print FILE "$a\n";
> > > 
> > > close FILE;
> > > 
> > > ===
> > > 
> > > After I leave a voicemail message, I expect to find something in 
> > > /tmp/test.txt,
> > > 
> > > but I don't.
> > > 
> > > What am I missing?
> > > 
> > > Thanks in advance.
> > > 
> > > Mike.
> > > 
> > > --
> > > 
> > > __
> &g

Re: [asterisk-users] externnotify script not running

2022-03-17 Thread TTT
Can I suggest you eliminate a few obvious factors...

Like 1. try a bash script first instead of perl, 2. Have the bash script just 
issue a "logger' command

If that works go back to perl which does the same.  If that works, change you 
perl script to dump all vars to a file..etc.

Also, check your script for nonprintable characters.  Does the script run from 
the command line?  (if you feed it vars)

-Original Message-
From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Mike Diehl
Sent: Thursday, March 17, 2022 3:37 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] externnotify script not running

No, this machine doesn't have selinus installed/configured/enforced.

Is there a debug setting I could use to debug this?  I didn't see anything in 
the logs.

Perhaps there is a working configuration that someone would share?

Thanks again,

Mike.


On Thursday, March 17, 2022 2:22:47 AM EDT Marek Greško wrote:
> Hello,
> 
> maybe selinux could be the cause?
> 
> Marek
> 
> 
> Sent with ProtonMail secure email.
> 
> --- Original Message ---
> 
> On Wednesday, March 16th, 2022 at 21:10, Mike Diehl 
> 
wrote:
> > Hi all,
> > 
> > I'm trying to build a custom voicemail delivery system using 
> > externnotify in
> > 
> > voicemail.conf. But, the configured script doesn't seem to run.
> > 
> > I have:
> > 
> > externnotify=/home/phones/commands/deliver_vm.pl ${VM_NAME} 
> > ${VM_DUR} $
> > 
> > {VM_MSGNUM} ${VM_MAILBOX} ${VM_CALLERID} ${VM_DATE}
> > 
> > The deliver_vm.pl has read and execute permissions.
> > 
> > Here is the file I have:
> > 
> > ===
> > 
> > #!/usr/bin/perl
> > 
> > $a = join("\t", @ARGV);
> > 
> > open FILE, ">>/tmp/test.txt";
> > 
> > print FILE "$a\n";
> > 
> > close FILE;
> > 
> > ===
> > 
> > After I leave a voicemail message, I expect to find something in 
> > /tmp/test.txt,
> > 
> > but I don't.
> > 
> > What am I missing?
> > 
> > Thanks in advance.
> > 
> > Mike.
> > 
> > --
> > 
> > 
> > _
> > 
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com 
> > --
> > 
> > Check out the new Asterisk community forum at:
> > https://community.asterisk.org/
> > 
> > New to Asterisk? Start here:
> > 
> > https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> > 
> > asterisk-users mailing list
> > 
> > To UNSUBSCRIBE or update options visit:
> > 
> > http://lists.digium.com/mailman/listinfo/asterisk-users





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

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

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- 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] voicemails and recordings have words repeated

2022-03-13 Thread TTT
Unless this is a known bug, there are two likely causes…to figure it out:

 

1,  Is the a long delayed echo on the line ?  Is it entire message or just part 
of message with repeated words?  All users/callers or just particular ones?

2. Is there a file writing issue?  (Is your asterisk running in a container 
that accesses filesystem through the container, etc)

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Israel Gottlieb
Sent: Sunday, March 13, 2022 3:52 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: [asterisk-users] voicemails and recordings have words repeated

 

Hi all

i have run into a problem and cant seem to find the solution

 

calls that are recorded and lots of voicemails recorded you can her some of the 
words repeated as if the person has said it twice

it happens by different callers 

using pjsip on 18.9.0

 

any ideas?

 

thanks

-- 
_
-- 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 start via systemd fails, but its running

2022-03-07 Thread TTT
I have a fresh Asterisk 18 install on a fresh OS (AWS Linux 2).  I used the
service file from contrib directory and commented out user and group
settings so it runs under root.

 

When I start Asterisk via systemd it waits a long time and then times out.
Reporting failure to the command line.  Result of journalctl -xe is below.

 

However, the asterisk executable has started and is running, I can connect
to it via 'asterisk -r'.  Is there a change needed to the service file?
(Anyone tested under Amazon Linux 2)

 

 

Mar 08 02:33:04 ip-172-31-25-10.us-east-2.compute.internal dhclient[2858]:
XMT: Solicit on eth0, interval 119780ms.

Mar 08 02:33:55 ip-172-31-25-10.us-east-2.compute.internal systemd[1]:
asterisk.service start operation timed out. Terminating.

Mar 08 02:33:55 ip-172-31-25-10.us-east-2.compute.internal systemd[1]:
Failed to start Asterisk PBX and telephony daemon..

-- Subject: Unit asterisk.service has failed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit asterisk.service has failed.

--

-- The result is failed.

Mar 08 02:33:55 ip-172-31-25-10.us-east-2.compute.internal systemd[1]: Unit
asterisk.service entered failed state.

Mar 08 02:33:55 ip-172-31-25-10.us-east-2.compute.internal systemd[1]:
asterisk.service failed.

Mar 08 02:33:59 ip-172-31-25-10.us-east-2.compute.internal systemd[1]:
asterisk.service holdoff time over, scheduling restart.

Mar 08 02:33:59 ip-172-31-25-10.us-east-2.compute.internal systemd[1]:
Stopped Asterisk PBX and telephony daemon..

-- Subject: Unit asterisk.service has finished shutting down

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit asterisk.service has finished shutting down.

Mar 08 02:33:59 ip-172-31-25-10.us-east-2.compute.internal systemd[1]:
Starting Asterisk PBX and telephony daemon

-- Subject: Unit asterisk.service has begun start-up

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit asterisk.service has begun starting up.

Mar 08 02:33:59 ip-172-31-25-10.us-east-2.compute.internal kernel: xfs
filesystem being remounted at /tmp supports timestamps until 2038
(0x7fff)

Mar 08 02:33:59 ip-172-31-25-10.us-east-2.compute.internal kernel: xfs
filesystem being remounted at /var/tmp supports timestamps until 2038
(0x7fff)

Mar 08 02:35:04 ip-172-31-25-10.us-east-2.compute.internal dhclient[2858]:
XMT: Solicit on eth0, interval 119400ms.

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