[asterisk-users] [asterisk-app-dev] Handling blind transfers with ARI

2022-06-13 Thread Jean Aunis

Hello,

I'm trying to figure out how blind transfers are supposed to work with ARI.

When two channels are bridged together through ARI, and one of them 
performs a blind SIP transfer, two things happen :


- a Local channel is instanciated and goes through the dialplan at the 
specified destination


- the transferee channel goes through the same dialplan at the specified 
destination


The latter looks fine. The former is strange. I understand that this 
Local channel is created to avoid losing track of the transferee channel 
in ARI, but:


- how am I supposed to handle it ?

- when the transfer is successful, which channel must be placed in which 
bridge ?


- why do both channels go through the same part of the dialplan ? I 
would have expected only one of them to do that.


Any hints ?

Regards,

Jean



___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
--
_
-- 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 start via systemd fails, but its running

2022-03-07 Thread Jean Aunis

Le 08/03/2022 à 03:40, TTT a écrit :


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.


[...]


Hello,

The service file provided in the "contrib" directory defines a service 
of type "notify". To get it work, Asterisk needs to be compiled with the 
option "HAVE_SYSTEMD".


Otherwise, you can modify the service file to define the service as 
"forking" instead of "notify".


Regards

Jean
-- 
_
-- 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 bring in RTP audio

2021-11-08 Thread Jean Aunis

Le 08/11/2021 à 18:10, Jerry Geis a écrit :

[...]
Hi Jean
interesting - was not aware of the unicastrtp channel - been looking for more 
information on it - not finding much.
Is there anyway to bring "in" audio with unicastrtp.  I can perhaps see 
'sending" audio out - but I'm looking for both directions.
Would this be the syntax ?
Channel: UnicastRTP/basic/IP:port
Thanks
Jerry



If I remember well the syntax is "UnicastRTP/IP:port"

The local RTP port is randomly allocated but you can retrieve it in a 
channel variable. I guess you will have to transmit it to the other 
side, unless the other side has a kind of "symmetric RTP" machanism.


-- 
_
-- 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 bring in RTP audio

2021-11-08 Thread Jean Aunis

Hi -

I have a device that has 16 RTP ports.  I desire to bring that audio 
into Asterisk... is that possible ?

The device does not run SIP at all just RTP audio. I am using Asterisk 18.
How might I do that ?

Thanks,

Jerry


Hello,

You may use a UnicastRTP channel. It allows you to specify an IP/port to 
connect to.


Regards,

Jean



--
_
-- 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] check if call is from chan_sip or chan_pjsip

2021-09-17 Thread Jean Aunis

Le 17/09/2021 à 14:41, marek a écrit :

hi,

i need check sip headers of incoming calls

i have hybrid configuration with chan_sip and chan_pjsip enabled

so i need check if incoming call is through chan_sip or chan_pjsip 
because i cant use i.e. ${PJSIP_HEADER(read,something)} on chan_sip


is there some function/application/variable?

thanks

Marek



Hi,

${CHANNEL(channeltype)} should give you the information.

Regards,

Jean



--
_
-- 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] Delay when dialing...

2021-07-23 Thread Jean Aunis

Le 22/07/2021 à 18:32, Carlos Chavez a écrit :
    I started noticing a few days ago that whenever I dial any number 
or extension there is a delay of 5 to 10 seconds before Asterisk 
reacts.  I see nothing on the CLI for that time and then the call goes 
through.  I have checked my network to make sure there is nothing 
slowing down packets between the phones and the server.


    Any settings I should check on the Asterisk side?  This is 
happening with all phones (several brands).



Hi,

I've seen this problem several times when there is no DNS resolution of 
Asterisk's hostname.


Try to add your hostname to /etc/hosts and check if it's better.

Regards,

Jean



--
_
-- 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] Combine audio and video from two different sources

2021-07-09 Thread Jean Aunis

Le 06/07/2021 à 21:40, Ryan Press a écrit :

[...]

Is there some way to execute re-INVITE from ARI?

At first glance I thought it was not possible, but maybe you can try to 
hold/unhold the channel. No idea if it will actually 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

Re: [asterisk-users] Combine audio and video from two different sources

2021-07-06 Thread Jean Aunis

Le 30/06/2021 à 16:10, Ryan Press a écrit :

[...]
[from-internal-custom] ; Doorbell video bridge
exten => doorbell_rtsp,1,Answer() same => 
n,RTSP-SIP(rtsp://admin:12345@192.168.24.53:554/live/sub,0,asterisk,5060 
)

; Doorbell combined video/audio incoming
exten => 762,1,Answer() same => 
n,Page(PJSIP/805/doorbell_rtsp@from-internal-custom,qd)


The problem comes when I try to get the door intercom to call an 
extension.  Because the calling device (door intercom) does not 
include video, the video capability is not added to the ConfBridge and 
therefore when I bridge in the RTSP-SIP channel it does not connect.  
When I tried to use Originate it had the same problem, no video codec 
was offered.


Is there some way I can create a ConfBridge and force a video codec?  
Or use Originate with a video codec?


I see that Asterisk has included Streams for a while now. Maybe this 
is the best way forward but I'm not sure this is something I can 
easily configure without writing a bunch of new code.


Thanks,
Ryan


Hello,

Did you try to use ARI's "originate" function with the "format" 
parameter containing a video codec ?


-- 
_
-- 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-app-dev] Handling transfers with ARI

2020-12-23 Thread Jean Aunis

Thank you all for the hints.

I ended up using a mix of dialplan to deal with the Local channels, and 
ARI to detect the transfer and redirect. It doesn't look like a "clean" 
solution but I have nothing better for the moment :


Dialplan :

exten  = 
100,1,GotoIf($[$["${SIPTRANSFER}"="yes"]&$["${CHANNEL(channeltype)}"="Local"]]?waittransfer:)

; deal with channel being transfered
same  = n,Transfer(100)
same  = n,Hangup()

; deal with Asterisk-managed Local channel
same = n(waittransfer),Wait(2)
same  = n,Hangup()

NodeJS :

bridge.once('BridgeAttendedTransfer', event => {
    var transferee = new ari.Channel(event.transferee.id);
    transferee.continueInDialplan({
  context: event.context,
  extension: event.exten,
  priority: 1
    });
});

Le 23/12/2020 à 19:46, Phil Mickelson a écrit :
Unfortunately, I suspect my situation is different from yours in that 
I control everything.  And, when Bob wants to transfer the call he 
clicks a button on the screen, not a button on the phone.  I don't use 
any part of the dialplan except to start ARI.


Sorry.

Phil

On Wed, Dec 23, 2020 at 2:56 AM Jean Aunis <mailto:jean.au...@prescom.fr>> wrote:


Thanks for the answer.

Not sure I get the idea : when a SIP phone performs a
blind-transfer, I have no control over what Asterisk does with the
channels. During my tests, Bob's channel was automatically pulled
out of the bridge, and replaced with a Local channel whose peer
goes through the dialplan to the transfer destination.

How can you link the newly created Local channel with Alice's one ?

For the moment, I have a piece of solution with the
BridgeBlindTransfer event, but I still have troubles with these
Local channel issues.

Le 22/12/2020 à 20:13, Phil Mickelson a écrit :

Not sure if this will help but what I do is fairly simple.  A
couple of things:

1.  This is all written in JS using Node.js.
2.  I use ari-client from npm.

To me this is very simple.  You already have the bridge and
channel setup for Alice.  I create another channel that dials
Charlie.  And, as soon as the create channel call comes back I
just set the channel id (was Bob) in the bridge to the new
channel for Charlie.  That's it.  If it doesn't get answered I
hope it goes to VM.  However, that's the downside of a blind
transfer.  I have some code in there for what happens if Alice
hangs up before Charlie answers, etc but that's because I keep
track of every call in my system.

And I wrote all of this before there were Promises and
Async/Await.  Hopefully next year I'll have the time to rewrite
the whole thing.

And, for the people at Asterisk who came up with the idea of
ARI.  Thank you s much.  Hope everyone has a wonderful
holiday and that 2021 is much better than 2020!

Phil

On Tue, Dec 22, 2020 at 5:38 AM Jean Aunis mailto:jean.au...@prescom.fr>> wrote:

Hello,

I'm struggling to find a way to properly handle blind
transfers with ARI.

This is my use case :

- Alice calls Bob through Asterisk

- dialing and bridging is done with ARI

- when Bob blind-transfers to Charlie, I would like to use the
"redirect" ARI operation, or the Transfer application

But here is the issue : since the channels are stasis-managed,
transferring is done with Local channels which remain in the
path, so
Transfer and redirect have no effect on them. And Alice's
channel is not
aware that it is being transferred.

