开发者

Initiate an outgoing call with Asterisk

I have a database where one entry is structured like so:

number_to_call date file_to_play

Using asterisk, I need to do the following:

1. Check the database daily.

2. If date matches that of today's, then initiate call on number.

3. Once phone has been picked up, play file_to_play.

Some general pointers on how I even begin to do this would be great.

Most of the applications that I have written so far have worked on incoming calls. I have the following questions:

1. How do I write a "daemon" that will check the database? Asterisk sho开发者_如何学编程uld have both user and group privileges for it to execute properly. How do I do this?

2. Can I initiate an outgoing call from outside of the asterisk dialplan?

The calls are being made to a PSTN/mobile number.


You can Write any script Which can check DB on daily basis and once it maches the date range you can initiate a call using .call files.

Please study asterisk auto-dial out from voip-info.org - I think you can understand better then.

You can run your script for same user as asterisk runs there is also one more method to initiate call from linux which we can call Originate CLI command which can also refer to http://voip-info.org/.


In general it is not a great idea to write your own dialer, unless your volume is very very low. Where I work, we started rolling our own but at the end went with a commercial solution that handled most of the logic. There are a number of commercial and free solutions out there, so don't reinvent the wheel.

See my answer to https://stackoverflow.com/questions/11666755/outbound-dialer-using-asterisk/14589901#14589901 for why it is not a good idea to roll your own.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