Re: [asterisk-users] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/

2012-09-28 Thread A J Stiles
On Friday 28 September 2012, Patrick Archibald wrote:
 Hi,
 
 Is there a way to move 100 .call files in to
 /var/spool/asterisk/outgoing/ at once and have Asterisk call at
 maximum 10 at a time?

Yes:  Move them in batches of 10.  Could be as simple as
last if ++$n_files  9;
if the script is in Perl.

You know how many calls you can deal with at once; it's up to you to stay 
within your own limits.  Asterisk just tries its damnedest to do whatever it's 
been told, without imposing any sort of judgement as to whether it's sane or 
wholesome.


-- 
AJS

Answers come *after* questions.

--
_
-- 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] Disconnect calls : known reasons

2012-09-28 Thread Jonas Kellens

Hello,

are there any known reasons why Asterisk would disconnect random calls ?


My server uses 1,5 GB out of 8 GB RAM
My server uses up to 35% CPU at peak
There are about 40 concurrent calls.
I have 300 RTP-ports available.

I just see the call ending, as if one of the connected parties hung up 
but that is not the case !


So what could be a bottleneck ? Any known reasons for random hangup ?




Kind regards,
Jonas.
--
_
-- 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] Disconnect calls : known reasons

2012-09-28 Thread Administrator TOOTAI

Le 28/09/2012 10:22, Jonas Kellens a écrit :

Hello,


Hi



are there any known reasons why Asterisk would disconnect random calls ?


My server uses 1,5 GB out of 8 GB RAM
My server uses up to 35% CPU at peak
There are about 40 concurrent calls.
I have 300 RTP-ports available.

I just see the call ending, as if one of the connected parties hung up 
but that is not the case !


So what could be a bottleneck ? Any known reasons for random hangup ?


Check that those calls are not sended to phones which are already 
online, doesn't accept further calls, and your dialplan don't manage 
this situation


--
Daniel

--
_
-- 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] RealTime table fields ordering

2012-09-28 Thread Vieri
Hi,

According to http://www.voip-info.org/wiki/view/Asterisk+RealTime+Sip:

Quote:
If you place ipaddr before host (in the case of dynamic), you will never 
load the public IP address of your sip device, as it will be overwritten when 
host is encountered. 
UnQuote.

From the latest Asterisk source tarball, the 'contrib' directory contains 
several realtime MySQL table definitions.
The sippeers table has column 'ipaddr' before column 'host'. Also, 'permit' 
comes before 'deny'. Same for allow/disallow.
Shouldn't the correct RealTime column/field order be: deny, permit and 
disallow, allow and host, ipaddr?

As a side note, the iaxfriends RealTime MySQL table definition in the 'contrib' 
directory lacks the deny/permit fields which are quite important.
However, the iaxfriends table does have the 'ipaddr' field after the 'host' 
field and the 'allow' field after 'disallow'.

Furthermore, the asterisk.org wiki at:
https://wiki.asterisk.org/wiki/display/AST/SIP+Realtime%2C+MySQL+table+structure
shows the same disorder in deny/permit, allow/disallow and host/ipaddr (MySQL 
example for RealTime).

So it seems that the contrib directory and the asterisk.org wiki are 
inconsistent and incomplete.
Of course I understand that these are 'contributed' files but they should be 
proof-read by the Digium devs before packing them up into the official source 
tarball. Or am I wrong about my observations concerning field order and field 
omissions?

Thanks,

Vieri


--
_
-- 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] Disconnect calls : known reasons

2012-09-28 Thread Jonas Kellens

On 28-09-12 10:31, Administrator TOOTAI wrote:

Le 28/09/2012 10:22, Jonas Kellens a écrit :

Hello,


Hi



are there any known reasons why Asterisk would disconnect random calls ?


My server uses 1,5 GB out of 8 GB RAM
My server uses up to 35% CPU at peak
There are about 40 concurrent calls.
I have 300 RTP-ports available.

I just see the call ending, as if one of the connected parties hung 
up but that is not the case !


So what could be a bottleneck ? Any known reasons for random hangup ?


Check that those calls are not sended to phones which are already 
online, doesn't accept further calls, and your dialplan don't manage 
this situation




Maybe I need to explain a bit further : the call is send to the IP-phone 
and answered. The call lasts for about 1 à 2 minutes and is then 
disconnected.


Sometimes this happens after about 1 minute, sometimes after about 2 
minutes, sometimes it does not happen at all for a whole day or week !


If I say random, I really mean random.
I'd love to believe that there is some kind of bottleneck or level that 
is reached when this happens, but nothing points to that direction.




Kind regards,
Jonas.

--
_
-- 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] RealTime table fields ordering

2012-09-28 Thread Hans Witvliet
On Fri, 2012-09-28 at 01:33 -0700, Vieri wrote:
 Hi,
 
 According to http://www.voip-info.org/wiki/view/Asterisk+RealTime+Sip:

[snip]

 So it seems that the contrib directory and the asterisk.org wiki are 
 inconsistent and incomplete.
 Of course I understand that these are 'contributed' files but they should be 
 proof-read by the Digium devs before packing them up into the official source 
 tarball. Or am I wrong about my observations concerning field order and field 
 omissions?
 
 Thanks,
 
 Vieri
 

how about the line:
 `ipaddr` varchar(15) DEFAULT NULL,

Wonder how they try to squeeze an IPv6 address in it...
should be:
 `ipaddr` varchar(50) DEFAULT NULL,


hans

--
_
-- 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] Disconnect calls : known reasons

2012-09-28 Thread Administrator TOOTAI

Le 28/09/2012 10:40, Jonas Kellens a écrit :

[...]
are there any known reasons why Asterisk would disconnect random 
calls ?



My server uses 1,5 GB out of 8 GB RAM
My server uses up to 35% CPU at peak
There are about 40 concurrent calls.
I have 300 RTP-ports available.

I just see the call ending, as if one of the connected parties hung 
up but that is not the case !


So what could be a bottleneck ? Any known reasons for random hangup ?


Check that those calls are not sended to phones which are already 
online, doesn't accept further calls, and your dialplan don't manage 
this situation





Maybe I need to explain a bit further : the call is send to the 
IP-phone and answered. The call lasts for about 1 à 2 minutes and is 
then disconnected.


Sometimes this happens after about 1 minute, sometimes after about 2 
minutes, sometimes it does not happen at all for a whole day or week !


If I say random, I really mean random.
I'd love to believe that there is some kind of bottleneck or level 
that is reached when this happens, but nothing points to that direction.


We had this problem with some PSTN call termination providers, sometimes 
only against some destination.  I don't know if your incoming calls are 
100% VOIP, I would start to see with providers.


