[Asterisk-java-users] Originating calls
Brought to you by:
srt
From: Laurent S. <lau...@pr...> - 2005-10-06 15:37:28
|
Hello, I would like to make a small program that will be able: 1) to originate a call, 2) then send an audio message, 3) and finally hangup the call after X seconds. I have search over the web and I found that the only way=20 to make spontaneous calls was to use the Asterisk manager. Hence I am trying to use Asterisk-Java which offers among others this fonctionality. Currently I am encoutering the following problem. I succeed to login to Asterisk and initiate a call (both with the OriginateAction and with the originateCall method of AsteriskManager). String remote =3D "SIP/laurent"; originateAction =3D new OriginateAction(); originateAction.setChannel(remote); originateAction.setContext("from-sip"); originateAction.setExten("8"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Long(30000)); However in both methods I do not have as return value the identifier of = the call (or channel). (e.g.: SIP/laurent-b7485# ) Hence when I am trying to hangup the phone using the channel SIP/laurent = I am obtaining an error.=20 Is there any way to obtain easily the identifier of the channel? Otherwise what do you suggest? Just for information but I am planning to have simultaneous calls=20 to the same number. Thanking you in advance for you help, Laurent |