- CREATE_CONNECTION_RESPONSE
- DELETE_CONNECTION_RESPONSE
- MODIFY_CONNECTION_RESPONSE
- NOTIFICATION_REQUEST_RESPONSE
- NOTIFY
- RESTART_INPROGRESS_RESPONSE
- Event type name jain.protocol.ip.mgcp.JainMgcpEvent.CREATE_CONNECTION_RESPONSE and so on
- Event type vendor and version "jain.protocol.ip.mgcp", "1.0"
- Events class: jain.protocol.ip.mgcp.JainMgcpEvent
Example
The following code may be used on the SBB to play a Voice XML script
EndpointIdentifier ivr =
new EndpointIdentifier("identifier", "ivr.mobicents.org");
CallIdentifier callID = new CallIdentifier("callID.here");
CreateConnection cc =
new CreateConnection(this, callID, ivr, ConnectionMode.SendRecv);
NotificationRequestParms parms =
new NotificationRequestParms(new RequestIdentifier("1"));
EventName en =
new EventName(PackageName.Script,MgcpEvent.tcl.
withParm("http://host.domain.com/wxml-script.wxml"));
RequestedEvent[] re =
new RequestedEvent[] {new RequestedEvent(en)};
parms.setRequestedEvents(re);
cc.setNotificationRequestParms(parms);
provider.sendMgcpEvents(new JainMgcpEvent[]{cc});
Media RA then fires a CREATE_CONNECTION_RESPONSE event
public void onCreateConnectionResponse(JainMgcpEvent event, ActivityContext ac) {
CreateConnectionResponse res = (CreateConnectionResponse) event;
ConnectionDescriptor cd = res.getLocalConnectionDescriptor();
}
or when DTMF detected
public void onNotify(JainMgcpEvent event, ActivityContext ac) {
Notify notify = (Notify) event;
JainMgcpEvents[] events = notify.getObservedEvents();
} |