/** * Check whether the given return code is a provisional response. * * @param rc * the return code * @return true when the code is provisional */ private boolean isProvisional(ReturnCode rc) { final int rval = rc.getValue(); return ((99 < rval) && (rval < 200)); }
public PacketRelayEndpoint(final ActorRef gateway, final MediaSession session, final NotifiedEntity entity, final String domain, long timeout) { super(gateway, session, entity, new EndpointIdentifier("mobicents/relay/$", domain), timeout); } }
public String encodeEndpointIdentifier(EndpointIdentifier e) { String s = e.getLocalEndpointName(); if (e.getDomainName() != null) { s += "@" + e.getDomainName(); } return s; }
/** * Receive notification of the header of a message. Parser will call * this method to report about header reading. * * @param header * the header from the message. */ public void header(String header) throws ParseException { command = new ModifyConnection(source != null ? source : stack, new CallIdentifier("00"), endpoint, new ConnectionIdentifier("00")); command.setTransactionHandle(remoteTID); }
/** * Receive notification of the session description. Parser will call * this method to report about session descriptor reading. * * @param sd * the session description from message. */ public void sessionDescription(String sd) throws ParseException { command.setRemoteConnectionDescriptor(new ConnectionDescriptor(sd)); } }
public String encodeConnectionParm(ConnectionParm parm) { int type = parm.getConnectionParmType(); if (type == RegularConnectionParm.JITTER) { return "JI=" + parm.getConnectionParmValue(); } else if (type == RegularConnectionParm.LATENCY) { return "LA=" + parm.getConnectionParmValue(); } else if (type == RegularConnectionParm.OCTETS_RECEIVED) { return "OR=" + parm.getConnectionParmValue(); } else if (type == RegularConnectionParm.OCTETS_SENT) { return "OS=" + parm.getConnectionParmValue(); } else if (type == RegularConnectionParm.PACKETS_LOST) { return "PL=" + parm.getConnectionParmValue(); } else if (type == RegularConnectionParm.PACKETS_RECEIVED) { return "PR=" + parm.getConnectionParmValue(); } else if (type == RegularConnectionParm.PACKETS_SENT) { return "PS=" + parm.getConnectionParmValue(); } else { return ((ExtendedConnectionParm) parm).getConnectionParmExtensionName() + "=" + parm.getConnectionParmValue(); } }
public static int encode(byte[] destination,int offset,SilenceSuppression silenceSuppression) { if (silenceSuppression.getSilenceSuppression()) { destination[offset]=StringFunctions.LOW_O_BYTE; destination[offset+1]=StringFunctions.LOW_N_BYTE; return 2; } else { destination[offset]=StringFunctions.LOW_O_BYTE; destination[offset+1]=StringFunctions.LOW_F_BYTE; destination[offset+2]=StringFunctions.LOW_F_BYTE; return 3; } } }
public static int encode(byte[] destination,int offset,EchoCancellation echoCancellation) { if (echoCancellation.getEchoCancellation()) { destination[offset]=StringFunctions.LOW_O_BYTE; destination[offset+1]=StringFunctions.LOW_N_BYTE; return 2; } else { destination[offset]=StringFunctions.LOW_O_BYTE; destination[offset+1]=StringFunctions.LOW_F_BYTE; destination[offset+2]=StringFunctions.LOW_F_BYTE; return 3; } } }
public static int encode(byte[] destination,int offset,BearerInformation bearerInformation) { destination[offset]=StringFunctions.LOW_E_BYTE; destination[offset+1]=StringFunctions.COLON_BYTE; if (BearerInformation.ENC_METHOD_A_LAW == bearerInformation.getEncodingMethod()) { destination[offset+2]=StringFunctions.HIGH_A_BYTE; return 3; } else if (BearerInformation.ENC_METHOD_MU_LAW == bearerInformation.getEncodingMethod()) { destination[offset+2]=StringFunctions.LOW_M_BYTE; destination[offset+3]=StringFunctions.LOW_U_BYTE; return 4; } return 2; } }
public ConferenceEndpoint(final ActorRef gateway, final MediaSession session, final NotifiedEntity agent, final String domain, long timeout, String endpointName) { super(gateway, session, agent, new EndpointIdentifier(endpointName==null?conferenceEndpointName:endpointName, domain), timeout); } }
/** * Check whether the given return code is a provisional response. * * @param rc * the return code * @return true when the code is provisional */ private boolean isProvisional(ReturnCode rc) { final int rval = rc.getValue(); return ((99 < rval) && (rval < 200)); }
/** * Receive notification of the session description. Parser will call * this method to report about session descriptor reading. * * @param sd * the session description from message. */ public void sessionDescription(String sd) throws ParseException { response.setLocalConnectionDescriptor(new ConnectionDescriptor(sd)); } }
public static int encode(byte[] destination,int offset,SilenceSuppression silenceSuppression) { if (silenceSuppression.getSilenceSuppression()) { destination[offset]=StringFunctions.LOW_O_BYTE; destination[offset+1]=StringFunctions.LOW_N_BYTE; return 2; } else { destination[offset]=StringFunctions.LOW_O_BYTE; destination[offset+1]=StringFunctions.LOW_F_BYTE; destination[offset+2]=StringFunctions.LOW_F_BYTE; return 3; } } }
public static int encode(byte[] destination,int offset,EchoCancellation echoCancellation) { if (echoCancellation.getEchoCancellation()) { destination[offset]=StringFunctions.LOW_O_BYTE; destination[offset+1]=StringFunctions.LOW_N_BYTE; return 2; } else { destination[offset]=StringFunctions.LOW_O_BYTE; destination[offset+1]=StringFunctions.LOW_F_BYTE; destination[offset+2]=StringFunctions.LOW_F_BYTE; return 3; } } }
public static int encode(byte[] destination,int offset,BearerInformation bearerInformation) { destination[offset]=StringFunctions.LOW_E_BYTE; destination[offset+1]=StringFunctions.COLON_BYTE; if (BearerInformation.ENC_METHOD_A_LAW == bearerInformation.getEncodingMethod()) { destination[offset+2]=StringFunctions.HIGH_A_BYTE; return 3; } else if (BearerInformation.ENC_METHOD_MU_LAW == bearerInformation.getEncodingMethod()) { destination[offset+2]=StringFunctions.LOW_M_BYTE; destination[offset+3]=StringFunctions.LOW_U_BYTE; return 4; } return 2; } }
public IvrEndpoint(final ActorRef gateway, final MediaSession session, final NotifiedEntity agent, final String domain, long timeout, String endpointName) { super(gateway, session, agent, new EndpointIdentifier(endpointName==null?ivrEndpointName:endpointName, domain), timeout); this.agent = agent; }
/** * Check whether the given return code is a provisional response. * * @param rc * the return code * @return true when the code is provisional */ private boolean isProvisional(ReturnCode rc) { final int rval = rc.getValue(); return ((99 < rval) && (rval < 200)); }
public BridgeEndpoint(ActorRef gateway, MediaSession session, NotifiedEntity agent, String domain, long timeout, String endpointName) { super(gateway, session, agent, new EndpointIdentifier(endpointName==null?bridgeEndpointName:endpointName, domain), timeout); }
public void processMgcpResponseEvent(JainMgcpResponseEvent event) { //NotifucationRequest response expected only NotificationRequestResponse evt = (NotificationRequestResponse) event; switch (event.getReturnCode().getValue()) { case ReturnCode.TRANSACTION_EXECUTED_NORMALLY : break; } }
public BridgeEndpoint(final ActorRef gateway, final MediaSession session, final NotifiedEntity agent, final String domain, long timeout) { super(gateway, session, agent, new EndpointIdentifier(bridgeEndpointName, domain), timeout); }