Help on Asterisk calling out. Please direct me to right path

Hello,

I’m having Asterisk installed on an Ubuntu10.10 desktop. I have a SIP based softphone (Twinkle) installed on the same machine which is able to make calls to Asterisk. I’ve configured Asterisk to be able to talk to a remote Postgres DB and I’m successfully able to get and update data.
(Configured func_odbc.conf, odbc.ini, odbcinst.ini and written dailplan scripts (extensions.conf) to call remote Postgres DB functions to get and update data)

Now I’m supposed to implement Asterisk calling out to the softphone. I’ve been reading the documentation and figured out that I need to create “.call” files and place them in “/var/spool/asterisk/outgoing” after which Asterisk picks up these files instantaneously, reads them and calls the softphone.
My first question: Is this the only way Asterisk can call out?

Elaboration on my requirement:
I have a Java based web application written in Spring and Hibernate which talks to the same remote Postgres DB. Whenver there is any change in one of the tables in the remote DB, I should be able to call that particular user right away.
My solution to this:
Write a Spring job (can also be a CRON job or OS job) which continuously checks for changes on that table and when found it creates a “.call” file writes the necessary information in it and copies it to “/var/spool/asterisk/outgoing”. Once the file is placed here it is now the job of Asterisk to read that file and make a call.
My second question: Is there any better way that I can do a call out?

Please let me know if I’m in the right direction.

Thanks in advance!
Ram Seethiraju

You can use the manager interface. See the second topic in this forum.

You could also use cli: asterisk -rx “channel originate . . .” See the command line options for asterisk and, in asterisk cli, type core show help channel originate.

Might be more. I’m a pretty new user myself.

Thank you so much. I looked into the Asterisk Manager Interface. I’m now using asterisk-java api to make a call-out of Asterisk. Thanks again!

Hello,

I’ve been using asterisk-java api to make a call from a java program to asterisk and I’m liking it.

  • As I’ve already mentioned in my previous posts I should be able to call a user as soon as I see any change in the remote DB.
  • There may be a situation where I need to call 20 users at the same time. And each call may last for about 30mins. (Lets say that I need to monitor Events as well)
  • But here’s a catch. While these calls are going on there may be changes again in DB and I may have to call 10 more users right away. (Note that 20 calls are already made and they are still going on)
  • As each and every call that is being made from java program will make a seperate TCP connection with the Asterisk server, at this point of time there will 30 active TCP connections to the same server.
  • I guess I need to implement multi-threaded programming in order to achieve multiple calls.

Is there any API/sample program already existing which handles this type of scenario?

Thanks!
Ramachandra Rao Seethiraju

Is there anyone who can help me out?
Please let me know if I’m not clear on my problem description.

Thanks!
Ramachandra Rao Seethiraju

You seem to be asking people to design a complete system for free. There is a jobs forum for paid support.

Note that databases don’t like being rapidly polled.

I’m sorry. I guess I was not clear. I’m not asking to design the system or asking for the solution to my problem. As I said: I will need to implement multi-threading in order to achieve a solution. What I meant was: I will be needing to implement something like a “Call Manager” which handles all the simultaneous/concurrent calls (which asterisk is already doing for outgoing calls when “.call” files are placed into the spool directory)

My question was: Is there any program/API which is already developed in JAVA which does that kind of job and I can reuse it? As Asterisk is an opensource software I was expecting some good news.

Hi Sir,
Will please tell me which PRI card your using for this requirement.

Regards,
Sujith.