You may also check hangupcause and dialstatus variables.

--
Daniel

--
_
-- 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] Disconnect calls : known reasons

2012-09-28 Thread Jonas Kellens

On 28-09-12 10:57, Administrator TOOTAI wrote:

Le 28/09/2012 10:40, Jonas Kellens a écrit :

[...]
are there any known reasons why Asterisk would disconnect random 
calls ?



My server uses 1,5 GB out of 8 GB RAM
My server uses up to 35% CPU at peak
There are about 40 concurrent calls.
I have 300 RTP-ports available.

I just see the call ending, as if one of the connected parties hung 
up but that is not the case !


So what could be a bottleneck ? Any known reasons for random hangup ?


Check that those calls are not sended to phones which are already 
online, doesn't accept further calls, and your dialplan don't manage 
this situation





Maybe I need to explain a bit further : the call is send to the 
IP-phone and answered. The call lasts for about 1 à 2 minutes and is 
then disconnected.


Sometimes this happens after about 1 minute, sometimes after about 2 
minutes, sometimes it does not happen at all for a whole day or week !


If I say random, I really mean random.
I'd love to believe that there is some kind of bottleneck or level 
that is reached when this happens, but nothing points to that direction.


We had this problem with some PSTN call termination providers, 
sometimes only against some destination.  I don't know if your 
incoming calls are 100% VOIP, I would start to see with providers.


You may also check hangupcause and dialstatus variables.



Pure SIP.

Hangupcause 16

Dialstatus Answer

It has nothing to do with the provider-side.



Kind regards.
Jonas.



--
_
-- 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] RealTime table fields ordering

2012-09-28 Thread Vieri


--- On Fri, 9/28/12, Hans Witvliet aster...@a-domani.nl wrote:

 how about the line:
      `ipaddr` varchar(15) DEFAULT NULL,
 
 Wonder how they try to squeeze an IPv6 address in it...
 should be:
      `ipaddr` varchar(50) DEFAULT NULL,

I think
 `ipaddr` varchar(45) DEFAULT NULL,
should be enough.

Vieri


--
_
-- 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] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Markus

Hi list!

ConfBridge dtmf_passthrough=no doesn't seem to have any effect. DTMF 
gets transmitted throughout the conference. I've tried Asterisk 10.7.1 
from the official RPMs and 10.8.0 compiled from source.


I've confirmed that it's disabled via the CLI confbridge show profile 
user profilename.


It's an all-SIP scenario with RFC2833 as the DTMF protocol.

Is this a known bug?

Thank you!
Markus


--
_
-- 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] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Leif Madsen

On 28/09/12 06:50 AM, Markus wrote:

Hi list!

ConfBridge dtmf_passthrough=no doesn't seem to have any effect. DTMF
gets transmitted throughout the conference. I've tried Asterisk 10.7.1
from the official RPMs and 10.8.0 compiled from source.

I've confirmed that it's disabled via the CLI confbridge show profile
user profilename.

It's an all-SIP scenario with RFC2833 as the DTMF protocol.

Is this a known bug?


Searching the issue tracker (hint, hint) does not return any 
dtmf_passthrough issues other than this one[0], which doesn't look to be 
related.


Is another channel connected to the conference receiving the DTMF? Is 
that what you're intending? Because from my understand that is the 
intention, and not simply to limit the DTMF from being in the conference 
in the first place. At least that is almost how it reads in your message.


[0] https://issues.asterisk.org/jira/browse/ASTERISK-20150

--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- 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] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/

2012-09-28 Thread Leif Madsen

On 27/09/12 09:01 PM, Patrick Archibald wrote:

Is there a way to move 100 .call files in to
/var/spool/asterisk/outgoing/ at once and have Asterisk call at
maximum 10 at a time?

snip

I can certainly write a program to limit the number of simultaneous
outgoing calls but before I do that I thought I would ask if there is
another solution.


Generally the preferred method when you're doing this programatically 
anyways is to use an external script through the Asterisk Manager 
Interface to generate your calls.


Luckily, Russell Bryant has recently create an amioriginate.py[0] script 
which he's using as an example in the upcoming Asterisk: The Definitive 
Guide 4e book.


[0] https://github.com/russellb/amiutils


--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- 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] RealTime table fields ordering

2012-09-28 Thread Leif Madsen

On 28/09/12 04:33 AM, Vieri wrote:

So it seems that the contrib directory and the asterisk.org wiki are 
inconsistent and incomplete.
Of course I understand that these are 'contributed' files but they should be 
proof-read by the Digium devs before packing them up into the official source 
tarball. snip


That of course also implies contributions to review the files prior to 
release (which have release candidates). That directory contains data 
that was at one point contributed, and should really be reviewed by the 
community with any changes required submitted back upstream.



--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- 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] PLAYIN MUSIC WHILE SEARCHING MYSQL

2012-09-28 Thread Leif Madsen

On 27/09/12 02:13 PM, Mehdi Rahimi wrote:

On Wed, Sep 26, 2012 at 11:31 PM, Leif Madsen
leif.mad...@asteriskdocs.org wrote:

On 26/09/12 05:35 AM, Mehdi Rahimi wrote:


I want to play music in my AGI while i am searching for a field in DB.
Actually during some processes in AGI i need to play music .



Probably Local channels to the rescue here.



Dear Leif Madsen,

Please explain more


top posting fix resolved :)

It's been quite some time since I did this, so I can't give you a 
specific example (that's left as an exercise to the reader), and I may 
be misremembering, but essentially I had 2 Local channels that I 
called via the Dial() application. One path played MusicOnHold() and 
the other would perform some fancy stuff (I think it was an API call via 
CURL() that would attempt to return a valid agent; a sort of dialplan 
based queuing system that used an external API interface that managed 
the availability of the agents).


Anyways, the one Local channel would play MusicOnHold(), then when the 
API returns data to CURL(), the dialplan would continue and pull the 
caller out of the MusicOnHold() application, and then send them to the 
dialplan section to call the agent.


The same principles could be applied here. I think it was a combination 
of MusicOnHold(), Local channels, and the Bridge() application.


Sometimes you just have to be really clever with Asterisk to make it do 
what you want :)


--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- 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] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Markus

Hi Leif,

Am 28.09.2012 13:24, schrieb Leif Madsen:

Searching the issue tracker (hint, hint) does not return any
dtmf_passthrough issues other than this one[0], which doesn't look to be
related.


thanks for your reply.

Right, doesn't look related.



Is another channel connected to the conference receiving the DTMF? Is
that what you're intending? Because from my understand that is the
intention, and not simply to limit the DTMF from being in the conference
in the first place. At least that is almost how it reads in your message.


