I'm trying to setup an IVR or to be more specific an automated attendant using Asterisk. I don't want anything fancy besides the simple automated menu system, and instead of dialing an extension (for now) just ring the same phone line (POTS) if pressed 1 or play a recording if pressed 2. The server running Asterisk will be in a remote location.
My questions are:
Is this setup doable?
Do I need to sign up with a IAX VOIP
provider? (no VOIP calls will be
made/received) Only normal POTS calls will be made. (possible in other country)
What hardware do I
need? Remote server side and client-wise
(POTS phone line)
Any comments will be appreciate it.
Thanks
This is definitely doable, however, it seems that your specifications need to be modified a bit. Here are some things to consider:
What type of PSTN connectivity will your remote Asterisk server have? (SIP / POTS / T1 / PRI / etc.)
If your remote Asterisk server is going to be using a physical medium, do you have the connectors and hardware in place? EG: If you are using a T1 line, do you have a channel bank or T1 card?
Are you comfortable with Asterisk dialplan / AGI / AMI, or are you going to use an Asterisk distribution like trixbox, AsteriskNOW, Elastix, etc?
Will your client location (with the POTS line you wish to ring) have a PBX, or will it just be a typical POTS line hooked up to an analog handset?
My recommendation to you:
Get a cheap server (any 1U with a dual core processor and 512MB of RAM will do), and put it at your remote location.
Load Asterisk 1.6+ onto your server. I recommend 1.6+ as it can use the dahdi_dummy driver as a reliable software timing source (it will ensure that your audio quality is not choppy and broken).
Get a SIP account with a reliable SIP provider. My personal favorites are: flowroute and voipms.
Set up your new SIP account in Asterisk, and purchase a DID (phone number). This phone number will be your business phone number, the one that you give out to clients and put on business cards.
Configure your Asterisk dialplan to receive calls from your SIP account to your IVR menu.
Your IVR menu logic should be something like:
a. Play the IVR menu.
b. Wait for a keypress.
c. If the user dialed '1', then make an outgoing SIP call to the POTS line phone number you want to reach. If the user dialed '2', then playback the recorded message.
Now, if you are looking to save money, and have the most cost-effective setup for your remote IVR, I would recommend throwing up a second Asterisk server on site at your client location (where the POTS line comes in), and throw away the pots line and just setup an IAX2 trunk between your client location and your hosted server location. This way, when calls come in to your remote Asterisk server via your SIP provider, you can route the calls (when the user hits option 1) over your IAX2 trunk, directly to the client location for free!
Depending on your skill level, and comfort with Asterisk, this could be either a really fun learning experience or a confusing nightmare. If you would like to learn more about telephony and Asterisk, especially if you are going to use it for your business, you may want to use a simple (free) Asterisk distribution like: trixbox CE, Elastix, or AsteriskNOW.
You could code up a simple IVR in less time than it takes to install Asterisk if you use a hosted service like Twilio or Tropo. I'm partial to Twilio myself.
Edit: here's an example of a simple phone menu.
Quick answers to your simple questions:
this setup is doable.
no, IAX is not neccessary
some hardware setups are listed in wiki
I think you should start with wiki and free Asterisk book
Related
NET experts,
I have a scenario where a 4-port PSTN card is installed in a server and I have installed Freebpx on that server as per suggestion by someone. When a call comes on any of the PSTN line, it is forwarded to one of the operators on his hard phone.
Each operator is also having a computer screen at his table, powered by an individual CPU. This runs our CRM software to be handled by operator. When a call arrives to an operator hard phone, say operator 2, we want that the Caller number should also be displayed in the CRM software. Based on this caller number, operator can enter some information related to the Caller and save it in database via our CRM software. Also, when operator disconnect the call, we should receive call stop time for statistics later on.
Thus, we need caller number and call start time when a call is picked by an operator on his hard phone. and then we need call end time when a call is finished.
Can someone help us how we can achieve this? Do we have to capture the SIP packets and parse them or their is some other way to do so? Our CRM database is totally separate from the Freepbx and resides on another server.
If you want to get these events realtime, you should look at AMI (Asterisk Manager Interface - port 5038 TCP by default) and it's configuration manager.conf (note: FreePBX uses the, see manager_custom.conf).
If you want the archived version, you should set up a database server, and point the CDR (Call Detail Records) module to it. PostgreSQL or MySQL/MariaDB works just fine. Asterisk will simply ignore additional fields in the CDR as long as they can be NULL or has a DEFAULT value. This can be used to store custom data.
I'm trying to complete software which does all call logic via AMI on it's own using Asterisk only as interface to VOIP, SIP/GSM. Almost everything works great, but...:
Here is my scenario:
- incoming call is forwarded to announcement and then to MOH forever
- my app decides which extensions to dial (7777) using AMI Action: Originate
- once somebody picks up on extension, his/her channel (SIP/306-xxxxx for example) is bridged with waiting call's channel using AMI Action: Bridge
Until this point everything is working fine, both connected parties can hear each other, recording on demand works. All is fine.
Now I'm trying to make assisted transfer to another extension (Atxfer) using AMI on one of the bridged channels. And it doesn't work. I got couple of ami events about DTMF's on a channel (audio is muted while they are played). Every DTMF digit couses quick Bridge:unlink and Bridge:link event on AMI.
I tried to change dtmfmode, upgrade from asterisk 1.8 to 11 (asterisk now) and it always was the same.
While having this problems with Atxfer blind transfer on those channels works (using AMI Action: Redirect).
full log shows nothing something like this:
[2013-11-11 20:24:57] DEBUG[9457]: features.c:3740 feature_interpret: Feature interpret: chan=SIP/306-00000017, peer=SIP/GTS-00000016, code=*2, sense=1, features=0, dynamic=apprecord#apprecord
I recommend you read some asterisk book for beginner like ORelly's "Asterisk the future of telephony".
In you case correct solution is use asterisk Dial command for first channel instead of second call creation.
It is not clear how you do transfer using AMI. If you want do it via ami(which is VERY bad way), you have do something like following
On transfer request(digit) unbridge channels. Better put it in AsyncAGI after that.
Collect digits where to transfer using Read command
Transfer to new destination
If fail bridge again
NOTE: You resulting application will be really buggy and not scalable. AMI interface is not designed to do such things and work very bad when you have alot of actions and channels running on same box. So you have test your app under hi concurrent load to ensure it work(or more likly not work).
I have been going back and forth trying out wanting to find a way for a way to communicate via LAN / WiFi easily, and making a call via LAN network would be great, so i tried asterisk a few times and lost in the way, i cant seem make it work, and the e-book i purchased endorsed me to purchase a Digium hardwares to proceed, it's not possible for me to do so, i live halfway around the world from america and a day's flight from a big city.
I'm willing to learn, but it seems each time i went in it, i got lost somehow. i know basics of linux and virtualbox, but not too much though, and this asterisk felt it's still another level for me.
My question is, is it possible to use asterisk or asterisknow by digium without their hardwares if it's only for LAN usage ? is it even a viable thing to do ?
Of course it is possible.
All you need is one server and two sip phones, SW or HW to make them talk to each other.
so on the server where you installed asterisk set two peers in /etc/asterisk/sip.conf:
(this is just an example)
[101]
disallow=all
host=192.168.1.3 ; IP address of your first phone
;secret=101 ;uncomment if you want to use host=dynamic, less secure, use 'bigger' secret
type=friend
dtmfmode=rfc2833
allow=alaw
qualify=yes
canreinvite=yes
insecure=port
context=dial-local
[102]
disallow=all
host=192.168.1.4 ; IP address of your second phone
;secret=102 ;uncomment if you want to use host=dynamic, less secure, use 'bigger' secret
type=friend
dtmfmode=rfc2833
allow=alaw
qualify=yes
canreinvite=yes
insecure=port
context=dial-local
than in your /etc/asterisk/extensions.conf set context dial-local like:
[dial-local]
exten => _X.,1,n,Dial(SIP/${EXTEN})
Than you need to reload your new configurations from asteriskCLI> dialplan reload and sip relaod or execute in terminal:
asterisk -rx "dialplan reload";
asterisk -rx "sip reload";
all you need to do now is to register your 2 phone to server
You can chose from many free SW phone out there, I recommend 3CX for Win/Android and Linphone for Linux.
On the softphone all you need to configure is username (101 and 102), secret (101 and 102) and server IP (192.168.1.2 in this case).
Now start up server and both phones, and if you see them 'on hock', dial 102 or 101 :)
Your question is a bit difficult to understand, but I'll take a stab at it anyway. Yes, you can use Asterisk via LAN only if what you want to do is "desk to desk" calls. That is the entire concept behind Voice Over IP -- no need for traditional copper pair wires.
The two protocols you will want to look into most are SIP and IAX2. Check the links below for reading material you'll need to study up on.
https://en.wikipedia.org/wiki/Voice_over_IP
https://en.wikipedia.org/wiki/Session_Initiation_Protocol
https://en.wikipedia.org/wiki/IAX2
http://www.jkl5group.com/index.php?page=emg-vs-fud
http://www.rohitmenon.com/index.php/howto-connect-2-phones-and-make-a-simple-call-using-asterisk/
If you're familiar with "LAMP" server environments, you should have no serious difficulties in getting an Asterisk PBX set up and able to make a call between two SIP phones.
Good luck with it!
Asterisk is an open source project - you can run calls through it without paying Digium a penny. They offer great value extensions e.g. telephones, phone cards and asterisk turnkey systems - it is a balance between how much effort you wish to spend.
There are free sip providers out there too - so Asterisk + a SIP gateway + a SIP client will allow you to make and receive calls without spending a penny / cent!
I am trying to build an application where I am required to record and playback simultaneously. The application needs to go live on an asterisk telephony server. My problem is:
A user calls the asterisk server and starts to speak.
The voice packets being sent by the user are recorded in a wav file on the system.
A copy of the voice packets are sent as feedback simultaneously.
I have taken a look at ChanSpy, but it will not work if one is using Record.
My questions:
1. If a user calls an asterisk server, does that channel become a simplex or half-duplex channel?
2. Are there any commands etc. that allow us to do the above?
3. If not, does that mean I need to go into C programming for asterisk (agi-bin)?
P.S: Please let me know in case more information is needed.
Why not try MixMonitor? That allows you to record the call, and doesn't interfere with ChanSpy usage. ChanSpy IS the best way to do this, by the way.
You are wanting to feed to voice channel from the caller back to the same caller correct?
Have you tried the Echo command?
What all would be the requirements for the following scenario:
A GSM modem connected to a PC running
a web based (ASP.NET) application. In
the application the user selects a
phone number from a list of phone nos.
When he clicks on a button named the
PC should call the selected phone
number. When the person on the phone
responds he should be able to have a
conversation with the PC user.
Similarly there should be a facility
to send SMS.
Now I don't want any code listings. I just need to know what would be the requirements besides asp.net, database for storing phone numbers, and GSM modem.
Any help in terms of reference websites would be highly appreciated.
I'll pick some points of your very broad question and answer them. Note that there are other points where others may be of more help...
First, a GSM modem is probably not the way you'd want to go as they usually don't allow for concurrency. So unless you just want one user at the time to use your service, you'd probably need another solution.
Also, think about cost issues - at least where I live, providing such a service would be prohibitively expensive using a normal GSM modem and a normal contract - but this is drifting into off-topicness.
The next issue will be to get voice data from the client to the server (which will relay it to the phone system - using whatever practical means). Pure browser based functionality won't be of much help, so you would absolutely need something plugin based.
Flash may work, seeing they provide access to the microphone, but please don't ask me about the details. I've never done anything like this.
Also, privacy would be a concern. While GSM data is encrypted, the path between client and server is not per default. And even if you use SSL, you'd have to convince your users trusting you that you don't record all the conversations going on, but this too is more of a political than a coding issue.
Finally, you'd have to think of bandwidth. Voice uses a lot of it and also it requires low latency. If you use a SIP trunk, you'll need the bandwidth twice per user: Once from and to your client and once from and to the SIP trunk. Calculate with 10-64 KBit/s per user and channel.
A feasible architecture would probably be to use a SIP trunk (they optimize on using VoIP as much as possible and thus can provide much lower rates than a GSM provider generally does. Also, they allow for concurrency), an Asterisk box (http://www.asterisk.org - a free PBX), some custom made flash client and a custom made SIP client on the server.
All in all, this is quite the undertaking :-)
You'll need a GSM library. There appear to be a few of these.
e.g. http://www.wirelessdevstudio.com/eng/
Have a look at the Ekiga project at http://www.Ekiga.org.
This provides audio and or video chat between users using the standard SIP (Session Initiation Protocol) over the Internet. Like most SIP clients, it can also be used to make calls to and receive calls from the telephone network, but this requires an account with a commercial service provider (there are many, and fees are quite reasonable compared to normal phone line accounts).
Ekiga uses the open source OPAL library to implement SIP communications (OPAL has support for several VoIP and video over IP standards - see www.opalvoip.org for more info).