Zoiper add pause between dialing phone numbers? - sip

I want to call an ext in a phone number .
For example +982632601 ext 8 .
In most phones we could directly call +982632601#8 without need to listen to IVR .
I tried following characters
# * w , p
Any ideas ?

You need have support from dialplan and hardware side on asterisk server to do that.
Zoiper can do nothing with that.
What you do is calling "two stage dialling"
In asterisk it can be done via D param of dialling command something like this:
exten => *20,1,Dial(Local/18005558355#outbound-allroutes,,D(wwww932))
Sure you need parse by dialplan your number and change your dialplan to support that. You can use any character.
Sorry, dialplan for 2-stage-dialling is not trivial and out of this site topics.

Related

How to enter an option during voice calls using at commands

I've been using a sim900 module to replicate many of the functions found in a basic cellphones for an embedded project. I've been successful with most functions with the exception of entering options during a voice call. I am actually looking for a generic solution (e.g. GSM 07.07 etc.) although the GSM/GPRS Module I'm using is the sim900.
Scenario: I initiate a call using ATD<number>; ,then automated voice asks me to dial "1" for an option. How do I send the "1"?
I've search high and low for an answer. I've been through the AT command manual over and over again. Please help.
Very good start in using the official GSM specification, although I want to note that 07.07 has been superseded by 27.007 a very long time ago, and you should use that document (or 27.005 if relevant).
I initially expected there to be two ways of achieving this, dial string modifiers or DTMF command, but I looking up the dial string in the 27.007 specification I do not find the p (pause) modifier1 I was expecting, and nearest thing, the W (wait) modifier is ignored and only included for compatibility.
Sending 0 through 9, A through D, * and # during a call is done using DTMF, although in a GSM network this is signalled separately out of band rather than sending in-band analogue tones. There is a specific command for sending DTMF tones called AT+VTS (with a horrible syntax). So that command is the answer to you question. Invoke it either from online command mode or from another serial connection.
1 The reason I was expecting a p modifier to exist is that I am able to enter one in phone book entries, e.g. `"12345678p123" which will dial 12345678, wait for the connection to be established and then send 123 as DTMF tones. But this is then obviously something (only) the user interface voice call handler manages and not the AT command handler.

Asterisk queue context not working

I'm implementing a callback service for Asterisk queues.
The idea is to place all incoming calls on a queue. A message is played back, letting callers know that they can either wait in line until an agent becomes available or they can press '2', hangup, and have the agent call them back as soon as possible.
I defined a context for the inbound queue in queues.conf as such:
[qIngresoCC]
...
context=qIngresoCC-callback
...
and defined the corresponding entries in extensions.conf:
[qIngresoCC-callback]
exten = > 2,1,NoOp("El cliente ${CALLERID(all)} solicita CallBack")
same => n,AGI(add_channel_to_callback.php)
same => n,Playback(goodbye_for_the_best)
same => n,Hangup()
An incoming call is correctly sent to the queue, the announcements are played back, but when pressing '2', the call is not sent to the qIngresoCC-callback context.
DTMF logging is enabled, and I can see Asterisk receiving it, but it simply won't jump to the specified context.
[Jul 4 10:45:47] DTMF[84833][C-0000014d]: channel.c:4017 __ast_read: DTMF end '2' received on SIP/axtel-rappi-0000027b, duration 0 ms
[Jul 4 10:45:47] DTMF[84833][C-0000014d]: channel.c:4076 __ast_read: DTMF end accepted without begin '2' on SIP/axtel-rappi-0000027b
[Jul 4 10:45:47] DTMF[84833][C-0000014d]: channel.c:4087 __ast_read: DTMF end passthrough '2' on SIP/axtel-rappi-0000027b
What am I missing?
UPDATE
I forgot to specify:
I'm using Asterisk 13.14.0 compiled from source (by Portage) on Gentoo, with support (USE flags) for caps, curl, http, iconv, odbc, pjproject, postgres, samples, srtp.
I'm not using freepbx nor any other GUI. Everything is configured manually through the .conf files.
The only tuning of the source I did was changing channel.h from #define AST_MAX_ACCOUNT_CODE 20 to #define AST_MAX_ACCOUNT_CODE 256 to be able to use longer account codes.
The digit pressed must match the extension level in the context: for example if you have context=queue_out in your queues.conf and let's say your recording says "Press 5 to leave a voicemail (periodic announcement): extensions.conf would have the following
[queue_out]
exten => 5,1,Voicemail(123#default)
exten => 5,n,Hangup()
I had the same problem btw.

Asterisk hangs up if caller inputs number early

We have an Asterisk IVR system setup that prompts the user for input
In our extensions file, we have the following:
[englishprocess]
exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Set(TIMEOUT(digit)=2)
exten => s,n,agi(mstts.agi,"Please enter your ID number followed by pound.",en-US)
exten => s,n,Read(APCODE,,666)
exten => s,n,agi(mstts.agi,"Your ID Number is",en)
exten => s,n,SayDigits(${APCODE})
exten => s,n,agi(mstts.agi,"If this is correct press, 1, otherwise, press, 3",en-US)
exten => s,n,Read(CHECK,,1)
exten => s,n,GotoIf($["${CHECK}" = "3"]?englishprocess,s,1)
exten => s,n,Set(MYADDR=${CURL(webserviceaddress.php?idnum=${APCODE})})
exten => s,n,agi(mstts.agi,${MYADDR},en-US)
exten => s,n,Hangup()
The problem is that if the user inputs their ID before the text to speech prompt finishes, or if they hit 1 before it finishes saying
"If this is correct press, 1, otherwise, press, 3"
The service hangs up.
How can we keep the process the same and accept early user input?
If accepting user input early is not possible is there a way to prevent hangup and prompt again?
We switched to Amazon's Polly service to generate the sound files and used the asterisk method Playback(filename) instead of agi() inside of extensions_custom.conf in order to stop the call from hanging up if the user inputs text prematurely.
Granted the service ignores the inputs that are put in early, but at least it does not hang up. A better solution would accept early input. I'll update this if I find an alternative.
Edit: Found an alternative Read() which lets us play soundbites that can be interrupted, so we now have a mix of Read() and playback() calls and can control which sound files can be skipped by the user in this way. The service no longer hangs up on users and we no longer use agi() calls.
Asterisk Dialplan cannot by use seriously to create dynamic services with intensive TextToSpeech.
First because the latency could be an issue if you don't use a cache, or if you don't use an MRCP connector.
Secondly because by this way you not support the bargein (https://www.w3.org/TR/voicexml20/#dml4.1.5) and you lost the way to interact with DTMF (or voice) at any moment.
To create a Voice Portal, you probably need a VoiceXML interpreter. You have 2 ways to create this service in an Asterisk : Voximal a commercial application running over and Asterisk, or VoiceGlue a free GPL dead project (you can run it over old Asterisk).
agi(mstts.agi,"text",[language],[intkey],[speed]):
intkey is used if the user enters anything the script will stop and go to that extension. I don't know if it will work in your case but worth a try.
exten => _X,1,agi(mstts.agi,"You just pressed ${EXTEN}. Try another one please.",en,any)
Try using the ,any after the language and see if that works. I got that example from https://github.com/zaf/asterisk-mstts
Look into this line:
print "STREAM FILE $file \"$keys\"\n";
https://www.voip-info.org/wiki/view/stream+file
Usage: STREAM FILE <filename> <escape digits> [sample offset]
Send the given file, allowing playback to be interrupted by the given digits, if any.
Use double quotes for the digits if you wish none to be permitted.
If sample offset is provided then the audio will seek to sample offset before play starts.
Remember, the file extension must not be included in the filename.
After that it for some reason work like waitexten and change extension. I have no idea who and why added that to code, you can ask maintainer.
So just read files you use, not spam questions.

receiving RFC2833 DTMF in Perl ESL script while Outbound calling and executing a lua script

I have written a Perl ESL script which places an outbound call and bridges that together with a lua script which does some tts with flite.
This worked well with SIP INFO DTMF. But since our SIP Provider disables SIP INFO and switched to RFC2833 the ESL script no longer gets DTMF events. In the freeswitch console.
I see all the DTMF events.
I connect to all events with:
$con->events("plain","ALL");
But don't get any DTMF event all other events I get.
Any Idea?
Not sure about Perl, but you can use something like this from LUA:
digits = session:playAndGetDigits(min_digits, max_digits, max_tries, digit_timeout, terminators , sounds_file", "", "\\d+")
That will collect the DTMF digits that are passed to it and you can call it from your dialplan such as:
<action application="lua" data="get_dtmf.lua" />
You can iterate through the "digits" to do what you need to do.

How to Implement an Infrastructure for Automed IVR calls?

I need tips to build an infrastructe to send 1000 simultaneous voice calls (automated IVR calls with voicexml). Up to now i used asterisk with voiceglue but now i have performance issues.
The infrasturcture was like this:
the asterisk pulls request from queue
the queue consumer create a call file
when the call ends, call file is read and status is sent to the application server
To be honest, i am asking for tips to implement an infrastructure like callfire[1] or voxeo[2]?
[1]https://www.callfire.com/
[2]http://voxeo.com/
you can go with voxeo prophecy (http://voxeo.com/prophecy/) one of the good server which have the capability of making simultaneous voice calls
Note: The requirement which your are expecting to do will not only possible with voxeo prophecy it should also depend the web server like Tomcat, IIS e.t.c in case if you dealing with databases like Sql , Oracle e.t.c
Please do refer to know the architecture
http://www.alpensoftware.com/define_VoiceOverview.html
CallFire's API has a CreateBroadcast method where you can throw up an IVR using their XML in seconds. You can read up on the documentation here:
https://www.callfire.com/api-documentation/rest/version/1.1#!/broadcast
CallFire also offers a PHP-SDK, hosted on Github, with examples of how to do this. The SDK is minimal setup and allows you to easily tap into the APIs robust functionality. Version 1.1 can be found here, with instructions on how to get started: https://github.com/CallFire/CallFire-PHP-SDK
The method call might look something like this. Note the required dependencies.
<?php
use CallFire\Api\Rest\Request;
use CallFire\Api\Rest\Response;
require 'vendor/autoload.php';
$dialplan = <<<DIALPLAN
<dialplan><play type="tts">Congratulations! You have successfully configured a CallFire I V R.</play></dialplan>
DIALPLAN;
$client = CallFire\Api\Client::Rest("<api-login>", "<api-password>", "Broadcast");
$request = new Request\CreateBroadcast;
$request->setName('My CallFire Broadcast');
$request->setType('IVR');
$request->setFrom('15551231234'); // A valid Caller ID number
$request->setDialplanXml($dialplan);
$response = $client->CreateBroadcast($request);
$result = $client::response($response);
if($result instanceof Response\ResourceReference) {
// Success
}
You can read this:
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out
Main tip: you WILL have ALOT of issues. If you are not expert with at least 5 years development experience with asterisk, you have use already developed dialling cores or hire guru. There are no opensource core that can do more then 300 calls on single server.
You can't do 1000 calls on single asterisk in app developed by "just nice developer". It will just not work.
Task of create dialling core for 1000 calls is "rocket science" type task. It require very special dialling core, very special server/server tunning and very specialized dialler with pre-planning.
1000 calls will result 23Mbit to 80Mbit bandwidth usage with SMALL packets, even that single fact can result you be banned on your hosting and require linux network stack be tunned.
You can use ICTBroadcast REST API to integerate your application with reknown autodialer , please visit following link for more detail
http://www.ictbroadcast.com/news/using-rest-api-integerate-ictbroadcast--third-party-application-autodialer
ICTBroadcast is based on asterisk communication engine
I've already done this for phone validation and for phone message broadcasting using Asterisk and Freeswitch. I would go with Freeswitch and xmlrpc:
https://wiki.freeswitch.org/wiki/Freeswitch_XML-RPC