All I'm trying to achieve is that the rest of the conference doesn't 
hear the beep's when a user presses a key. Users press keys to adjust 
the volume of the conference, for example. And these key presses get 
transmitted to all the other users in the conference, which can become 
quite annoying when there is a larger amount of users.


Are you refering to my previous mails about adjusting volume of 
background music/speech in the conference? This is unrelated - in my 
test scenario I just set up a simple ConfBridge with no features at all, 
then dialed in via PSTN (arrives as SIP) from two different phones, and 
on each phone I can hear the key presses of the other party.


OH! I just tested with a SIP softphone (X-Lite), and DTMF does not get 
passed to the other users! In X-Lite I can hear the DTMF keypresses of 
the users connected via PSTN (incoming via SIP), but when I hit a key in 
X-Lite I can't hear that on the PSTN phones. Hmmm ...


Thank you!
Markus




--
_
-- 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] MySQL InnoDB or MyISAM for CDR

2012-09-28 Thread Leif Madsen

On 27/09/12 11:45 AM, Matt Hamilton wrote:


Date: Thu, 27 Sep 2012 10:23:35 +0200
From: lenz.lo...@gmail.com
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

I'd go for MyISAM and would set up a remote replica if data integrity is 
important.

If you have like 1000 calls of (say) 30 seconds avg length, and you create 10 
events per call, you would expect an event every three seconds. This is about 
300 inserts per second. Say 600 at peaks. This should be feasible with 
server-grade hardware without much difficulty. Also as you always INSERT it 
behaves as a log file (no seeking, no locking) if the table is optimized.
l.


We decided to go with MyISAM since it supports concurrent
 inserts (as you suggested). Data integrity (a slight loss of call 
records) is something we can live by. Right now we use DRBD for replication, 
but I guess with MyISAM it doesn't make much sense if the db crashes. We are 
looking into other options as well.


This may or may not be relevant, but you can also check out 
MySQL/Galera[0] for clustering solutions. Not sure if that gets you 
closer or further from your goal though :)  It uses a modified InnoDB to 
allow a multi-master MySQL cluster.


I used a chef cookbook to deploy it[1].

[0] http://www.codership.com/content/using-galera-cluster
[1] 
http://support.severalnines.com/entries/21453521-opscode-s-chef-mysql-galera-and-clustercontrol



--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- 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] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Leif Madsen

On 28/09/12 07:36 AM, Markus wrote:

Am 28.09.2012 13:24, schrieb Leif Madsen:

Is another channel connected to the conference receiving the DTMF? Is
that what you're intending? Because from my understand that is the
intention, and not simply to limit the DTMF from being in the conference
in the first place. At least that is almost how it reads in your message.


All I'm trying to achieve is that the rest of the conference doesn't
hear the beep's when a user presses a key. Users press keys to adjust
the volume of the conference, for example. And these key presses get
transmitted to all the other users in the conference, which can become
quite annoying when there is a larger amount of users.

Are you refering to my previous mails about adjusting volume of
background music/speech in the conference? This is unrelated - in my
test scenario I just set up a simple ConfBridge with no features at all,
then dialed in via PSTN (arrives as SIP) from two different phones, and
on each phone I can hear the key presses of the other party.

OH! I just tested with a SIP softphone (X-Lite), and DTMF does not get
passed to the other users! In X-Lite I can hear the DTMF keypresses of
the users connected via PSTN (incoming via SIP), but when I hit a key in
X-Lite I can't hear that on the PSTN phones. Hmmm ...


I am not referring to your previous posts, but your test and results 
seem to indicate what I had somewhat thought.


When you're using X-Lite, you're likely using RFC2833 for the DTMF 
method, which is out of band, and gets absorbed by Asterisk by it not 
playing the DTMF into the conference. This is how it should work (and 
likely does for most scenarios/phones).


It sounds like maybe either a configuration or implementation issue on 
the carrier side though. Are you using inband DTMF there? Asterisk 
should really be absorbing that too, but sometimes it can't get it all. 
If you switch to an out of band method like info or rfc2833, does that help?


Do you hear the DTMF on a normal call outside of ConfBridge() with the 
same carrier?


I suspect this isn't a ConfBridge() problem, but a general DTMF one. 
Nice idea on the dtmf_passthrough setting, but it's not really the 
solution to your problem here.



--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- 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] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/

2012-09-28 Thread Aldo Bergamini
On 28 Sep 2012, at 13:27, Leif Madsen leif.mad...@asteriskdocs.org wrote:

 Generally the preferred method when you're doing this programatically anyways 
 is to use an external script through the Asterisk Manager Interface to 
 generate your calls.
 
 Luckily, Russell Bryant has recently create an amioriginate.py[0] script 
 which he's using as an example in the upcoming Asterisk: The Definitive Guide 
 4e book.
 
 [0] https://github.com/russellb/amiutils
 
 
 -- 
 Leif Madsen
 http://www.oreilly.com/catalog/asterisk

Hi Leif,

I am happy to hear that a new release of The Book is in the works!

I will have a look at Russell's script as soon as I am back at my work chair: 
there is however something I am very curious about: it is how you ask Asterisk, 
over AMI, to launch an external command, script, etc.

I was (falsely) assuming that you need a channel to launch a script upon..

To be able to trigger 'commands' over AMI, before any channel exists, opens 
immense possibilities!!

TIA,
Aldo

Sent from my iPhone


--
_
-- 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] User expected behavior of musiconhold and AGI's stream file

2012-09-28 Thread Joshua Colp

Hi everyone,

I am your friendly neighborhood developer here with a question that may 
impact some of you.


Right now there is a small discussion occurring on the Asterisk 
development mailing list about the expected behavior of music on hold 
and AGI's stream file. Presently if you start music on hold and then 
call stream file the music on hold will be *stopped* but not *restarted*.


Do you think this behavior is correct?

Do you depend on this behavior knowingly?

Do you depend on this behavior without knowing it?

The proposition on the mailing list is to add yet another knob to allow 
you to control whether it is restarted or not upon completion of the 
stream file and to change the default behavior for Asterisk 12 to have 
it restart music on hold.


I look forward to your responses so you can help with the ultimate 
decision for this discussion.


Cheers,

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com   www.asterisk.org

--
_
-- 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] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/

2012-09-28 Thread Leif Madsen

On 28/09/12 08:11 AM, Aldo Bergamini wrote:

I am happy to hear that a new release of The Book is in the works!


That's good! I'd hate to be working on something no one wanted :)