Has somebody already dealt with this ?

Regards,

Jean


___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
<mailto:asterisk-app-...@lists.digium.com>
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev


___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com  
<mailto:asterisk-app-...@lists.digium.com>
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
<mailto:asterisk-app-...@lists.digium.com>
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev


___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
-- 
___

Re: [asterisk-users] [asterisk-app-dev] Handling transfers with ARI

2020-12-22 Thread Jean Aunis

Thanks for the answer.

Not sure I get the idea : when a SIP phone performs a blind-transfer, I 
have no control over what Asterisk does with the channels. During my 
tests, Bob's channel was automatically pulled out of the bridge, and 
replaced with a Local channel whose peer goes through the dialplan to 
the transfer destination.


How can you link the newly created Local channel with Alice's one ?

For the moment, I have a piece of solution with the BridgeBlindTransfer 
event, but I still have troubles with these Local channel issues.


Le 22/12/2020 à 20:13, Phil Mickelson a écrit :
Not sure if this will help but what I do is fairly simple.  A couple 
of things:


1.  This is all written in JS using Node.js.
2.  I use ari-client from npm.

To me this is very simple.  You already have the bridge and channel 
setup for Alice.  I create another channel that dials Charlie.  And, 
as soon as the create channel call comes back I just set the channel 
id (was Bob) in the bridge to the new channel for Charlie.  That's 
it.  If it doesn't get answered I hope it goes to VM.  However, that's 
the downside of a blind transfer.  I have some code in there for what 
happens if Alice hangs up before Charlie answers, etc but that's 
because I keep track of every call in my system.


And I wrote all of this before there were Promises and Async/Await.  
Hopefully next year I'll have the time to rewrite the whole thing.


And, for the people at Asterisk who came up with the idea of ARI.  
Thank you s much.  Hope everyone has a wonderful holiday and that 
2021 is much better than 2020!


Phil

On Tue, Dec 22, 2020 at 5:38 AM Jean Aunis <mailto:jean.au...@prescom.fr>> wrote:


Hello,

I'm struggling to find a way to properly handle blind transfers
with ARI.

This is my use case :

- Alice calls Bob through Asterisk

- dialing and bridging is done with ARI

- when Bob blind-transfers to Charlie, I would like to use the
"redirect" ARI operation, or the Transfer application

But here is the issue : since the channels are stasis-managed,
transferring is done with Local channels which remain in the path, so
Transfer and redirect have no effect on them. And Alice's channel
is not
aware that it is being transferred.

Has somebody already dealt with this ?

Regards,

Jean


___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
<mailto:asterisk-app-...@lists.digium.com>
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev


___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
-- 
_
-- 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-app-dev] Handling transfers with ARI

2020-12-22 Thread Jean Aunis

Hello,

I'm struggling to find a way to properly handle blind transfers with ARI.

This is my use case :

- Alice calls Bob through Asterisk

- dialing and bridging is done with ARI

- when Bob blind-transfers to Charlie, I would like to use the 
"redirect" ARI operation, or the Transfer application


But here is the issue : since the channels are stasis-managed, 
transferring is done with Local channels which remain in the path, so 
Transfer and redirect have no effect on them. And Alice's channel is not 
aware that it is being transferred.


Has somebody already dealt with this ?

Regards,

Jean


___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
--
_
-- 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] Need feedback on the use of AMI events generated by MESSAGE requests

2020-01-30 Thread Jean Aunis

Le 30/01/2020 à 16:33, Joshua C. Colp a écrit :
On Thu, Jan 30, 2020 at 3:18 AM Jean Aunis <mailto:jean.au...@prescom.fr>> wrote:


Hello,

I use UserEvents generated by the Message/ast_message_queue
channel with the UserEvent application.


Do you use any aspects of the channel itself in the user events, or 
merely the contents of the user event and what you've placed in it?
We only use the contents of the user event. These contents are populated 
with data from the MESSAGE and MESSAGE_DATA functions.


--
Joshua C. Colp
Asterisk Technical 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] Need feedback on the use of AMI events generated by MESSAGE requests

2020-01-29 Thread Jean Aunis

Hello,

I use UserEvents generated by the Message/ast_message_queue channel with 
the UserEvent application.


Regards

Jean

Le 29/01/2020 à 20:31, George Joseph a écrit :
For those of you who actually process SIP MESSAGE requests...  Do you 
use any of the AMI events generated by the "Message/ast_msg_queue" 
channel?   We want to change that channel to an "internal" channel 
that doesn't generate AMI events (for performance reasons) but we need 
to know if anyone's using them first.


Thanks!
--
George Joseph
Asterisk Software Developer
direct/fax +1 256 428 6012
Check us out at www.sangoma.com  and 
www.asterisk.org 

image.png

-- 
_
-- 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] codec opus on centos 6 with asterisk 16

2019-09-09 Thread Jean Aunis

Hello,

Did you install the "opus" RPM ?

Regards

Jean

Le 09/09/2019 à 13:08, Israel Gottlieb a écrit :

Hi list
does anyone know how i could use codec opus with asterisk 16 when 
using centos 6

the prebuilt binary from digium doesnt load


Thanks,
Israel


-- 
_
-- 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] Cross-compiling Asterisk 16

2019-01-15 Thread Jean Aunis

Hello,

I've just gone through the process of cross-compiling Asterisk 16 for 
ARM. I thought it would be as easy as calling the "./configure" script 
with the appropriate "host" parameter, but it turned out to be more 
complicated. I'm wondering whether I did something wrong, or if there 
are some bugs in the "configure" script.


Here are the issues I had to solve :

1- in the "configure" script, checking the presence of "hrirs.h" does 
not work when cross-compiling. I had to comment out all the related code 
in the script.


2- pkg-config does not always use the proper directories. "Not always" 
because it worked properly on Ubuntu, but not on Centos. I had to 
manually set PKG_CONFIG_LIBDIR and PKG_CONFIG_PATH appropriately when 
launching "configure"


3- pjproject and jansson are not properly cross-compiled. It looks like 
the target architecture is not properly set during the configuration 
process. I had to reconfigure them manually before compiling.


Does anybody have any experience with this ? And should I fill bug 
reports for these issues ?


Regards

Jean Aunis


--
_
-- 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-app-dev] Multiple ChannelDestroyed events for the same channel

2019-01-11 Thread Jean Aunis

Le 11/01/2019 à 16:47, Matt Riddell a écrit :

Hiya,

When I hang up on a call to my stasis app I’m getting multiple channelDestroyed 
events for the same channel:

app.js:985:13) Channel was destroyed: 1547220509.77
app.js:1029:17) This was a customer
app.js:1030:17) Checking if this was a customer talking to an agent
app.js:1043:21) Customer was not talking to anyone
app.js:1126:13) 2019-01-11 10:28:29
app.js:985:13) Channel was destroyed: 1547220509.77
app.js:1029:17) This was a customer
app.js:1030:17) Checking if this was a customer talking to an agent
app.js:1043:21) Customer was not talking to anyone
app.js:1126:13) 2019-01-11 10:28:29
app.js:985:13) Channel was destroyed: 1547220509.77
app.js:1029:17) This was a customer
app.js:1030:17) Checking if this was a customer talking to an agent
app.js:1043:21) Customer was not talking to anyone

I’m only registering once to the event:

ari.on('ChannelDestroyed', channelDestroyed);

Is this normal?

I’m writing like a CDR on channel destroyed so don’t want to write it multiple 
times.

Should I keep an array of channels and only write if I haven’t seen the event 
for that channel before?

Cheers,

Matt Riddell
___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev


Hello,

It may happen if several applications subscribed to the channel. In this 
case you can discriminate the events on the basis of application name.


Regards

Jean Aunis


___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
--
_
-- 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 non-root - selinux - astdb

2018-12-02 Thread Jean Aunis

Hello,

I haven't tried but this post probably gives a solution :

https://bugzilla.redhat.com/show_bug.cgi?id=1342733

Regards

Jean Aunis

Le 30/11/2018 à 19:24, Rafael dos Santos Saraiva a écrit :

Hi

I'm trying to use Asterisk running as non-root user and selinux 
enabled. Asterisk is running ok, but astdb not works. When i try to 
put in astdb, console shows this message:


WARNING[1853]: db.c:350 ast_db_put: Couldn't execute statment: SQL 
logic error or missing database


CentOS 7.5.1804
Asterisk certified/13.21-cert3

[root@sv03 asterisk]# ls -lahZ /var/lib/asterisk/astdb.sqlite3
-rw-r-. asterisk asterisk 
unconfined_u:object_r:asterisk_var_lib_t:s0 
/var/lib/asterisk/astdb.sqlite3



