Call Redirect using Asterisk Java

I am facing problems in redirecting a call to another extension.

What I am doing:

  1. Dial to SIP/phone1
  2. Redirect SIP/phone1 to extension 2428

But I am getting response from Redirect Action as “Channel not exist: SIP/phone1”

Please help me if you have a solution. Also please let me know what are the steps required for Call redirection using Asterisk Java.

Thanks in advance.

I believe that operation requires the incoming channel not the outgoing technology/address.

Actually u’ll need both, the incoming channel and the context and the extension to where you want to redirect this channel.
Note that Channel differ from the Technology/Address. which mean that if you want to redirect a call initiated by SIP/phone1 you’ll need the channel identifier which is created dynamically whenever SIP/phone1 initiates a call and this identifier is different for each call.
In AsteriskJava there is an interface called AsteriskChannel with attribute Id. so what you have to do is to get the channel id and use it in the RedirectAction.

For clarity.

By outgoing technology/address, I was refering to the original one. The example gave SIP/Phone1, but nowhere should you specify this. If, for example, the call originated from SIP/trunkX, you will need SIP/trunkX-hhhhhhh, where hhhhhhh is the suffix added to uniquely identify the channel amongst existing calls.

Redirect doesn’t actually use any technology/address type addresses at all; it uses context|extension|priority for the new outgoing side.

(One other possibility is that the OP atually wants forwarding, in which case it is done in the dialplan.)