I will have a look at Russell's script as soon as I am back at my work chair: 
there is however something I am very curious about: it is how you ask Asterisk, 
over AMI, to launch an external command, script, etc.

I was (falsely) assuming that you need a channel to launch a script upon..

To be able to trigger 'commands' over AMI, before any channel exists, opens 
immense possibilities!!


Oh heck ya. You can start up an Asterisk instance and just start doing 
things with it via your programs. That's the immense power of AMI; it's 
essentially the Asterisk API.


--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- 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] User expected behavior of musiconhold and AGI's stream file

2012-09-28 Thread Leif Madsen

On 28/09/12 08:23 AM, Joshua Colp wrote:

I am your friendly neighborhood developer here with a question that may
impact some of you.


You're friendly? :)


Right now there is a small discussion occurring on the Asterisk
development mailing list about the expected behavior of music on hold
and AGI's stream file. Presently if you start music on hold and then
call stream file the music on hold will be *stopped* but not *restarted*.

Do you think this behavior is correct?


I guess part of the question is; can you trigger it to be re-enabled 
after the stream file?



The proposition on the mailing list is to add yet another knob to allow
you to control whether it is restarted or not upon completion of the
stream file and to change the default behaviour for Asterisk 12 to have
it restart music on hold.

I look forward to your responses so you can help with the ultimate
decision for this discussion.


My question about being able to re-enable it poses an interesting one. 
Since this is a programmatic method of controlling things, do you really 
want to automatically do something that wasn't explicitly defined?


As someone who might interface via a program, I'm thinking I would 
prefer things to continue operating as they do now. If my program 
already accounted for this, then I've already triggered MOH to restart 
after the file. Another question might be; is there a way to determine 
if MOH was playing prior to my call to stream file so I can reset the 
previous state?


My gut tells me that if this has been like this for a long time, and is 
how it worked originally, that how it works now be left as the default, 
and if you want to add an option that allows you to turn it on, that be 
the best approach here. Changing this can only make it a backwards 
compatibility issue. Someone who has run into this and needs it to act 
differently will seek out the new option after reading about it in the 
CHANGES file.


In an ideal scenario, a system upgrade should require the least amount 
of knob turning.


--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- 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] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/

2012-09-28 Thread Aldo Bergamini
On 28 Sep 2012, at 14:24, Leif Madsen leif.mad...@asteriskdocs.org wrote:

 That's good! I'd hate to be working on something no one wanted :)

;-)))


 Oh heck ya. You can start up an Asterisk instance and just start doing things 
 with it via your programs. That's the immense power of AMI; it's essentially 
 the Asterisk API.

Yes, I know...

I have been writing an Objective-C library to control Asterisk over AMI, but I 
did not see the event that you need to send to just trigger a script, say, to 
read the log files and get the last calls, or anything similar.

I can originate calls with an AMI Originate command and some dialplan glue, but 
I am missing anything like an
Exec AMI command.

 --
 Leif Madsen
 http://www.oreilly.com/catalog/asterisk

TIA,
Aldo 



Sent from my iPhone


--
_
-- 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] User expected behavior of musiconhold and AGI's stream file

2012-09-28 Thread Joshua Colp

Leif Madsen wrote:

On 28/09/12 08:23 AM, Joshua Colp wrote:

I am your friendly neighborhood developer here with a question that may
impact some of you.


You're friendly? :)


3


Right now there is a small discussion occurring on the Asterisk
development mailing list about the expected behavior of music on hold
and AGI's stream file. Presently if you start music on hold and then
call stream file the music on hold will be *stopped* but not
*restarted*.

Do you think this behavior is correct?


I guess part of the question is; can you trigger it to be re-enabled
after the stream file?


Sure you can! You can use set music to start it going again as the next 
command.



The proposition on the mailing list is to add yet another knob to allow
you to control whether it is restarted or not upon completion of the
stream file and to change the default behaviour for Asterisk 12 to have
it restart music on hold.

I look forward to your responses so you can help with the ultimate
decision for this discussion.


My question about being able to re-enable it poses an interesting one.
Since this is a programmatic method of controlling things, do you really
want to automatically do something that wasn't explicitly defined?


Personally I'm in the camp of no. Stopping music on hold right now is 
done to ensure that stream file can do what you ask it to do.



As someone who might interface via a program, I'm thinking I would
prefer things to continue operating as they do now. If my program
already accounted for this, then I've already triggered MOH to restart
after the file. Another question might be; is there a way to determine
if MOH was playing prior to my call to stream file so I can reset the
previous state?


There is currently no way to get MOH state but as Asterisk will not 
arbitrarily start MOH on channels in this situation you can certainly 
store this information yourself as you would be the one initiating it.



My gut tells me that if this has been like this for a long time, and is
how it worked originally, that how it works now be left as the default,
and if you want to add an option that allows you to turn it on, that be
the best approach here. Changing this can only make it a backwards
compatibility issue. Someone who has run into this and needs it to act
differently will seek out the new option after reading about it in the
CHANGES file.


Agreed but what I'm having a hard time grasping is the benefit of having 
this be a configuration option you enable. You *have* to be aware of it 
to enable it which is the same as being aware of it when writing your AGI.


Cheers,

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com   www.asterisk.org

--
_
-- 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] SIP DTMF Flash Event

2012-09-28 Thread Joshua Colp

Tim Nelson wrote:

Is there a way to have Asterisk respond appropriately when receiving a DTMF 
Flash event via SIP? I'm finding some WiFi SIP phones, specifically the 
Quickphones QA-342 want to handle transfers/3-way calls by sending a DTMF Flash 
event instead of handling it properly like every other damn VoIP phone on the 
planet...

Asterisk sees the Flash event (via the logs), but does not act upon it.

Thoughts?


Hola,

The functionality you are talking about (server side SIP transfers and 
conferences) are not really implemented for use like this. All of the 
pieces exist within Asterisk to achieve the expected end result but as 
this has only ever come up maybe twice noone has ever taken the time to 
do it. Sorry!


Cheers,

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com   www.asterisk.org

--
_
-- 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] User expected behavior of musiconhold and AGI's stream file

2012-09-28 Thread Leif Madsen

On 28/09/12 08:45 AM, Joshua Colp wrote:

Leif Madsen wrote:

I guess part of the question is; can you trigger it to be re-enabled
after the stream file?


Sure you can! You can use set music to start it going again as the next
command.


And that makes sense. I kind of knew the answer already, but used it as 
a leader to the rest of the discussion :)



My question about being able to re-enable it poses an interesting one.
Since this is a programmatic method of controlling things, do you really
want to automatically do something that wasn't explicitly defined?