Can anyone help?

Thanks.




Rafael S. Saraiva

[View Rafael Saraiva's profile on LinkedIn] 
<http://br.linkedin.com/pub/rafael-saraiva/52/aab/230>



-- 
_
-- 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] incoming call label

2018-02-15 Thread Jean Aunis

Le 16/02/2018 à 05:30, the...@sys-concept.com a écrit :

On 02/15/2018 04:49 PM, Joshua Colp wrote:

On Thu, Feb 15, 2018, at 7:46 PM, the...@sys-concept.com wrote:




Thanks again for the hint.
Here is the output from asterisk.

The call is coming on Audocodes gateway from: pstn-

But asterisk display:
Found peer 'pstn-9998' for '7804715665' from 10.10.0.8:5060

Why not loolking up "pstn-" in sip.conf?

It found pstn- using 10.10.0.8:5060 - if the request always comes from the 
same IP address and port it has no other way built in to differentiate between 
the two except by matching based on username in the 'From' header.

It didn't find "pstn- using 10.10.0.8:5060"
The call came IN from PSTN line on audiocodes equipment to FXO port that
is labelled "pstn-"  so asterisk reported as such.
And I think asterisk suppose to lookup this label in sip.conf to the
registered entry but instead selected pstn-9998 entry; I don't know why.

If the call came IN on pstn-
and sip.conf has two entries:
[pstn-]
[pstn-9998]

Why it can not distinguish between the two of them correctly?

--
Thelma


If your device supports SIP authentication, you can try to turn on the 
"match_auth_username" parameter in sip.conf. It is said to be 
experimental but has always worked well for me.



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

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

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

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

Re: [asterisk-users] DTMF emulation with SIP INFO and direct media

2017-12-15 Thread Jean Aunis
Asterisk is in version 14.7.1. One end is a SIP Trunk to another 
Asterisk, the other end a home-made SIP phone. SIP INFO requests are 
coming from the other Asterisk.


Both endpoints use chan_sip with "dtmfmode" set to "info".

This is not strictly speaking a one-to-one setup since we're connecting 
to a SIP Trunk which then connects to another SIP phone, but I think it 
doesn't make much difference regarding SIP INFO handling.



Le 15/12/2017 à 12:12, Olivier a écrit :

Hello Jean,

1. Can you describe a bit further how both ends of the above call were 
both made of and configured ?

DTMF receiving is Asterisk/SIP channel but which version ?
Is the other end a SIP phone or a SIP trunk ?

2. Do you observe such behaviour in a one-to-one setup (one end emits, 
the other listen) or does the DTMF sending side also communicates with 
an other endpoint ?


Cheers

2017-12-13 12:22 GMT+01:00 Jean Aunis <jean.au...@prescom.fr 
<mailto:jean.au...@prescom.fr>>:


Hello,

I think there is an issue when DTMF are handled with SIP INFO and
direct media is enabled.

When I receive a SIP INFO, the logs tell me that a "DTMF begin" is
generated, but no related "DTMF end" is generated, unless the call
is ended. Here is an excerpt of the logs :

*--- SIP INFO received **on **SIP/xxx-0004:*

[Dec 13 11:56:16] DTMF[18193][C-0005] channel.c: DTMF end '#'
received on SIP/xxx-0004, duration 257 ms
[Dec 13 11:56:16] DTMF[18193][C-0005] channel.c: DTMF begin
emulation of '#' with duration 257 queued on SIP/xxx-0004

*--- **SIP/xxx-0004 **is hanged up:*

[Dec 13 11:56:19] VERBOSE[18193][C-0005] bridge_channel.c:
Channel SIP/xxx-0004 left 'native_rtp' basic-bridge
<4a5905ac-29f8-41c5-9981-e9d0f4966c56>
[Dec 13 11:56:19] DTMF[18193][C-0005] bridge_channel.c: DTMF
end '#' simulated to bridge 4a5905ac-29f8-41c5-9981-e9d0f4966c56
because SIP/xxx-0004 left.  Duration 3012 ms.

Do you think it is a bug ? I would tend to say yes, but I'm not so
sure.

Regards

Jean Aunis


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

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

New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started
<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
<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] DTMF emulation with SIP INFO and direct media

2017-12-13 Thread Jean Aunis

Hello,

I think there is an issue when DTMF are handled with SIP INFO and direct 
media is enabled.


When I receive a SIP INFO, the logs tell me that a "DTMF begin" is 
generated, but no related "DTMF end" is generated, unless the call is 
ended. Here is an excerpt of the logs :


*--- SIP INFO received **on **SIP/xxx-0004:*

[Dec 13 11:56:16] DTMF[18193][C-0005] channel.c: DTMF end '#' 
received on SIP/xxx-0004, duration 257 ms
[Dec 13 11:56:16] DTMF[18193][C-0005] channel.c: DTMF begin 
emulation of '#' with duration 257 queued on SIP/xxx-0004


*--- **SIP/xxx-0004 **is hanged up:*

[Dec 13 11:56:19] VERBOSE[18193][C-0005] bridge_channel.c: Channel 
SIP/xxx-0004 left 'native_rtp' basic-bridge 
<4a5905ac-29f8-41c5-9981-e9d0f4966c56>
[Dec 13 11:56:19] DTMF[18193][C-0005] bridge_channel.c: DTMF end '#' 
simulated to bridge 4a5905ac-29f8-41c5-9981-e9d0f4966c56 because 
SIP/xxx-0004 left.  Duration 3012 ms.


Do you think it is a bug ? I would tend to say yes, but I'm not so sure.

Regards

Jean Aunis

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

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

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

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

Re: [asterisk-users] How to read or write Geolocation (RFC6442) data in SIP/PJSIP messages ?

2017-12-08 Thread Jean Aunis

Hello,

As far as I know there is no way to read or write the INVITE's body, 
neither with chan_sip nor chan_pjsip.


Jean Aunis


Le 07/12/2017 à 17:35, Olivier a écrit :

Hello,

I'm having a look at section 13.1 from SIP Connect v2 doc (see [1]).
It refers to RFC6442 which gives the following example (sorry for its 
length):


INVITE sips:b...@biloxi.example.com 
<mailto:sips%3a...@biloxi.example.com> SIP/2.0
   Via: SIPS/2.0/TLS pc33.atlanta.example.com 
<http://pc33.atlanta.example.com>;branch=z9hG4bK74bf9

   Max-Forwards: 70
   To: Bob <sips:b...@biloxi.example.com 
<mailto:sips%3a...@biloxi.example.com>>
   From: Alice <sips:al...@atlanta.example.com 
<mailto:sips%3aal...@atlanta.example.com>>;tag=9fxced76sl
   Call-ID: 3848276298220188...@atlanta.example.com 
<mailto:3848276298220188...@atlanta.example.com>
   Geolocation: <cid:target123@atlanta.example.com 
<mailto:cid%3atarget...@atlanta.example.com>>

   Geolocation-Routing: no
   Accept: application/sdp, application/pidf+xml
   CSeq: 31862 INVITE
   Contact: <sips:al...@atlanta.example.com 
<mailto:sips%3aal...@atlanta.example.com>>

   Content-Type: multipart/mixed; boundary=boundary1
   Content-Length: ...

   --boundary1

   Content-Type: application/sdp

   ...Session Description Protocol (SDP) goes here

   --boundary1

   Content-Type: application/pidf+xml
   Content-ID: <target...@atlanta.example.com 
<mailto:target...@atlanta.example.com>>

   
   http://www.opengis.net/gml;
  xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
  entity="pres:al...@atlanta.example.com 
<mailto:pres%3aal...@atlanta.example.com>">

    
  
    
  
    
  32.86726 -97.16054
    
 
    
    
  false
  
  2010-11-14T20:00:00Z
  
    
    802.11
  
mac:1234567890ab
2010-11-04T20:57:29Z
    
  
   --boundary1--


1. Adding or reading the lines bellow seems easy. How can you add a 
whole application/pidf+xml section as above either using SIP or PJSIP ?
   Geolocation: <cid:target123@atlanta.example.com 
<mailto:cid%3atarget...@atlanta.example.com>>

   Geolocation-Routing: no

2. Reciprocally, how can you read such application/pidf+xml section an 
incoming call ?


3. What do you know of this RFC 6442 adoption within SIP industry ?

Best regards

[1] 
https://www.sipforum.org/download/sipconnect-technical-recommendation-version-2-0/?wpdmdl=2818





-- 
_
-- 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] Simple speech recognition for driving IVR - "press or say one".

