[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

Asterisk dialing out from system

Hi,

we are designing our own system and want to be able to dial our clients using a mysql database with their phone numbers in. We then want a pre-recorded message played to them. Somthing like:

 " Welcome to XXXXX we have now activated your account.
Press 1 If you understand and would like to end the call.
Press 2 If you would like to speak to an Agent about your account."

For both instances I would like the results of either pressing 1 or 2 to be stored into a mysql database. Also I would want to store if the call was picked up, dead number etc...

Main sssue we are having is that we can only initiate calls directly from extensions currently, as the example below is shown. This example means that extension 4003 rings and then the other number is rang. How can we get the system to do this itself, without the need for a physical phone to be plugged in?

Action: Originate
Channel: SIP/4003
Context: test3
CallerID: 01613584781
CallerIDName: Jason
Exten: 9078424551450
Priority: 1

Open in new window

0
andybrooke
Asked:
andybrooke
1 Solution
 
grbladesCommented:
I think your problem is that you have the call file doing things the wrong way round. You are having it call the phone 4003 and then when answered put it through to the extension which dials the customer.
I think what you want is something like the following which would call the customer and if answered would put it through to an extension which would play the recording and offer the ivr menu.
Channel: Zap/1/078424551450
MaxRetries: 0
RetryTime: 60
WaitTime: 30
Context: ivr-menu
Extension: menu1
Priority: 2

Open in new window

0
 
kode99Commented:
I imagine this is relating to the other question you posted about AMI originate.

Now I see what you are trying to do.

The problem with the original is you were trying to use the outgoing channel but also pointing it toward a dialplan context/extension that was trying to dial the same channel.  

grblades has posted a call file that addresses the same issue,  you have to point the originate to a point in the dialplan that will do the prompting etc.

So if you dial using a similar AMI originate as the other question but change where it points on the extension and context,

Action: Originate
Channel: SIP/VoipUnlimited/908457203040
Context: callouttest
CallerID: 01613584515
CallerIDName: Jason
Exten: 1001
Priority: 1

where the context in the dialplan is something like,

[callouttest]
exten => 1001,1,Answer()
exten => 1001,n,Wait(1)
exten => 1001,n,Playback(tt-monkeys)
exten => 1001,n,Hangup

So with this case it will dial out the 908 number on the sip provider.  The line will ring and when and when the 908 number is answered Asterisk will pick up and after a 1 second pause playback the screaming monkeys.  Without the need for the internal extension to be used.

A couple of simple examples of IVR using the Background,

This one is started via a call file and is an example of the same type of call out you are doing,
http://voip-info.info/wiki/view/Asterisk+auto-dial+out+deliver+message#comment_38218

This is a basic IVR for incoming calls.  You probably would not use the 's' extension but the originate can point to the mainmenu context,  s extension at priority 1 to start it off.

http://www.voip-info.org/wiki/view/Asterisk+tips+ivr+menu
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now