Making outgoing call and playing a recorded message

2,057 views
Skip to first unread message

Surbhi

unread,
Sep 28, 2011, 1:59:39 AM9/28/11
to Adhearsion
Hi,

I would like to make an outgoing call to a mobile and play a audio
file to the callee. Is this possible using Adhearsion?

Can someone please guide me with the steps required to achieve this.

Thanks,
Surbhi

Ben Langfeld

unread,
Sep 29, 2011, 3:20:19 AM9/29/11
to adhea...@googlegroups.com
The first question is what platform are you running on?

If you are on Asterisk, you will need to use AMI to originate the call. I would recommend using call_and_exec so that you don't need any config in Asterisk. You would execute the AGI application, passing it your Ahn app's URL, including a specific context. You will then need a context in dialplan.rb to handle the call.

If you're on Tropo, you will need to use their REST API to originate the call. There's a gem for that: https://github.com/benlangfeld/tropo-rest

Regards,
Ben Langfeld



--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To post to this group, send email to adhea...@googlegroups.com.
To unsubscribe from this group, send email to adhearsion+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adhearsion?hl=en.


chirag

unread,
Sep 29, 2011, 1:49:36 AM9/29/11
to Adhearsion
Hi Surbhi,

I am also facing a similar problem. I have tried AT commands but I am
finding it difficult to use voice related AT commands and stream audit
file to receiver.

I have moved to Adhearsion now and checking it out. Looks like its
possible to play some audio to the callee. This is very similar to
audio messages being used by telephone companies to promote their
schemes.

Also check this out, http://stackoverflow.com/questions/6138949/initiate-an-outgoing-call-with-asterisk

@everyone,

Please help.

kind regards,
Chirag

Michal Mruškovič

unread,
Sep 29, 2011, 5:38:35 AM9/29/11
to Adhearsion
Hello,

you could use the Asterisk Dial A option. For example, if you want to
play the file hello.gsm, use

dial mobileNumber, :options => "A(hello)"

For more information, see http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial#Options

-M-

Ben Langfeld

unread,
Sep 29, 2011, 12:49:36 PM9/29/11
to adhea...@googlegroups.com
Dial() will obviously only work if you already have an incoming call. I presume what you actually want to do is robocalling, in which case AMI is the way forward.

Regards,
Ben Langfeld


Randy gmail

unread,
Oct 2, 2011, 2:38:22 AM10/2/11
to adhea...@googlegroups.com, adhea...@googlegroups.com
I also would like to make an outside call and play status messages from my home automation system. Is there any place I could look to get an example of how to dial out with adhearsion?

Thanks for any ideas!


Sent from my iPad

AshikAli.m

unread,
Oct 2, 2011, 4:22:54 AM10/2/11
to adhea...@googlegroups.com

There are  two ways to accomplish this, they are ,

 1. Creating Call files
 2. AMI Orinate API.

1)  It is easier for non-programmers. Just  create calls files then mv it to astersisk spool outgoing directory.
For more information, pl have look on  http://www.the-asterisk-book.com/unstable/call-file.html.

You can pass dial-out number with Channel argument. if you are using Dahdi channel then just replace with Dahdi/3/<mobile-number>
then launch your adhearsion or dialplan script. That is it!


2) It is for programmers. if you are a ruby programmer  and adhearsion installed  then pl have look on adhearsion stand-alone
    ami examples on jruby-1.6.3/lib/ruby/gems/1.8/gems/adhearsion-1.1.1/examples.  And get the dial-out number whatever the resources       you have  may be database,url ..etc. Also have look on AMI orginate samples.


Note:
Be care full on  IVR looping. It leaves you telephone bill much higher than what you expected,  if the callee does not hangs up the call.

Thanks & Regards,
Ashik Ali

--
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.                           
                                            – Antoine de Saint-Exupery      

ayodele abejide

unread,
Oct 2, 2011, 2:43:07 AM10/2/11
to adhea...@googlegroups.com
I am working on something similar, i think the originate would be the way out for you, working on something similar right now, the code is dirty but you can look @ it @:

https://github.com/bjhaid/blaster/blob/master/dialer.rb

Regards,

Bjhaid

On Sun, Oct 2, 2011 at 9:38 AM, Randy gmail <rcl...@gmail.com> wrote:



--
Abejide Ayodele
+234(0) 802 580 6662

Reply all
Reply to author
Forward
0 new messages