2017-12-06 Thread Jean Aunis

Hello,

Maybe you can do this by mixing your current code with an ARI 
application. I mean :


- just before entering the speech recognition AGI, enter your ARI 
application


- in the application, subscribe to the channel's events, setup DTMF 
event handlers, and call "continueInDialpan"


- then enter the speech recognition AGI as before

Regards

Jean Aunis


Le 06/12/2017 à 15:50, Jonathan H a écrit :

Thanks Jurijs,

Yes, in fact I'm already using that, and it works fine. The problem
here is that I cannot find a way of recording speech AND listening for
a DTMF digit being pressed as an alternative.

That's where the problem lies.

J.




--
_
-- 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] Is it safe to configure SIP/Registry entries on a passive asterisk node ?

2017-11-15 Thread Jean Aunis

Le 15/11/2017 à 17:30, Olivier a écrit :

Hello,

I've seen that Asterisk stores in ASTDB entries like:
/SIP/Registry/spa3102 : 
192.168.64.207:5060 
:3600:7013:sip:spa3102@192.168.64.207:5060 



1. My understanding is that any peer that sent to Asterisk a REGISTER 
message has such entry set. So having these entries present avoid for 
a starting Asterisk the need to way for incoming REGISTER messages 
which can be as long as 30mn to come in my use case.

Is it roughly correct or am I missing something ?

2. When configuring a passive Asterisk node (waiting for an active 
node to be manually shutdown),  is it safe to copy such SIP/Registry 
entries from one node to another ?

Both active and passive nodes will get Debian's packaged Asterisk 13.14.1.

3. How is best to set such SIP/Registry entries ?
Using SQLite load command when asterisk is not running and asterisk 
-rx "database put SIP/Registry ..." when asterisk is running ?



Cheers


I did something like this in the past. We had a cluster of two nodes 
sharing a virtual IP address. The whole AstDb file was just copied from 
the active to the passive node, with a protocol like rsync or something 
similar.
It worked well. Then, is it totally safe ? We did not encounter any 
particular issue during our tests or in our production environments. 
Still, you may find theoretical edge cases which could be problematic. 
For example, copying the file is not an atomic operation, so what 
happens if Asterisk starts but the file has not been entirely copied ?
-- 
_
-- 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] Call preemption

2017-11-09 Thread Jean Aunis


The task itself sounds like a job for an AGI script to me... check 
for amount of calls, if 10, hangup one.


But how do you determine the priority of a call?


Am 07.11.2017 um 12:21 schrieb Jean Aunis:

Hello,

Has anyone already implemented some sort of call preemption in 
Asterisk ? I am trying to achieve something like this :

[...]

Does anyone have an idea ?


An AGI using AMI to do 'core show channels concise', parse the output, 
pick your victim, AMI to do 'channel request hangup x'


Note that there are 'race condition' opportunities.

Thank you for your answers. In this case the priority would be 
transmitted in the SIP signalling with the SIP "Priority" header, but in 
the future it could be determined by other means (for instance, by 
searching the caller in a list of privileged numbers).


The problem with "core show channels concise" is that it will display 
all the channels currently existing in Asterisk, whereas I want to pick 
the channel to hangup in a subset of the existing channels. For example 
: I don't care about the number of channels dedicated to "internal" 
calls, but I want to limit the number of calls to 10 for a SIP trunk A, 
and to 15 for a SIP trunk B.


I'm currently using GROUP and GROUP_COUNT to gather my channels in 
groups, which already allows me to limit the amount of calls to a given 
SIP trunk. Ideally, I would like to pick a channel to hangup in a 
particular group. But if there is a mechanism better than groups to do 
this, I'll take it.


--
_
-- 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] Call preemption

2017-11-09 Thread Jean Aunis

Le 08/11/2017 à 20:35, John Kiniston a écrit :
The easiest thing to do might be to limit the peer to 11 calls in your 
sip.conf or pjsip.conf and then use the GROUP and GROUP_COUNT 
functions to limit the extension to 10 concurrent calls, Then when you 
get call #11 who is high priority you can allow it through or 
otherwise return busy.


https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Function_GROUP

https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Function_GROUP_COUNT

On Tue, Nov 7, 2017 at 4:21 AM, Jean Aunis <jean.au...@prescom.fr 
<mailto:jean.au...@prescom.fr>> wrote:


Hello,

Has anyone already implemented some sort of call preemption in
Asterisk ? I am trying to achieve something like this :

- I want to limit the number of calls on a given SIP peer to 10

- on the other hand, some calls have higher priority than others

- when the ceiling of 10 calls is reached and a call with a high
priority is attempted, I would like to drop a call with a lower
priority to let the new one go through

Monitoring the ceiling is easy with channel groups, but it is does
not help in implementing call preemption since there is no
function to retrieve all the channels of a given group.

Does anyone have an idea ?

Regards

    Jean Aunis


Thank you for your answer. I'm already using GROUP and GROUP_COUNT to 
limit the amount of calls. The problem is that I do not want to drop the 
last incoming call, I want to drop one of the calls previously set up in 
the same group, in order to leave room to the new call. Unfortunately, 
it seems here is no function to list all the channels being part of a 
given group.
-- 
_
-- 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] Call preemption

2017-11-07 Thread Jean Aunis

Hello,

Has anyone already implemented some sort of call preemption in Asterisk 
? I am trying to achieve something like this :


- I want to limit the number of calls on a given SIP peer to 10

- on the other hand, some calls have higher priority than others

- when the ceiling of 10 calls is reached and a call with a high 
priority is attempted, I would like to drop a call with a lower priority 
to let the new one go through


Monitoring the ceiling is easy with channel groups, but it is does not 
help in implementing call preemption since there is no function to 
retrieve all the channels of a given group.


Does anyone have an idea ?

Regards

Jean Aunis


--
_
-- 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 put call on hold when receive 183 Session Progress with media address 0.0.0.0 in SDP

2017-10-06 Thread Jean Aunis
I think it is normal, the call is placed on hold as soon as the remote 
media address is null.


It makes sense because when a 183 is sent, some media is supposed to be 
sent as with a 200, so placing the call on hold when no media is 
available sounds logic.



Le 06/10/2017 à 03:56, Rafael dos Santos Saraiva a écrit :

Hi


Is it a normal behavior of Asterisk put a call on hold when receive a 
Session Progress with media address 0.0.0.0 in SDP? I believe the call 
on hold should be initiate with a re-invite.



Thanks

--
Att,
Rafael Saraiva




-- 
_
-- 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] Now to set contact username and from username idependently

2017-09-08 Thread Jean Aunis

Hello,

Maybe you can try "defaultuser". I'm not sure it will be used in the 
"Contact" header, but it will be the one used for authentication.


Regards

Jean Aunis


Le 08/09/2017 à 15:38, Benoit Panizzon a écrit :

Hello

Finally I figured out, how our SBC does matches invites to
registrations with the Contact header.

But now I run into a Problem:

How do I set the contact header of an invite different to the From
header?


INVITE sip:called-id@URI SIP/2.0
Via: SIP/2.0/UDP IP:5060;branch=z9hG4bK495c70cc
Max-Forwards: 70
From: "SBC TEST" <sip:callerID@IP>;tag=as2c330ac5
To: <sip:called_id@URI>
Contact: <sip:user-from-reg@IP:5060>

in my

[sip-provider]
type=peer
;fromuser=user-from-reg
;username=user-from-reg
secret=hidden
host=URI
outboundproxy=IP of Proxy

As soon as I set either fromuser or username, this also overwrites the
callerID and then of course the CallerID which should be sent over the
trunk is not correct anymore.

And of course because the CallerID can be different for each call (it's
a trunk) I cannot set it with CallerID= in the peer definition.

Am I missing something?

-Benoît Panizzon-



--
_
-- 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] Music on hold in ConfBridge

2017-09-07 Thread Jean Aunis

Hello,

Is there a way to play the hold music on a channel in a ConfBridge when 
all the other channels are hold ?


I'm not sure to be clear, let's describe a simple use case :

- channels A, B and C enter the same ConfBridge

- channel A is put on hold

- channel B is put on hold

- then I want to start playing the music on hold on channel C

- if channel B stops being held, I want to stop the music on hold on C

I looked at the options in confbridge.conf, but none seems to fit my 
needs. Any idea ?


Regards

Jean Aunis


--
_
-- 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] Options for bridging channels in a smart bridge

2017-07-06 Thread Jean Aunis

Le 05/07/2017 à 22:41, Joshua Colp a écrit :

On Wed, Jul 5, 2017, at 04:04 PM, Jean AUNIS wrote:




Thank you for your quick answer.