Personally I'm in the camp of no. Stopping music on hold right now is
done to ensure that stream file can do what you ask it to do.


Which makes sense. No one wants to play a file over MOH :)


As someone who might interface via a program, I'm thinking I would
prefer things to continue operating as they do now. If my program
already accounted for this, then I've already triggered MOH to restart
after the file. Another question might be; is there a way to determine
if MOH was playing prior to my call to stream file so I can reset the
previous state?


There is currently no way to get MOH state but as Asterisk will not
arbitrarily start MOH on channels in this situation you can certainly
store this information yourself as you would be the one initiating it.


OK, so we're on the same page here then. If you were the one initiating 
it, and you call stream file, then you know it's going to stop the MOH, 
and you can check your own programmatic state to determine if you should 
start MOH again. Starting it automatically again might not be the method 
you want.


If you don't want it, now you have to explicitly stop it, which could 
cause a blip of music to be played after every file. This is certainly 
a bug which would have to be worked around, and seems like a lot more 
work than it is worth.



My gut tells me that if this has been like this for a long time, and is
how it worked originally, that how it works now be left as the default,
and if you want to add an option that allows you to turn it on, that be
the best approach here. Changing this can only make it a backwards
compatibility issue. Someone who has run into this and needs it to act
differently will seek out the new option after reading about it in the
CHANGES file.


Agreed but what I'm having a hard time grasping is the benefit of having
this be a configuration option you enable. You *have* to be aware of it
to enable it which is the same as being aware of it when writing your AGI.


That makes sense to me. I was thinking the same thing, but wasn't sure 
if Asterisk would have started MOH due to some hold situation or 
something I hadn't thought of. If the initiation of the MOH was done by 
the program, then it makes perfect sense to me that it should start it 
again as long as it's documented that stream file will stop it (if 
already playing). I think I saw a commit from you today that satisfies 
that part of it.


Based on this discussion, my stance seems to be adding the option just 
seems silly. A sane method of restarting the MOH already exists, and 
control should be in the AGI, not in Asterisk.



--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- 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] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Markus

Hi again Leif,

Am 28.09.2012 13:42, schrieb Leif Madsen:

OH! I just tested with a SIP softphone (X-Lite), and DTMF does not get
passed to the other users! In X-Lite I can hear the DTMF keypresses of
the users connected via PSTN (incoming via SIP), but when I hit a key in
X-Lite I can't hear that on the PSTN phones. Hmmm ...


I am not referring to your previous posts, but your test and results
seem to indicate what I had somewhat thought.

When you're using X-Lite, you're likely using RFC2833 for the DTMF
method, which is out of band, and gets absorbed by Asterisk by it not
playing the DTMF into the conference. This is how it should work (and
likely does for most scenarios/phones).

It sounds like maybe either a configuration or implementation issue on
the carrier side though. Are you using inband DTMF there? Asterisk
should really be absorbing that too, but sometimes it can't get it all.
If you switch to an out of band method like info or rfc2833, does that
help?

Do you hear the DTMF on a normal call outside of ConfBridge() with the
same carrier?

I suspect this isn't a ConfBridge() problem, but a general DTMF one.
Nice idea on the dtmf_passthrough setting, but it's not really the
solution to your problem here.


Thanks for the suggestions. (RFC2833 was already set on the SIP peer in 
question)   For further debugging I've just done the following tests 
with these results:


DID provider 1, incoming via SIP (Germany):

PSTN to DID to X-Lite, RFC2833: hear DTMF, not logged on console
PSTN to DID to X-Lite, inband: hear DTMF, not logged on console
PSTN to DID to X-Lite, INFO: hear DTMF, not logged on console

PSTN to DID to ConfBridge, RFC2833: hear DTMF, LOGGED on console
PSTN to DID to ConfBridge, inband: hear DTMF, not logged on console
PSTN to DID to ConfBridge, INFO: hear DTMF, not logged on console


DID provider 2, incoming via SIP (UK and Netherlands):

PSTN to DID to X-Lite, RFC2833: hear DTMF, LOGGED on console
PSTN to DID to X-Lite, inband: hear DTMF, LOGGED on console
PSTN to DID to X-Lite, INFO: hear DTMF, not logged on console

PSTN to DID to ConfBridge, RFC2833: hear DTMF, LOGGED on console
PSTN to DID to ConfBridge, inband: hear DTMF, LOGGED on console
PSTN to DID to ConfBridge, INFO: hear DTMF, not logged on console


DID provider 3, incoming via SIP (Nigeria and Kazakhstan):

PSTN to DID to ConfBridge, inband: hear DTMF, LOGGED on console


DID provider 4, incoming via SIP (US):

PSTN to DID to ConfBridge, RFC2833: hear DTMF, LOGGED on console


X-Lite 3.0 to ConfBridge:

X-Lite peer is set to dtmfmode=rfc2833 in Asterisk.

X-Lite force inband YES, RTP 2833 YES: don't hear DTMF, LOGGED on console
X-Lite force inband NO, RTP 2833 YES: don't hear DTMF, LOGGED on console
X-Lite force inband YES, RTP 2833 NO: hear DTMF, not logged on console
X-Lite force inband NO, RTP 2833 NO: don't hear DTMF, LOGGED on console

The last result is kinda strange. Hm.


PSTN means that I've tested two times, from a regular landline and from 
a mobile. Always calling to the providers DID which ends up in Asterisk 
via SIP. In the case of ConfBridge there were always 2 participants in 
the conference so that I could check if I hear the DTMF on the other end.


not logged on console means that I can hear the DTMF tones in 
X-Lite/ConfBridge but Asterisk doesn't seem to recognize them (which is 
fine as not all providers support all DTMF variants).


My resume is: DTMF is just fine, ConfBridge dtmf_passthrough is not 
working at all. Agree? :)



Thank you,
Markus






--
_
-- 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] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Joshua Colp

Markus wrote:

Snipped long results list


PSTN means that I've tested two times, from a regular landline and from
a mobile. Always calling to the providers DID which ends up in Asterisk
via SIP. In the case of ConfBridge there were always 2 participants in
the conference so that I could check if I hear the DTMF on the other end.


I think your results are sort of skewed. In the case of SIP - SIP if a 
local bridge occurs things will optimize and you most likely won't see 
DTMF related messages. They get passed through as packets and not fully 
interpreted.



not logged on console means that I can hear the DTMF tones in
X-Lite/ConfBridge but Asterisk doesn't seem to recognize them (which is
fine as not all providers support all DTMF variants).


What log message are you using to determine this?


My resume is: DTMF is just fine, ConfBridge dtmf_passthrough is not
working at all. Agree? :)


