使用java-asterisk连接到AMI后,我创建一个呼叫:
OriginateAction originateAction;
ManagerResponse originateResponse;
getEvent event = new getEvent();
SipShowPeerAction peer = new SipShowPeerAction();
peer.setPeer("phone1");
managerConnection.addEventListener(event);
originateAction = new OriginateAction();
ParkAction park = new ParkAction();
originateAction.setChannel("SIP/mark");
originateAction.setCallerId("<6002>");
originateAction.setContext("default");
originateAction.setPriority(new Integer(1));
originateAction.setExten("1304");
managerConnection.login();
managerConnection.addEventListener(event);
originateResponse = managerConnection.sendAction(peer);
originateResponse = managerConnection.sendAction(originateAction, 30000);
Thread.sleep(3000);
park.setActionId(originateAction.getActionId());
managerConnection.logoff();
我想使用Asterisk-java来保持和取消当前的通话,我在网上检查我发现我必须使用ParkAction但我真的不明白这个概念? 如果有人有想法?