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 boolean hasConcreteName() { return endpointID.getLocalEndpointName().indexOf("$") < 0; }
public String getEndpointId() { return this.commandEvent.getEndpointIdentifier().toString(); } }
public String encodeEndpointIdentifier(EndpointIdentifier e) { String s = e.getLocalEndpointName(); if (e.getDomainName() != null) { s += "@" + e.getDomainName(); } return s; }
String endpointName = endpointId.getLocalEndpointName(); if (endpointName.endsWith("$")) { final String[] tokens = endpointName.split("/"); buffer.append("mobicents/").append(type).append("/"); buffer.append(endpointIdPool.get()); endpointId = new EndpointIdentifier(buffer.toString(), domain); connId = new ConnectionIdentifier(buffer.toString()); response.setSecondConnectionIdentifier(connId); endpointName = secondaryEndpointId.getLocalEndpointName(); if (endpointName.endsWith("$")) { final String[] tokens = endpointName.split("/"); buffer.append("mobicents/").append(type).append("/"); buffer.append(endpointIdPool.get()); secondaryEndpointId = new EndpointIdentifier(buffer.toString(), domain);
@Override public void execute(final Object message) throws Exception { final OpenLink request = (OpenLink) message; if(request.primaryEndpointId() != null) primaryEndpointId = new EndpointIdentifier(request.primaryEndpointId(), primaryEndpointId.getDomainName()); if(request.secondaryEndpointId() != null) secondaryEndpointId = new EndpointIdentifier(request.secondaryEndpointId(), secondaryEndpointId.getDomainName()); final String sessionId = Integer.toString(session.id()); final CallIdentifier callId = new CallIdentifier(sessionId); final CreateConnection crcx = new CreateConnection(source, callId, primaryEndpointId, request.mode()); crcx.setNotifiedEntity(agent); crcx.setSecondEndpointIdentifier(secondaryEndpointId); gateway.tell(crcx, source); // Make sure we don't wait for a response indefinitely. getContext().setReceiveTimeout(Duration.create(timeout, TimeUnit.MILLISECONDS)); } }
String domainName = event.getEndpointIdentifier().getDomainName();
String endpointName = endpointId.getLocalEndpointName(); if (endpointName.endsWith("$")) { final String[] tokens = endpointName.split("/"); buffer.append("mobicents/").append(type).append("/"); buffer.append(endpointIdPool.get()); endpointId = new EndpointIdentifier(buffer.toString(), domain); connEndpointMap.put(connId.toString(), endpointId.getLocalEndpointName()); if (logger.isInfoEnabled()) { String msg = String.format("About to add connId %s for endpoint %s", connId.toString(), endpointId.getLocalEndpointName()); logger.info(msg); monitoringService.tell(new MgcpEndpointAdded(connId.toString(), endpointId.getLocalEndpointName()), self()); monitoringService.tell(new MgcpConnectionAdded(connId.toString(), endpointId.getLocalEndpointName()), self()); response.setSpecificEndpointIdentifier(endpointId); ConnectionIdentifier secondayConnId = new ConnectionIdentifier(buffer.toString()); response.setSecondConnectionIdentifier(secondayConnId); endpointName = secondaryEndpointId.getLocalEndpointName(); if (endpointName.endsWith("$")) { final String[] tokens = endpointName.split("/"); buffer.append("mobicents/").append(type).append("/"); buffer.append(endpointIdPool.get()); secondaryEndpointId = new EndpointIdentifier(buffer.toString(), domain); connEndpointMap.put(secondayConnId.toString(), secondaryEndpointId.getLocalEndpointName()); if (logger.isInfoEnabled()) {
public static int encode(byte[] destination,int offset,EndpointIdentifier endpointIdentifier) { int usedLength=0; byte[] name=endpointIdentifier.getLocalEndpointName().getBytes(); System.arraycopy(name, 0, destination, offset, name.length); usedLength=name.length; if(endpointIdentifier.getDomainName() != null) { destination[offset+usedLength]=StringFunctions.AT_BYTE; usedLength++; name=endpointIdentifier.getDomainName().getBytes(); System.arraycopy(name, 0, destination, offset+usedLength, name.length); usedLength+=name.length; } return usedLength; }
String domainName = event.getEndpointIdentifier().getDomainName();
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; }
public boolean hasConcreteName() { return endpointID.getLocalEndpointName().indexOf("$") < 0; }
public static int encode(byte[] destination,int offset,EndpointIdentifier endpointIdentifier) { int usedLength=0; byte[] name=endpointIdentifier.getLocalEndpointName().getBytes(); System.arraycopy(name, 0, destination, offset, name.length); usedLength=name.length; if(endpointIdentifier.getDomainName() != null) { destination[offset+usedLength]=StringFunctions.AT_BYTE; usedLength++; name=endpointIdentifier.getDomainName().getBytes(); System.arraycopy(name, 0, destination, offset+usedLength, name.length); usedLength+=name.length; } return usedLength; }
public String getEndpointId() { return this.commandEvent.getEndpointIdentifier().toString(); } }
String domainName = event.getEndpointIdentifier().getDomainName();
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); } }
@Override public void execute(final Object message) throws Exception { final CreateConnectionResponse response = (CreateConnectionResponse) message; if (connId == null) { connId = response.getConnectionIdentifier(); } localDesc = response.getLocalConnectionDescriptor(); // If the end point ends with a wild card we should update it. if (endpointId.getLocalEndpointName().endsWith("$")) { endpointId = response.getSpecificEndpointIdentifier(); endpoint.tell(new UpdateEndpointId(endpointId), source); } } }
public String getEndpointId() { return this.commandEvent.getEndpointIdentifier().toString(); }
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); }
@Override public void execute(final Object message) throws Exception { final CreateConnectionResponse response = (CreateConnectionResponse) message; if (connId == null) { connId = response.getConnectionIdentifier(); } localDesc = response.getLocalConnectionDescriptor(); // If the end point ends with a wild card we should update it. if (endpointId.getLocalEndpointName().endsWith("$")) { endpointId = response.getSpecificEndpointIdentifier(); endpoint.tell(new UpdateEndpointId(endpointId), source); } } }