I’d like to have an application send two numbers to my asterisk-server. The server would then call one number, wait until the user picks up, then call the other number and connect the call to the first user so they can have a chat.
Is there allready such a module for asterisk? if not: where would you begin? which api shall i use?
According one of projects with my participation, I made something simmilar:
Sending SMS to GSM modem, then application read it and:
starts modified version of wakeup.php, which make call file and put it in spool/asterisk/outgoing - this way we make call back (or one of calls)
On connection, modified version of astcc (calling card) is started, and second number is dialed - it is transfered as additional variable.
Issues:
I have no idea how I could control parameters of first call - which is done by wakeup.php.
Codes are mix of php and perl and there aren’t many comments.
Anyway - if you want I can send them to you - under GPL of cource - they are primarilly GPL sources.
I haven’t put in public becouse they are ugly - I will some day make them better, and post them.
thanks a lot for your help! i ckecked out the originate command of the manager api and saw, that it’s pretty easy to place calls originating from the asterisk pbx by using it.
but there’s still the point of how conntecting two calls together. i’m not new to java, but pretty new to asterisk.
am i missing the obvious or is it true, that there isn’t an easy way to connect to calls that originate from the asterisk server to one call (using the asterisk as a “router” to each other), so that the two users can communicate together?
…maybe i should explain what that’s all about: i’m trying to build an j2me-client-application that would send the two numbers over a webservice to the asterisk pbx. the pbx would then first call back one number (my own mobile phone), then call the second number (the one i’d like to talk with) and finally connect them together so i can have a conversation with the other user.
now…everything is pretty obvious to me as far as it doesn’t concern the part of connecting the two calls to one call on the pbx.
[quote=“sc0000b”]…maybe i should explain what that’s all about: i’m trying to build an j2me-client-application that would send the two numbers over a webservice to the asterisk pbx. the pbx would then first call back one number (my own mobile phone), then call the second number (the one i’d like to talk with) and finally connect them together so i can have a conversation with the other user.
now…everything is pretty obvious to me as far as it doesn’t concern the part of connecting the two calls to one call on the pbx.[/quote]
have you actually tried that Originate action?
i think you not, otherwise you’d not have such questions any more.
this actions sends 2 numbers to asterisk, then first number rings. after you pickup first, then second starts to ring. when second is picked up you can talk.
isn’t this what you need?
if got this in my extensions_additional.conf (i’m working with trixbox(.org)):
[outrt-002-default_outside]
include => outrt-002-default_outside-custom
exten => _9X.,1,Macro(dialout-trunk,2,${EXTEN:1},,)
exten => _9X.,n,Macro(outisbusy,)
; end of [outrt-002-default_outside]
Does that mean, that it would do a call from the local-extension 234567 to the outside-number 123456? What if I don’t know in advance if the caller and/or callee are local extensions on my pbx?
My plan is to have a j2me-application on a mobilephone send the caller and callee number to a server-software (based on asterisk-java) which would then tell the pbx which numbers to call. Do I have to know wheter caller and/or callee are local extensions on my pbx in advance?
ermm…the question might be quite lame, but: how do i know if my context is able to do that? afaik, i only configured my voip-provider into that context.
…and by the way: is there an url you could point me to, where i can learn a little more about dialplans? i’d love to not have to ask so many dumb questions.