Do you think
it could make sense to add an option to the ConfBridge application for
this ? Personally I would say "not really", because many ConfBridge
features may become unusable when the bridge is in native_rtp
technology.

I don't really know. This is really the first time anyone has ever
brought it up that I've seen so it's certainly not something people are
wanting. As for the implementation ConfBridge was never designed or
written with such a thing in mind, so the repercussions of doing so are
an unknown. It may be as easy as turning the feature on and it "just
works" including knowing when features and such are enabled, or maybe
not.

I see. I will probably keep using my dialplan hack for the moment, and 
maybe I will consider patching ConfBridge or writing my own application 
in the future.


--
_
-- 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] Options for bridging channels in a smart bridge

2017-07-05 Thread Jean AUNIS
 

Le 2017-07-05 18:51, Joshua Colp a écrit : 

> On Wed, Jul 5, 2017,
at 01:45 PM, Jean Aunis wrote:
> 
>> Hello, I am struggling with a
problem which I thought would be an easy one : bridging several channels
together in a *smart* bridge. I emphasize *smart* : I want my bridge to
be a native_rtp one when only two channels are involved, and switch to
softmix technology when a third channel comes in. I thought I could use
ConfBridge for that, but it creates a bridge that is not smart (it is of
type softmix even if two channels only are involved). I can do this with
ARI of course, but handling transfers will become quite difficult : I
will receive replace_channels events, and channel optimization will not
be performed. I managed to have something working this way, but I had to
write a lot of code and some situations are very tricky to debug. The
easiest way I found was to write a piece if dialplan mixing BridgeWait,
Bridge and BridgeAdd. This works well, transfers are handled by the
Asterisk core, and the bridge is smart. Still, it requires to maintain a
list of bridged channels in order to call BridgeWait, Bridge and
BridgeAdd in the right order and with the right parameters. Can you
think of any other way (hopefully easier) to achieve this ?
> 
> Not
really, there's no cookie cutter application that behaves as you
> need
using the bridging API.

Thank you for your quick answer.

Do you think
it could make sense to add an option to the ConfBridge application for
this ? Personally I would say "not really", because many ConfBridge
features may become unusable when the bridge is in native_rtp
technology. 
 -- 
_
-- 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] Options for bridging channels in a smart bridge

2017-07-05 Thread Jean Aunis

Hello,

I am struggling with a problem which I thought would be an easy one : 
bridging several channels together in a *smart* bridge. I emphasize 
*smart* : I want my bridge to be a native_rtp one when only two channels 
are involved, and switch to softmix technology when a third channel 
comes in.


I thought I could use ConfBridge for that, but it creates a bridge that 
is not smart (it is of type softmix even if two channels only are involved).


I can do this with ARI of course, but handling transfers will become 
quite difficult : I will receive replace_channels events, and channel 
optimization will not be performed. I managed to have something working 
this way, but I had to write a lot of code and some situations are very 
tricky to debug.


The easiest way I found was to write a piece if dialplan mixing 
BridgeWait, Bridge and BridgeAdd. This works well, transfers are handled 
by the Asterisk core, and the bridge is smart. Still, it requires to 
maintain a list of bridged channels in order to call BridgeWait, Bridge 
and BridgeAdd in the right order and with the right parameters.


Can you think of any other way (hopefully easier) to achieve this ?

Regards

Jean

-- 
_
-- 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] Autodialer - call simultaneously to both ends

2017-06-26 Thread Jean Aunis

Hello,

You can certainly do this with the ARI interface but you will have to 
write some code.


You could for example originate two channels, send them to the same 
Stasis application, create a bridge and place both channels in it.


Best regards

Jean Aunis


Le 26/06/2017 à 14:06, Harel a écrit :

Hello List,
I'm working on an autodialer project.
At the moment I use the Originate application then I "throw" it to an extension 
where I Dial() the other party and then both legs are bridged. The problem is that the 
Dial() will only run after the Originate finish its bit and I have lots of wasted time or 
even worse, the remote party hanging the call because instead of a human speaking to him 
the call setup to the 2nd leg only starts when remote answers.
Is there a way to start calling both parties at the same time and bridge them 
when one answers (which will then hear the ringback tone until 2nd party 
answers)?
Thank you
Harel





--
_
-- 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] ARI events : ChannelDestroyed and ChannelHangupRequest

2017-06-20 Thread Jean Aunis

Le 12/06/2017 à 22:56, Jean Aunis a écrit :

Le 12/06/2017 à 15:46, Joshua Colp a écrit :

On Mon, Jun 12, 2017, at 05:43 AM, Jean Aunis wrote:

Hello,

I noticed that when a channel is destroyed, two different events can be
raised : ChannelDestroyed and ChannelHangupRequest. These two events
seem to be mutually exclusive : if I receive a ChannelHangupRequest, I
will never receive a ChannelDestroyed, and vice versa.



Just for information, I finally figured out the problem when trying to 
reproduce it, and I don't think it is a bug.


When a channel enters a Stasis application from the dialplan, the 
application is subscribed to this channel. But when the channel is hung 
up, Asterisk removes the channel from the application before emitting 
the ChannelDestroyed event, so the application is unsubscribed and does 
not receive this final event.


The behaviour is different for channels originated with ARI : in this 
case Asterisk will subscribe the application to the channel, so it 
receives all the events until the channel is destroyed.


I solved it by manually subscribing the application to the channel.

Jean

--
_
-- 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] ARI events : ChannelDestroyed and ChannelHangupRequest

2017-06-12 Thread Jean Aunis

Le 12/06/2017 à 15:46, Joshua Colp a écrit :

On Mon, Jun 12, 2017, at 05:43 AM, Jean Aunis wrote:

Hello,

I noticed that when a channel is destroyed, two different events can be
raised : ChannelDestroyed and ChannelHangupRequest. These two events
seem to be mutually exclusive : if I receive a ChannelHangupRequest, I
will never receive a ChannelDestroyed, and vice versa.

This behaviour does not look consistent with the documentation, which
states : "ChannelDestroyed : Notification that a channel has been
destroyed". So I would expect a ChannelDestroyed event to be raised each
time a channel is actually destroyed.

Is it a bug ?

We'd need to know the specific scenarios under which you are doing
things to know if it's a bug or not. It is reasonable to expect that
ChannelDestroyed is always present, but it depends. I'd also suggest
using the app-dev mailing list[1] in the future as its focus is more
ARI.
Thank you Joshua, I was not aware of this mailing list. I will describe 
the precise scenario as soon as I have free time.


[1] http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev



--
_
-- 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] ARI events : ChannelDestroyed and ChannelHangupRequest

2017-06-12 Thread Jean Aunis

Hello,

I noticed that when a channel is destroyed, two different events can be 
raised : ChannelDestroyed and ChannelHangupRequest. These two events 
seem to be mutually exclusive : if I receive a ChannelHangupRequest, I 
will never receive a ChannelDestroyed, and vice versa.


This behaviour does not look consistent with the documentation, which 
states : "ChannelDestroyed : Notification that a channel has been 
destroyed". So I would expect a ChannelDestroyed event to be raised each 
time a channel is actually destroyed.


Is it a bug ?

Best regards

Jean Aunis


--
_
-- 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] Commit dialplan & other config. in memory to disk?

2017-04-06 Thread Jean Aunis
You can execute something like asterisk -rx "dialplan show" > 
some_file.conf, but unfortunately the result cannot be directly parsed 
by Asterisk. Still it will give you a readable snapshot of your current 
dialplan.



Le 06/04/2017 à 11:54, Nathan Anderson a écrit :

'lo,

So yesterday, one of our clients had the misfortune of having the disk that 
their Asterisk config (*.conf) was stored on take a dirt nap.  Of course, 
Asterisk was still running at the time, and everything continued to work 
(except for voicemail, which was stored on the same disk) right up until I shut 
down Asterisk to investigate what was going on.  Because the disk was dead, 
though, I couldn't start Asterisk back up after that, and OF COURSE the backups 
were not firing off correctly so now we are faced with regenerating the config 
again (including dialplan) from scratch.

In the future, if I were to ever run into a similar situation, is there any way 
to request or instruct Asterisk to write the current dialplan that is in memory 
and other important config files (e.g., users.conf) to disk in a *different* 
location than where it originally read them from when it started up?  I could 
have saved myself a crap-ton of work if this were possible...

Thanks,

-- Nathan




--
_
-- 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] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Jean Aunis

Hello,

Did you disable selinux ? It usually causes troubles when starting 
asterisk as a service. You can do this with : setenforce 0 (this will 
not totally disable selinux, but switch it to a permissive mode).


