[asterisk-users] Zap Transfer

Baskar
Fri, 15 May 2009 10:54:38 -0000

Hi,


I tried to call transfer from Zap to Zap channels using Manager Api. How to
call transfer
between Zap channels. Please give any sample code to do this work.I have
able to call transfer
from sip to sip using Manager api.


This is my code for call transfer from sip to sip


          OriginateAction originateAction;
                  hangupAction=new HangupAction();
                    ManagerResponse redirectResponse;
                  ManagerResponse hangupResponse;
                  redirectAction=new RedirectAction();

                  if(rs.next())
                 {

            channel1=rs.getString("channel");
            out.println("Channel:"+channel1);


                hangupAction.setChannel(channel1);
                redirectAction.setChannel(channel1);
                redirectAction.setContext("default");
                redirectAction.setExten(agent);
                redirectAction.setPriority(new Integer(1));
                String redirect=redirectAction.getChannel();
                managerConnection.login();
                managerConnection.addEventListener(this);

redirectResponse=managerConnection.sendAction(redirectAction, 30000);

System.out.println("redirect"+redirectResponse.getResponse());
                Thread.sleep(30000);
                managerConnection.logoff();
                }

How can Try with Zap to Zap assist me to solve the above problem or give any
link for the reference for the Zap to Zap.



--
Warm Regards,
N.Baskar
-------------- next part --------------
An HTML attachment was scrubbed...