I've looked at the code for dtmf_passthrough, it's dead simple and 
should be working fine PROVIDED your DTMF is not going through as audio.


My suggestion is to take a step back further.

Just send incoming calls to the Read application and have it store the 
received DTMF in a variable. Next step have it output what was received.


If that works for all cases then Asterisk is recognizing DTMF fine. This 
does *not* mean that the tone will be muted fully as my previous email 
mentioned.


You can further test if all cases check out by sending calls to Record 
and playing back the audio to yourself. If you hear tones and Asterisk 
also recognized the DTMF then it's not fully muted, or the hardware in 
question is sending *both* inband and out of band, which is not supported.


Cheers,

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com   www.asterisk.org

--
_
-- 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] Call Hold problem

2012-09-28 Thread Marco Colombo
Hello everybody,
i have a problem with asterisk 1.8 and Call Hold
My problem is that Asterisk don't send re-invite when i pick up the call from 
hold.
I already insert canreinvite=no in all my sip channels, set dtmfmode=info in 
sip.conf and my Dial() command don't insert option like  t, T, h, H, w, 
W or L (with multiple arguments).
I already follow this discussion : 
http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial
I run debug with asterisk, and i see that the re-invite are made by asterisk, 
but in the TO fields is present the local ip address and not the next hop ip.
This is the log : http://pastebin.com/ARUC0j4t
The asterisk IP : 87.248.56.101
The next hop IP : 87.248.56.100
Is it a bug? i'm already search on google, but i dont find anything.


Let me know, if you need more information.
Thanks for all
Best Regards
Marco

--
_
-- 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] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Markus

Hi Joshua,

Am 28.09.2012 15:56, schrieb Joshua Colp:

I think your results are sort of skewed. In the case of SIP - SIP if a
local bridge occurs things will optimize and you most likely won't see
DTMF related messages. They get passed through as packets and not fully
interpreted.


ah, ok! That explains why nothing was logged when testing PSTN to DID to 
X-Lite, RFC2833, and something was logged when repeating the call to 
ConfBridge.




not logged on console means that I can hear the DTMF tones in
X-Lite/ConfBridge but Asterisk doesn't seem to recognize them (which is
fine as not all providers support all DTMF variants).


What log message are you using to determine this?


Just by watching the console for DTMF after I press a key (logger.conf: 
console = dtmf). And confirmed by the fact that the DTMF keypress 
didn't have any effect (such as adjusting the volume, for example).




My resume is: DTMF is just fine, ConfBridge dtmf_passthrough is not
working at all. Agree? :)


I've looked at the code for dtmf_passthrough, it's dead simple and
should be working fine PROVIDED your DTMF is not going through as audio.


You're right, I was wrong. It is working, but in my tests only in the 
X-Lite scenario.




My suggestion is to take a step back further.
Just send incoming calls to the Read application and have it store the
received DTMF in a variable. Next step have it output what was received.


Ok, good idea, here are the results of Read() and SayDigits():

DID provider 1, RFC2833: input 123, output 123
DID provider 1, inband: input 123, output User entered nothing.
DID provider 1, INFO: input 123, output User entered nothing.

DID provider 2, RFC2833: input 123, output 123
DID provider 2, inband: input 123, output User entered nothing.
DID provider 2, INFO: input 123, ouput User entered nothing.

DID provider 3, RFC2833 1st test: input 123, output 1233
DID provider 3, RFC2833 2nd test: input 123, output 12333
DID provider 3, RFC2833 3rd test: input 123, output 123
DID provider 3, inband: input 123, output 123
DID provider 3, INFO: input 123, output User entered nothing.

(RFC2833 seems a bit flakey with that provider, thats why I use inband 
with them.)


DID provider 4, RFC2833: input 123, output 123
DID provider 4, inband: input 123, output User entered nothing., but 
something strange happened here. Console shows:

channel.c:4143 __ast_read: DTMF begin '1' received on SIP
channel.c:4147 __ast_read: DTMF begin ignored '1' on SIP
channel.c:4143 __ast_read: DTMF begin '2' received on SIP
channel.c:4147 __ast_read: DTMF begin ignored '2' on SIP
channel.c:4143 __ast_read: DTMF begin '3' received on SIP
channel.c:4147 __ast_read: DTMF begin ignored '3' on SIP
channel.c:4143 __ast_read: DTMF begin '#' received on SIP
channel.c:4147 __ast_read: DTMF begin ignored '#' on SIP
DID provider 4, INFO: input 123, output User entered nothing., and 
again the same on the console:

channel.c:4143 __ast_read: DTMF begin '1' received on SIP
channel.c:4147 __ast_read: DTMF begin ignored '1' on SIP
channel.c:4143 __ast_read: DTMF begin '2' received on SIP
channel.c:4147 __ast_read: DTMF begin ignored '2' on SIP
channel.c:4143 __ast_read: DTMF begin '3' received on SIP
channel.c:4147 __ast_read: DTMF begin ignored '3' on SIP
channel.c:4143 __ast_read: DTMF begin '#' received on SIP
channel.c:4147 __ast_read: DTMF begin ignored '#' on SIP

