RE: [Asterisk-java-users] originate call without picking up the fone?!
Brought to you by:
srt
From: Jason W. <jas...@be...> - 2006-02-13 20:43:24
|
Perhaps a little explanation will help you here as I think you might have a slight misunderstanding of what is happening. When you 'originate' a call using the asterisk manager, you are sending an 'originate action' request to the asterisk server, when answered, control is passed to the server, falling through the extensions that you have in the context that you specified in the originate action... at this point you can parse events that asterisk sends out to your manager instance, or read responses that your manager get's in response to other actions (there are also 'event generating actions'). you have to parse the channel variable in the event to know which channel the event is for in your event handler code. It sounds like you want to originate call_A using originateAciton in Manager, and then, if answered and not busy, use dial() in entensions to connect to the end user, so when they pickup, they're already connected. I have a multi-threaded app which picks up calls from a database of scheduled calls and originates them. up to three numbers are used, so my app remains in contol, and releases it when I know that the call has been answered and accepted. I know it has been accepted because I set a channel variable accepted=yes in the extension and then read it with a manageraction. you have to know the channel to read it's variables... in my case i didn't know from the origination since I'm using IAX and the channel i requested doesn't equal the actual channel used... so in the first priority for the extension, I set a global named by the phone number I sent in the originate action, and the value is the channel... then I can use the channel and go from there. hope this helps. -----Original Message----- From: ast...@li... [mailto:ast...@li...]On Behalf Of Arnd Vehling Sent: Monday, February 13, 2006 3:31 PM To: Ast...@li... Subject: [Asterisk-java-users] originate call without picking up the fone?! Hi There, we are developing a dialer application using the java lib to interface with the asterisk manager protocol. It works fine so far. The only problem we have is that if we use the "originate" command the user is required to pick up the fone _before_ asterisk will originate the call to the desired destination. What we would like to do is to place the call, check if the other end is available (ringing event) and only then let the user pickup the fone. Otherwise we would only display a text message "Destination 'Busy' etc. Does anyone know if/how this is possible? cheers, Arnd ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |