Asterisk-java发起了call的billsec和其他数据(Asterisk-java originated call's billsec and other data)
我可以从响应事件中获取billsec或始发呼叫的持续时间吗? 我需要始发呼叫最终数据。
OriginateAction originateAction = new OriginateAction(); originateAction.setChannel("SIP/xxxxxx"); originateAction.setContext("xxxxx"); originateAction.setExten("xxxxx"); originateAction.setCallerId("xxxxx"); originateAction.setAsync(Boolean.TRUE); originateAction.setPriority(1); managerConnection.sendAction(new StatusAction()); ManagerResponse mr = managerConnection.sendAction(originateAction); //ResponseEvents mr = managerConnection.sendEventGeneratingAction(originateAction); System.out.println(mr.getResponse()); int billsec = ???Can I take billsec or duration of originated call from response event? I need originated calls final data.
OriginateAction originateAction = new OriginateAction(); originateAction.setChannel("SIP/xxxxxx"); originateAction.setContext("xxxxx"); originateAction.setExten("xxxxx"); originateAction.setCallerId("xxxxx"); originateAction.setAsync(Boolean.TRUE); originateAction.setPriority(1); managerConnection.sendAction(new StatusAction()); ManagerResponse mr = managerConnection.sendAction(originateAction); //ResponseEvents mr = managerConnection.sendEventGeneratingAction(originateAction); System.out.println(mr.getResponse()); int billsec = ???最满意答案
您需要在拨号方案中标记CDR(用户字段)或CDR(帐户代码)
之后,您可以根据请求在mysql或其他数据库中收集cdr。
You need mark CDR(userfield) or CDR(accountcode) in dialplan
After that you can collect cdr in mysql or other database on your request.
更多推荐
发布评论