(Asterisk sees the DTMF but doesn't like it?)



If that works for all cases then Asterisk is recognizing DTMF fine. This
does *not* mean that the tone will be muted fully as my previous email
mentioned.


I don't see any previous eMail from you on the list and there is nothing 
in the archives either. Could you re-send it, please? Maybe the info 
that I'm missing is inside that mail. :)




You can further test if all cases check out by sending calls to Record
and playing back the audio to yourself. If you hear tones and Asterisk
also recognized the DTMF then it's not fully muted, or the hardware in
question is sending *both* inband and out of band, which is not supported.


Ok, here are the results of Record() and Playback():

DID provider 1, RFC2833: input 123, output hear DTMF (123)
DID provider 1, inband: input 123, output hear DTMF (123)
DID provider 1, INFO: input 123, output hear DTMF (123)

DID provider 2, RFC2833: input 123, output hear DTMF (123)
DID provider 2, inband: input 123, output hear DTMF (123)
DID provider 2, INFO: input 123, output hear DTMF (123)

DID provider 3, RFC2833: input 123, output hear DTMF (123)
DID provider 3, inband: input 123, output hear DTMF (123)
DID provider 3, INFO: input 123, output hear DTMF (123)

DID provider 4, RFC2833: input 123, output hear DTMF (123)
DID provider 4, inband: input 123, output hear DTMF (just 1 digit)
(Console showed: DTMF begin passthrough)
DID provider 4, INFO: input 123, output hear DTMF (just 1 digit)
(Console showed: DTMF begin passthrough)

X-Lite, RFC2833 in sip.conf: input 123, output hear NOTHING
X-Lite, inband in 

Re: [asterisk-users] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Joshua Colp

Markus wrote:

Hi Joshua,


Hola,


My suggestion is to take a step back further.
Just send incoming calls to the Read application and have it store the
received DTMF in a variable. Next step have it output what was received.


Ok, good idea, here are the results of Read() and SayDigits():


snipped results to make this email manageable

How are you changing the DTMF for each provider? If you are merely 
changing it using dtmfmode in sip.conf this may or may not change how 
the provider side sends it. In the case of setting it to rfc2833 it 
causes RFC2833 to be negotiated in the SDP. Some equipment MAY change to 
using inband if it has not been negotiated.



If that works for all cases then Asterisk is recognizing DTMF fine. This
does *not* mean that the tone will be muted fully as my previous email
mentioned.


I don't see any previous eMail from you on the list and there is nothing
in the archives either. Could you re-send it, please? Maybe the info
that I'm missing is inside that mail. :)


I think I wrote the email in my head, oops.

Essentially when doing conversion of inband DTMF to out of band DTMF it 
is possible for some parts of tones to get through unmuted. You have to 
strike a balance between detecting the DTMF early enough, not detecting 
other stuff as DTMF, and muting it. Some implementations may let some 
leak through. The only way to completely overcome that is to buffer 
enough audio and delay the stream.





You can further test if all cases check out by sending calls to Record
and playing back the audio to yourself. If you hear tones and Asterisk
also recognized the DTMF then it's not fully muted, or the hardware in
question is sending *both* inband and out of band, which is not
supported.


Ok, here are the results of Record() and Playback():


snipped results again, can be viewed in mailing list archives if anyone 
is curious




If I understand right, all my four DID providers are broken?


If the provider is doing the conversion their equipment should mute the 
inband DTMF as best it can and you should not hear it.


How much of the tone are you hearing?

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com   www.asterisk.org

--
_
-- 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] 100 outgoing calls - 10 at a time - /var/spool/asterisk/outgoing/

2012-09-28 Thread Patrick Archibald
Thanks everyone for the guidance on my outgoing call question.

And I'm looking forward to Asterisk: The Definitive Guide 4e book too!

Thanks, PLA

--
_
-- 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] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Markus

Am 28.09.2012 17:33, schrieb Joshua Colp:

Ok, good idea, here are the results of Read() and SayDigits():


snipped results to make this email manageable

How are you changing the DTMF for each provider? If you are merely
changing it using dtmfmode in sip.conf this may or may not change how
the provider side sends it. In the case of setting it to rfc2833 it
causes RFC2833 to be negotiated in the SDP. Some equipment MAY change to
using inband if it has not been negotiated.


Yes, only via dtmfmode in sip.conf. I have no control over the provider 
side, of course. :)  Or are there other options?




Essentially when doing conversion of inband DTMF to out of band DTMF it
is possible for some parts of tones to get through unmuted. You have to
strike a balance between detecting the DTMF early enough, not detecting
other stuff as DTMF, and muting it. Some implementations may let some
leak through. The only way to completely overcome that is to buffer
enough audio and delay the stream.


Ah! So because I'm calling from PSTN which is naturally inband (I 
guess?) my DID provider (or rather some provider in front of him) 
converts to out of band (RFC2833), but the conversion cannot be fully 
accurate?




If I understand right, all my four DID providers are broken?


If the provider is doing the conversion their equipment should mute the
inband DTMF as best it can and you should not hear it.

How much of the tone are you hearing?


About the tone itself: it's always different for each DTMF 
method/provider I would say. Sometimes it's just a really short glub 
(no idea how to describe that better), and sometimes it's a full-length 
beeep. But in any case except for provider 4 inband + INFO I'm hearing 
all of it (123), so it's anything from glub-glub-glub to 
beeep-beeep-beeep. :-)


Right now, after what you wrote, I'm left with the feeling that RFC2833 
is pretty much, well, hmm... useless in a PSTN-VoIP scenario? It works 
fine when using X-Lite, I suppose because there is no conversion 
involved and therefore the tones can get completely muted.


I'm sad now. Is there nothing I can do to remove DTMF tones from my 
conferences? :-(


Thank you!
Markus





--
_
-- 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] ConfBridge dtmf_passthrough=no doesn't have any effect. Bug?

2012-09-28 Thread Joshua Colp

Markus wrote:

Am 28.09.2012 17:33, schrieb Joshua Colp:

Ok, good idea, here are the results of Read() and SayDigits():


snipped results to make this email manageable

How are you changing the DTMF for each provider? If you are merely
changing it using dtmfmode in sip.conf this may or may not change how
the provider side sends it. In the case of setting it to rfc2833 it
causes RFC2833 to be negotiated in the SDP. Some equipment MAY change to
using inband if it has not been negotiated.


Yes, only via dtmfmode in sip.conf. I have no control over the provider
side, of course. :) Or are there other options?


There isn't. It's up to them.


Essentially when doing conversion of inband DTMF to out of band DTMF it
is possible for some parts of tones to get through unmuted. You have to
strike a balance between detecting the DTMF early enough, not detecting
other stuff as DTMF, and muting it. Some implementations may let some
leak through. The only way to completely overcome that is to buffer
enough audio and delay the stream.


Ah! So because I'm calling from PSTN which is naturally inband (I
guess?) my DID provider (or rather some provider in front of him)
converts to out of band (RFC2833), but the conversion cannot be fully
accurate?


Correct. The equipment doing the conversion may or may not fully remove 
the tone.



If I understand right, all my four DID providers are broken?


If the provider is doing the conversion their equipment should mute the
inband DTMF as best it can and you should not hear it.

How much of the tone are you hearing?


About the tone itself: it's always different for each DTMF
method/provider I would say. Sometimes it's just a really short glub
(no idea how to describe that better), and sometimes it's a full-length
beeep. But in any case except for provider 4 inband + INFO I'm hearing
all of it (123), so it's anything from glub-glub-glub to
beeep-beeep-beeep. :-)

Right now, after what you wrote, I'm left with the feeling that RFC2833
is pretty much, well, hmm... useless in a PSTN-VoIP scenario? It works
fine when using X-Lite, I suppose because there is no conversion
involved and therefore the tones can get completely muted.


It's not completely useless. Some equipment completely removes the tone 
and life is good. It's also perfectly fine for IVRs. Where it can fall 
apart is in this exact situation where you have someone on the other 
side who shouldn't hear the DTMF. That's not often.


As for the glub I would say that is a partial squelching (muting). It 
was able to mute most of the tone but not completely.