For your second point, maybe you should check that firewalld is either 
stopped or configured properly. By default it has  quite restrictive rules.


Best regards

Jean Aunis


Le 14/03/2017 à 17:45, Dan Cropp a écrit :


Some background information.

I have used Debian with Asterisk for several years.  Have encountered 
zero problems.


I am now trying to setup an Asterisk on a CentOS7 box using VMWare 
Workstation.  I am brand new to CentOS and RHEL so I may be missing 
something obvious.


I am installing CentOS Minimal Install and Asterisk from Source.  (I 
have installed Asterisk from Source on Debian hundreds of times 
without any problems).


After installing CentOS (only root user), I update CentOS.  I then 
install the CentOS “Development Tools”.


Also install, I install net-tools and wget.

After that, I am following the Wiki pages for Asterisk from Source.

https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source

Retrieve the asterisk-13-current.tar.gz and the pjproject-2.6.tar.bz2

I uncompress them, run the asterisk install_prereq script to install 
all required packages.


I configure PJPROJECT, make dep, make, make install, and ldconfig

After that, I install asterisk

./configure

make menuselect

make

make install

make samples

make progdocs

make config

After that, I modify the asterisk conf files for a couple pjsip 
endpoints and turn on debugging and verbosity.  Copying settings from 
another box which is working.


I am seeing two different issues….

First, when I restart the box, the asterisk process is present.  
However, it’s not writing anything to the log files so it seems to be 
stuck.  Any idea why running Asterisk as a service after the make 
config would not seem to fully start up?


Second, I stop the asterisk service.  Make sure asterisk process is 
not present.  Then, I start it up manually going to the console.  
Everything is running.  I see information written to the asterisk log 
files.  However, I try to connect phones to this and it does not 
work.  I used tcpdump to verify the SIP packets are making it to the 
CentOS box, however Asterisk is not seeing the SIP messages.


I run netstat -apn | grep -i asterisk and see Asterisk udp with port 5060.

The one thing I notice is my Debian installations have always been 
eth0.  CentOS is using the newer ens33.  Might this cause a proble?


Any suggestions?

Have a great day!

Dan





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

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

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

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

Re: [asterisk-users] Trying to get SMS from GXV3240 to trigger dialplan code.

2017-03-09 Thread Jean Aunis
This is not a SIP NOTIFY but a SIP MESSAGE (the first line in the logs 
is not related to the few next ones).


If you are using chan_sip, you have to activate out of call messages in 
sip.conf :


accept_outofcall_message=yes
outofcall_message_context=messages

Then in extensions.conf, define a context "messages" with the 
appropriate extensions (to stick to your example, it will be 
16162995607) and use the function MESSAGE to retrieve the SMS content.


Best regards

Jean Aunis


Le 10/03/2017 à 00:21, Bryant Zimmerman a écrit :

I am trying to send SMS from my grandstream GXV3240
Asterisk receives the message in a NOTIFY block.
How can I get asterisk to run dialplan code when receiving these 
Notify SMS Message Blocks.

I can then route them to my SMS provider.
Any ideas are appreciated. Below is debug of a message sent from the 
phone when received no dialplan code is triggered.
I am wounding if I need to modify some setting in sip.conf or the peer 
config.  Incomming SMS from my vendor works without issue and is 
transmitted to the phone.


<->
--- (10 headers 0 lines) ---
Really destroying SIP dialog 
'3927411c7fe967886df6c8d0410d4...@xxx.xxx.xxx.xxx:5060' 
<mailto:%273927411c7fe967886df6c8d0410d4e96@65.183.176.184:5060%27> 
Method: NOTIFY


<--- SIP read from UDP:XXX.XXX.XXX.XXX:57568 --->
MESSAGE sip:16162995...@vgw0005.granddial.net SIP/2.0
Via: SIP/2.0/UDP 192.168.201.104:20093;branch=z9hG4bK1738682353;rport
From: <sip:6167761066.2...@vgw0005.granddial.net>;tag=1683585926
To: <sip:16162995...@vgw0005.granddial.net>
Call-ID: 1662412698-20093-...@bjc.bgi.cab.bae 
<mailto:1662412698-20093-...@bjc.bgi.cab.bae>

CSeq: 9430 MESSAGE
Contact: <sip:6167761066.2003@192.168.201.104:20093>
Max-Forwards: 70
User-Agent: Grandstream GXV3240 1.0.3.158
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, 
REFER, UPDATE, MESSAGE

Content-Type: text/plain; charset=UTF-8
Content-Length: 5

Test Message SMS
<->


Thanks

Bryant




-- 
_
-- 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] pcapsipdump or general sip debug question

2017-01-17 Thread Jean Aunis

Hello,

There is a built-in tool in Wireshark for this : menu Telephony => Voip 
Calls, the select your call and click on "Flow Sequence".


Best regards

Jean Aunis


Le 17/01/2017 à 12:27, Yves a écrit :

Hi,

I am using pcapsipdump for debugging sip calls.

when I have to debug a call, pcapsipdump generates two files per 
call... one for the sip dialog between the client (softphone) and the 
server (asterisk) and one
for the sip dialog between the server (asterisk) and the sip 
registrar... is there a way to get this into one file ? the objective 
is to see both sides of the call in
a single ladder diagram or just to have more comfort in analyzing the 
full flow within wireshark.


If this is not possible, is there a free tool for sip (together with 
rtp) debugging that is able to catch the full sip flow between both 
ends of one call in a single file

(per call) with pcap compatibility (including the rtp packets)?

thank you
yves





--
_
-- 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 installation script on CentOS7 with systemd [SOLVED]

2016-12-19 Thread Jean Aunis

Le 19/12/2016 à 17:10, Olivier a écrit :



2016-12-19 16:11 GMT+01:00 Jean Aunis <jean.au...@prescom.fr 
<mailto:jean.au...@prescom.fr>>:


Le 19/12/2016 à 15:54, Olivier a écrit :



Running systemctl start asterisk fails with :
Dec 19 15:43:08 foobar systemd: PID file
/var/run/asterisk/asterisk.pid not readable (yet?) after start.
Dec 19 15:43:09 foobar systemd: asterisk.service: main process
exited, code=exited, status=1/FAILURE
Dec 19 15:43:09 foobar asterisk: Unable to connect to remote
asterisk (does /var/run/asterisk/asterisk.ctl exist?)
Dec 19 15:43:09 foobar systemd: asterisk.service: control process
exited, code=exited status=1
Dec 19 15:43:09 foobar systemd: Unit asterisk.service entered
failed state.
Dec 19 15:43:09 foobar systemd: asterisk.service failed.


But /usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C
/etc/asterisk/asterisk.conf succeeds:
# rasterisk
Asterisk 13.13.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
...
=
Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 13.13.1 currently running on ...

Any hint or help on how to debug this ?
(I tried with and without any /run/asterisk directory owned by
asterisk.asterisk)


Best regards




Hello,

Make sure that selinux is disabled, or in "permissive" mode.
Otherwise it will prevent asterisk from starting.


Thanks for the tip:
changing to permissive mode made it !

Using methods suggested in [1], do you think its possible and worth 
the effort to configure SELinux to work with Asterisk/Systemd in 
Enforcing mode ?

A quick look in various tuto all disable SELinux.



[1] https://wiki.centos.org/HowTos/SELinux



I never spent time to figure out how selinux should be configured for 
Asterisk, but it is certainly possible to do something clean about that. 
I noticed that, when I install Asterisk with a custom-made RPM package, 
SELinux will stop blocking it. I guess RPM has some magic embedded into 
it to configure SELinux with the proper rules.


Still, is it worth the effort ? Probably not if you consider Asterisk 
alone : as it is running with the unprivileged user asterisk, the 
standard Linux permissions will protect your system if Asterisk is attacked.
But considering your system as a whole, disabling selinux may not be a 
good idea : other processes may required to be secured with the selinux 
stuff.


I'm not an IT security expert, so please consider what I wrote above 
with caution.
-- 
_
-- 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 installation script on CentOS7 with systemd

2016-12-19 Thread Jean Aunis

Le 19/12/2016 à 15:54, Olivier a écrit :

Hello,

For a new project, I'm adapting existing installation script to CentOS 7.
I must admit I don't understand how to adapt things to systemd.

Here are my questions:

1. I don't see any systemd sub-directory in asterisk-13.13.1/contrib.
Do you think such directory and matching Makefile target could be useful ?

2. Should /run/asterisk directory creation be left to systemd or done 
by installation script before running "systemctl start asterisk"  ?


3. I edited the following /etc/systemd/system:asterisk.service file:
[Unit]
Description=Asterisk PBX and telephony daemon.
After=network.target

[Service]
Type=forking
PIDFile=/var/run/asterisk/asterisk.pid
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
ExecStart=/usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C 
/etc/asterisk/asterisk.conf

#ExecStart=/usr/sbin/asterisk -vvvgF -C /etc/asterisk/asterisk.conf
ExecStop=/usr/sbin/asterisk -rx 'core stop now'
ExecReload=/usr/sbin/asterisk -rx 'core reload'


[Install]
WantedBy=multi-user.target

Running systemctl start asterisk fails with :
Dec 19 15:43:08 foobar systemd: PID file 
/var/run/asterisk/asterisk.pid not readable (yet?) after start.
Dec 19 15:43:09 foobar systemd: asterisk.service: main process exited, 
code=exited, status=1/FAILURE
Dec 19 15:43:09 foobar asterisk: Unable to connect to remote asterisk 
(does /var/run/asterisk/asterisk.ctl exist?)
Dec 19 15:43:09 foobar systemd: asterisk.service: control process 
exited, code=exited status=1
Dec 19 15:43:09 foobar systemd: Unit asterisk.service entered failed 
state.

Dec 19 15:43:09 foobar systemd: asterisk.service failed.


But /usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C 
/etc/asterisk/asterisk.conf succeeds:

# rasterisk
Asterisk 13.13.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
...
=
Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 13.13.1 currently running on ...

Any hint or help on how to debug this ?
(I tried with and without any /run/asterisk directory owned by 
asterisk.asterisk)



Best regards




Hello,

Make sure that selinux is disabled, or in "permissive" mode. Otherwise 
it will prevent asterisk from starting.


Best regards

Jean Aunis

-- 
_
-- 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] 183 Session in Progress. Disconnecting channel for lack of RTP activity

2016-12-19 Thread Jean Aunis
This means the remote end was not sending any audio stream, or the audio 
stream was not received by Asterisk. The problem may have many different 
reasons, but often it is a network-related issue.



Le 16/12/2016 à 21:19, Dmitriy Serov a écrit :

Today I faced a problem. Please help to solve this problem.

Asterisk 13.7 (chan_pjsip) & Zyxel Keenetic Plus DECT, firmware 
v2.06(AAGJ.9)C1


Outbound call from Zyxel Keenetic (pjsip endpoint) to PSTN (pjsip trunk).
Call using early media (183 Session in progress) and rtp_timeout=10.
After 10 seconds: [2016-12-16 13:53:15] NOTICE[6654] 
res_pjsip_sdp_rtp.c: Disconnecting channel 'PJSIP/xxx-027b' for 
lack of RTP activity in 10 seconds


SIP dump is attached.

According to [1] before called user agent send OK or ACK there is one 
way SDP.
In sip dump (attached) i didn't find such SIP packets. Whether that 
call was canceled due to RTP inactivity?


Any help is welcome.

[1] https://www.ietf.org/proceedings/46/I-D/draft-ietf-sip-183-00.txt





-- 
_
-- 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] _FAX_. extension refuses to work !

2016-11-30 Thread Jean Aunis

Hello,

The letter "X" is reserved for dialplan patterns. You should escape it 
this way :


_FA[X]_

Best regards

Jean Aunis


Le 30/11/2016 à 11:45, Michele Pinassi a écrit :


Hi all,

my dialplan is:

/; 
==//

//; FROM VOIP//
//; 
==//

//
//[from-voip]//
//include => default//
//
//[default]
/

/; FAXes//
//exten => _FAX_.,1,Noop("from-voip: FAX ${CALLERID(num)} ${EXTEN}")//
//exten => _FAX_.,n,Set(DID=${EXTEN:4})//
//exten => _FAX_.,n,Goto(fax-services,s,1)/

but on a call directed to, es. FAX_3700 i got:

[Nov 30 11:38:30] NOTICE[5462][C-0027]: chan_sip.c:26309 
handle_request_invite: Call from 'voip-trunk' (xxx:5060) to extension 
'FAX_3700' rejected because extension not found in context 'from-voip'.
[Nov 30 11:38:30] NOTICE[5462][C-0027]: chan_sip.c:26309 
handle_request_invite: Call from 'voip-trunk' (xxx:5060) to extension 
'FAX_3700' rejected because extension not found in context 'from-voip'.


Other extension like _IVR_ or _VMR_ works perfeclty and are defined in 
the same manner.


Maybe _FAX was a reserved keyword ?

Michele

--
Michele Pinassi
Responsabile Telefonia di Ateneo
Servizio Reti, Sistemi e Sicurezza Informatica - Università degli Studi di Siena
tel: 0577.(23)5000 -central...@unisi.it

Per trovare una soluzione rapida ai tuoi problemi tecnici consulta le FAQ di Ateneo,http://www.faq.unisi.it  





-- 
_
-- 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] Match one OR two digit extension not working as expected without using "dangerous" _. pattern (Ast 14)

2016-10-13 Thread Jean Aunis

You can use the "!" character :

exten => _X!,1,SayNumber(${EXTEN})


Best regards

Jean Aunis

Le 13/10/2016 à 12:54, Jonathan H a écrit :

Back to basics here. I want to match on one OR two digits.

The following two both work, but ONLY for more than one digit, which
is not as expected from the docs (see below).

exten => _X.,1,SayNumber(${EXTEN})
exten => _[0-9].,1,SayNumber(${EXTEN})


This next one will ONLY match 2 digits, as expected, but the first two
SHOULD match one or more, right?

exten => _XX,1,SayNumber(${EXTEN})

The following pattern works, but I thought it was "dangerous" and to
be discouraged?
exten => _.,1,SayNumber(${EXTEN})

So, again, if someone dials 1 and a one second delay passes, I want it to say 1.
If someone dials 1 then another 1 within a second then I want it to be
11, and 111 should be invalid.

(I've Set(TIMEOUT(digit)=1) )

Yes, I can do this with multiple lines, but the docs suggest this
should be easily do-able in 1 line, and I don't want to double the
amount of dialplan (there'll be a few of these!).

Here are my references:

---

https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching

The letter X or x represents a single digit from 0 to 9.
The period character (.) at the end of a pattern matches one or more
remaining characters. You put it at the end of a pattern when you want
to match extensions of an indeterminate length.

---

Page 141 of the Asterisk Definitive Guide 4th Edition:

. (period)
Wildcard match; matches one or more characters, no matter what they are.
If you’re not careful, wildcard matches can make your dialplans do
things you’re not expecting (like matching built-in extensions such
as i or h). You should use the wildcard match in a pattern only after
you’ve matched as many other digits as possible. For example, the
following pattern match should probably never be used:
_.
In fact, Asterisk will warn you if you try to use it. Instead, if you
really need a catchall pattern match, use this one to match all strings
that start with a digit followed by one or more characters (see ! if
you want to be able to match on zero or more characters):
_X.
Or this one, to match any alphanumeric string:
_[0-9a-zA-Z].

---

http://www.voip-info.org/wiki/view/Asterisk+Dialplan+Patterns
Do not use a pattern of _. as this will match everything including
Asterisk special extensions like i, t, h, etc. Instead use something
like _X. or _X which will not match __special__ extensions..
So what do you use instead of _. ? Many examples use this construct,
but if you use it you may see a warning message in the log advising
you to change _. to _X.

---




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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
 http://www.asterisk.org/community/astricon-user-conference

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

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

Re: [asterisk-users] Dial and start music on hold after timeout

2016-08-24 Thread Jean Aunis
Using Progress didn't solve the problem. If I cannot find another way, I 
will use your solution of recording the ring tone.



Le 23/08/2016 à 20:53, Israel Gottlieb a écrit :


Maybe try progress() instead of answer ()


בתאריך 23 באוג׳ 2016 7:19 PM,‏ "Jean Aunis" <jean.au...@prescom.fr 
<mailto:jean.au...@prescom.fr>> כתב:


Thank you, I just tried your suggestion. Strangely, the
announcement is played only if I try to dial a SIP peer which is
not available (not registered to be more precise). If the SIP peer
is available, I only get the ring tone, and never hear the
announcement. Here is the dialplan (I had to add an Answer()
before the Dial, otherwise the announcement is never played, even
in the first case) :

exten = 007,1,Answer()
same  = n,Dial(SIP/foo/s@playme,40)

[playme]
exten = s,1,Ringing()
same  = n,Wait(10)
same  = n,Playback(/var/lib/asterisk/sounddir/announce,noanswer)

When it is working, I can see the following output in the CLI,
which is not there otherwise :
-- SIP/x requested media update control 26, passing it to
Local/s@playme-05be;1

Otherwise, no error message, Asterisk tells he is playing the
announcement but I don't hear it.

Best regards

Jean Aunis



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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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

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

Re: [asterisk-users] Dial and start music on hold after timeout

2016-08-23 Thread Jean Aunis
Thank you, I just tried your suggestion. Strangely, the announcement is 
played only if I try to dial a SIP peer which is not available (not 
registered to be more precise). If the SIP peer is available, I only get 
the ring tone, and never hear the announcement. Here is the dialplan (I 
had to add an Answer() before the Dial, otherwise the announcement is 
never played, even in the first case) :


exten = 007,1,Answer()
same  = n,Dial(SIP/foo/s@playme,40)

[playme]
exten = s,1,Ringing()
same  = n,Wait(10)
same  = n,Playback(/var/lib/asterisk/sounddir/announce,noanswer)

When it is working, I can see the following output in the CLI, which is 
not there otherwise :
-- SIP/x requested media update control 26, passing it to 
Local/s@playme-05be;1


Otherwise, no error message, Asterisk tells he is playing the 
announcement but I don't hear it.


Best regards

Jean Aunis

Le 23/08/2016 à 16:07, David Duffett a écrit :

How about:

exten => s,1,Dial(SIP/alice/555@delayed-announce,40)

[delayed-announce]
exten =>  555,1,Wait(20)
same => n,Playback(myannouncement,noanswer)
same => n,NoOP(Whatever else you want to do goes here)

The 'noanswer' option on the Playback means that SIP/alice should 
continue to ring for the remaining 20 of the 40 seconds, as the 
Playback will not answer (terminate) the call.


Don't forget AstriCon this year - www.astricon.net 
<http://www.astricon.net>


On 23 August 2016 at 12:52, Israel Gottlieb <isr...@gmail.com 
<mailto:isr...@gmail.com>> wrote:


You could m and make a moh file that has ringing the first 30 sec
and then the anouncment


בתאריך 22 באוג׳ 2016 7:19 PM,‏ "Jean Aunis" <jean.au...@prescom.fr
<mailto:jean.au...@prescom.fr>> כתב:

Thank you for the idea. The problem with RetryDial, is that it
will cancel the first call, play the announce and then dial
the SIP peer once again, so the telephone will display a
missed call. I would prefer to do everything in a single call.


Le 22/08/2016 à 17:57, John Kiniston a écrit :

You could try using RetryDial() instead of Dial, It supports
playing an announcement.


On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis
<jean.au...@prescom.fr <mailto:jean.au...@prescom.fr>> wrote:

Sorry, I forgot to write that the SIP peer must keep
ringing while the announcement is being played.


Le 22/08/2016 à 17:42, John Kiniston a écrit :

This seems like the obvious answer but maybe I'm
misunderstanding the question.

exten => s,1,Dial(SIP/alice,20)
 same => n,Playback(myannouncement)
 same =>   n,NoOP(Whatever else you want to do goes here)

On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis
<jean.au...@prescom.fr <mailto:jean.au...@prescom.fr>>
wrote:

Hello,

I am searching a way to dial a SIP peer, and if it
does not answer within 20 seconds, play an
announcement to the caller. This means that the
caller would hear a ring tone for 20 seconds, and
only then hear the announcement if the callee did
not answer.

I know it is possible to do this with ARI, but in
this particular case I do not want to use ARI. I
would like to do this purely with dialplan and AGI
scripts, but I cannot find a way. I have read about
the "m" option of Dial application, but it starts
the announcement immediately, whereas I would like
to start it after 20 seconds of timeout.

    Does anybody have an idea ?

Best regards,

Jean Aunis


-- 
_

-- Bandwidth and Colocation Provided by
http://www.api-digital.com --
New to Asterisk? Join us for a live introductory
webinar every Thurs:
http://www.asterisk.org/hello

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




-- 
A human being should be able to change a diaper, plan an

invasion, butcher a hog, conn a ship, design a building,
write a sonnet, balance accounts, build a wall, set a
bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty
meal,

Re: [asterisk-users] Dial and start music on hold after timeout

2016-08-22 Thread Jean Aunis
Thank you for the idea. The problem with RetryDial, is that it will 
cancel the first call, play the announce and then dial the SIP peer once 
again, so the telephone will display a missed call. I would prefer to do 
everything in a single call.



Le 22/08/2016 à 17:57, John Kiniston a écrit :
You could try using RetryDial() instead of Dial, It supports playing 
an announcement.



On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis <jean.au...@prescom.fr 
<mailto:jean.au...@prescom.fr>> wrote:


Sorry, I forgot to write that the SIP peer must keep ringing while
the announcement is being played.


Le 22/08/2016 à 17:42, John Kiniston a écrit :

This seems like the obvious answer but maybe I'm misunderstanding
the question.

exten => s,1,Dial(SIP/alice,20)
 same =>   n,Playback(myannouncement)
 same =>   n,NoOP(Whatever else you want to do goes here)

On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis
<jean.au...@prescom.fr <mailto:jean.au...@prescom.fr>> wrote:

Hello,

I am searching a way to dial a SIP peer, and if it does not
answer within 20 seconds, play an announcement to the caller.
This means that the caller would hear a ring tone for 20
seconds, and only then hear the announcement if the callee
did not answer.

I know it is possible to do this with ARI, but in this
particular case I do not want to use ARI. I would like to do
this purely with dialplan and AGI scripts, but I cannot find
a way. I have read about the "m" option of Dial application,
but it starts the announcement immediately, whereas I would
like to start it after 20 seconds of timeout.

Does anybody have an idea ?

Best regards,

Jean Aunis


-- 
_

-- Bandwidth and Colocation Provided by
http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar
every Thurs:
http://www.asterisk.org/hello

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




-- 
A human being should be able to change a diaper, plan an

invasion, butcher a hog, conn a ship, design a building, write a
sonnet, balance accounts, build a wall, set a bone, comfort the
dying, take orders, give orders, cooperate, act alone, solve
equations, analyze a new problem, pitch manure, program a
computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein





--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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




--
A human being should be able to change a diaper, plan an invasion, 
butcher a hog, conn a ship, design a building, write a sonnet, balance 
accounts, build a wall, set a bone, comfort the dying, take orders, 
give orders, cooperate, act alone, solve equations, analyze a new 
problem, pitch manure, program a computer, cook a tasty meal, fight 
efficiently, die gallantly. Specialization is for insects.

---Heinlein




-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Dial and start music on hold after timeout

2016-08-22 Thread Jean Aunis
Sorry, I forgot to write that the SIP peer must keep ringing while the 
announcement is being played.



Le 22/08/2016 à 17:42, John Kiniston a écrit :
This seems like the obvious answer but maybe I'm misunderstanding the 
question.


exten => s,1,Dial(SIP/alice,20)
 same =>   n,Playback(myannouncement)
 same =>   n,NoOP(Whatever else you want to do goes here)

On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis <jean.au...@prescom.fr 
<mailto:jean.au...@prescom.fr>> wrote:


Hello,

I am searching a way to dial a SIP peer, and if it does not answer
within 20 seconds, play an announcement to the caller. This means
that the caller would hear a ring tone for 20 seconds, and only
then hear the announcement if the callee did not answer.

I know it is possible to do this with ARI, but in this particular
case I do not want to use ARI. I would like to do this purely with
dialplan and AGI scripts, but I cannot find a way. I have read
about the "m" option of Dial application, but it starts the
announcement immediately, whereas I would like to start it after
20 seconds of timeout.

Does anybody have an idea ?

    Best regards,

Jean Aunis


-- 
_

-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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




--
A human being should be able to change a diaper, plan an invasion, 
butcher a hog, conn a ship, design a building, write a sonnet, balance 
accounts, build a wall, set a bone, comfort the dying, take orders, 
give orders, cooperate, act alone, solve equations, analyze a new 
problem, pitch manure, program a computer, cook a tasty meal, fight 
efficiently, die gallantly. Specialization is for insects.

---Heinlein




-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Dial and start music on hold after timeout

2016-08-22 Thread Jean Aunis

Hello,

I am searching a way to dial a SIP peer, and if it does not answer 
within 20 seconds, play an announcement to the caller. This means that 
the caller would hear a ring tone for 20 seconds, and only then hear the 
announcement if the callee did not answer.


I know it is possible to do this with ARI, but in this particular case I 
do not want to use ARI. I would like to do this purely with dialplan and 
AGI scripts, but I cannot find a way. I have read about the "m" option 
of Dial application, but it starts the announcement immediately, whereas 
I would like to start it after 20 seconds of timeout.


Does anybody have an idea ?

Best regards,

Jean Aunis


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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