Unfortunately there's nothing I can suggest to help improve the 
situation, sorry.


--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com   www.asterisk.org

--
_
-- 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] Call me now outbound calls in a queue

2012-09-28 Thread Mitch Claborn
I want to put a call me now button on the web site that will place the 
request into an asterisk call queue and then when an agent picks up the 
call in the queue, place the outbound call to the customer.


The following AMI command works, but it calls the customer first, before 
an agent is necessarily available.


Action: Originate
Channel: SIP/voipms/customer_number_here
Context: external
Async: true
Application: Queue
Data: sales
Callerid: Company 8005551212

How can I get an available agent before the customer call is placed?



--
_
-- 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] PLAYIN MUSIC WHILE SEARCHING MYSQL

2012-09-28 Thread Steve Edwards

On 27/09/12 02:13 PM, Mehdi Rahimi wrote:


I want to play music in my AGI while i am searching for a field in DB.
Actually during some processes in AGI i need to play music .


On Fri, 28 Sep 2012, Leif Madsen wrote:

It's been quite some time since I did this, so I can't give you a specific 
example (that's left as an exercise to the reader), and I may be 
misremembering, but essentially I had 2 Local channels that I called via 
the Dial() application. One path played MusicOnHold() and the other would 
perform some fancy stuff (I think it was an API call via CURL() that would 
attempt to return a valid agent; a sort of dialplan based queuing system that 
used an external API interface that managed the availability of the agents).


Anyways, the one Local channel would play MusicOnHold(), then when the API 
returns data to CURL(), the dialplan would continue and pull the caller out 
of the MusicOnHold() application, and then send them to the dialplan section 
to call the agent.


The same principles could be applied here. I think it was a combination of 
MusicOnHold(), Local channels, and the Bridge() application.


Sometimes you just have to be really clever with Asterisk to make it do what 
you want :)


A multi-threaded AGI or externalivr() sound easier to me if it meets your 
needs.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

--
_
-- 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] Call me now outbound calls in a queue

2012-09-28 Thread James Sharp

On 9/28/2012 12:42 PM, Mitch Claborn wrote:

I want to put a call me now button on the web site that will place the
request into an asterisk call queue and then when an agent picks up the
call in the queue, place the outbound call to the customer.

The following AMI command works, but it calls the customer first, before
an agent is necessarily available.

Action: Originate
Channel: SIP/voipms/customer_number_here
Context: external
Async: true
Application: Queue
Data: sales
Callerid: Company 8005551212

How can I get an available agent before the customer call is placed?


Use AMI to do a queue status.  In the status reply, you'll get a list of 
all the agents and their status (Not in use, in use, busy, unavailable, 
or ringing).



--
_
-- 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] Call me now outbound calls in a queue

2012-09-28 Thread Mitch Claborn
That approach only works if there are any agents that are not busy on a 
call - I could pick one, take them out of the queue then connect the 
call.  If all agents are busy, I need to be able to insert the request 
into the queue so that it gets processed in sequence with the inbound calls.





Mitch

On 09/28/2012 01:42 PM, James Sharp wrote:

On 9/28/2012 12:42 PM, Mitch Claborn wrote:

I want to put a call me now button on the web site that will place the
request into an asterisk call queue and then when an agent picks up the
call in the queue, place the outbound call to the customer.

The following AMI command works, but it calls the customer first, before
an agent is necessarily available.

Action: Originate
Channel: SIP/voipms/customer_number_here
Context: external
Async: true
Application: Queue
Data: sales
Callerid: Company 8005551212

How can I get an available agent before the customer call is placed?


Use AMI to do a queue status.  In the status reply, you'll get a list of
all the agents and their status (Not in use, in use, busy, unavailable,
or ringing).


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



--
_
-- 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] 'Training mode'

2012-09-28 Thread Adam Moffett
I was asked today if we could somehow have a trainee on the phone with a 
supervisor conferenced in, but somehow have it so anything the 
supervisor says is only heard by the trainee and not the customer.


Is there a feature like that?


--
_
-- 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] 'Training mode'

2012-09-28 Thread Andrew Latham
On Fri, Sep 28, 2012 at 5:27 PM, Adam Moffett adamli...@plexicomm.net wrote:
 I was asked today if we could somehow have a trainee on the phone with a
 supervisor conferenced in, but somehow have it so anything the supervisor
 says is only heard by the trainee and not the customer.

 Is there a feature like that?


 --

Yup, pretty standard stuff

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_ChanSpy


-- 
~ Andrew lathama Latham lath...@gmail.com http://lathama.net ~

--
_
-- 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] Strategy for custom data in the CDR

2012-09-28 Thread Mitch Claborn
Looking for ideas and comments on my strategy for getting a bit of 
custom data into the CDR.  It seems to work OK, but I'm open to better 
and/or more robust ways to do it.


Problem: get the customerid of the caller from our application into the CDR

Approach:
Before the Queue() command, save the caller's channel name in a varible 
_MMCALLERCHANNEL


In the Queue() connect macro, send that channel name along with other 
info to the application


The application determines the customerid and uses AMI Setvar to set 
variable MMCUSTOMERID on the given channel with the customerid. (Can't 
use AGI in-line because the customer will be determined by an actual 
human sitting at a terminal during the call and may take a while.)


In the hangup extension, set CDR(customerid) to value of MMCUSTOMERID

Here is the code that is working

[queues]
exten =sales,1,Verbose(2,${CALLERID(all)} entering the sales queue)
  same =n,Set(_MMCALLERCHANNEL=${CHANNEL(name)})
  same =n,Queue(sales,t,QueueConnected)
  same =n,Hangup()
exten =h,1,NoOp(When a sales queue call is hung up)
  same =n,Set(CDR(customerid)=${MMCUSTOMERID})

[macro-QueueConnected]
exten =s,1,NoOp()
  same =n,Monitor(wav,,mb)
  same 
=n,Set(OPERATORID=${ODBC_OPERATORID_FROM_ADDRESS(${MEMBERINTERFACE})})
  ; userfield is mapped to operatorid in cdr_adaptive_odbc because 
setting operatorid directly doesn't work here

  same =n,Set(CDR(userfield)=${OPERATORID})
  ; passes the call to the application
  same =n,System(${MMAGI}/queue_action.sh 
action:connect,queue:sales,member_interface:\\${MEMBERINTERFACE}\\,member_name:\\${MEMBERNAME}\\,cidnum:\\${CONNECTEDLINE(num)}\\,cidname:\\${CONNECTEDLINE(name)}\\,uniqueid:\\${MMLINKEDID}\\,channel:\\${MMCALLERCHANNEL}\\)





--

Mitch


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