public Object extract(Object input) { if (inputType == REQUEST) { return ((SipServletRequest) input).getRequestURI(); } else { return ((Address) input).getURI(); } } }
public Object extract(Object input) { return ((Address) input).getDisplayName(); } }
public SipServletRequest createRequest(SipApplicationSession sipAppSession, String method, Address from, Address to, String handler, String originalCallId, String fromTagToUse) { if (logger.isDebugEnabled()) { logger .debug("Creating new SipServletRequest for SipApplicationSession[" + sipAppSession + "] METHOD[" + method + "] FROM_A[" + from + "] TO_A[" + to + "]"); } validateCreation(method, sipAppSession); try { //javadoc specifies that a copy of the address should be done hence the clone return createSipServletRequest(sipAppSession, method, (Address)from.clone(), (Address)to.clone(), handler, originalCallId, fromTagToUse); } catch (ServletParseException e) { logger.error("Error creating sipServletRequest", e); return null; } }
from.getURI().removeParameter(param); from.removeParameter(TAG_PARAM); .createAddress(((URIImpl)from.getURI()).getURI()); fromAddress.setDisplayName(from.getDisplayName()); throw new ServletParseException("Impossoible to parse the given From " + from.toString(), pe); to.getURI().removeParameter(param); to.removeParameter(TAG_PARAM); .createAddress(((URIImpl)to.getURI()).getURI()); toAddress.setDisplayName(to.getDisplayName()); throw new ServletParseException("Impossoible to parse the given To " + to.toString(), pe); URIImpl requestURI = (URIImpl)to.getURI().clone();
/** * {@inheritDoc} */ public void pushPath(Address uri) { checkReadOnly(); if(!Request.REGISTER.equalsIgnoreCase(((Request)message).getMethod())) { throw new IllegalStateException("Cannot push a Path on a non REGISTER request !"); } if(uri.getURI() instanceof TelURL) { throw new IllegalArgumentException("Cannot push a TelUrl as a path !"); } if (logger.isDebugEnabled()) logger.debug("Pushing path into message of value [" + uri + "]"); try { javax.sip.header.Header p = SipFactoryImpl.headerFactory .createHeader(PathHeader.NAME, uri.toString()); this.message.addFirst(p); } catch (Exception e) { logger.error("Error while pushing path [" + uri + "]"); throw new IllegalArgumentException("Error pushing path ", e); } }
@Override public synchronized void dial() throws CallException { assertState(QUEUED); // Try to negotiate media with a packet relay end point. try { relayEndpoint = session.getPacketRelayEndpoint(); userAgentConnection = session.createConnection(relayEndpoint); userAgentConnection.addObserver(this); userAgentConnection.connect(ConnectionMode.SendRecv); block(1); if(!MgcpConnection.HALF_OPEN.equals(userAgentConnection.getState())) { throw new Exception(mmsTimedOutException()); } final byte[] offer = patchMedia(server.getExternalAddress(), userAgentConnection.getLocalDescriptor().toString().getBytes()); initialInvite.setContent(offer, "application/sdp"); initialInvite.send(); } catch(final Exception exception) { cleanup(); setState(FAILED); fireStatusChanged(); final StringBuilder buffer = new StringBuilder(); buffer.append("There was an error while dialing out from "); buffer.append(initialInvite.getFrom().toString()).append(" to "); buffer.append(initialInvite.getTo().toString()); throw new CallException(exception); } }
+ addr + "]"); if (isSystemHeaderAndNotGruu(getModifiableRule(hName), (Parameterable)addr.getURI())) { logger.error("Error, can't set system header [" + hName + "]"); throw new IllegalArgumentException( try { h = SipFactoryImpl.headerFactory.createHeader(headerNameToAdd, addr .toString()); this.message.setHeader(h); } catch (ParseException e) {
public Object extract(Object input) { if (inputType == REQUEST) { return ((SipServletRequest) input).getRequestURI(); } else { return ((Address) input).getURI(); } } }
public Object extract(Object input) { return ((Address) input).getDisplayName(); } }
@Override public SipServletRequest createRequestWithCallID(SipApplicationSession sipAppSession, String method, Address from, Address to, String callID){ if (logger.isDebugEnabled()) { logger .debug("Creating new SipServletRequest for SipApplicationSession[" + sipAppSession + "] METHOD[" + method + "] FROM_A[" + from + "] TO_A[" + to + "]"); } validateCreation(method, sipAppSession); try { String handler = ((MobicentsSipApplicationSession)sipAppSession).getCurrentRequestHandler(); //javadoc specifies that a copy of the address should be done hence the clone return createSipServletRequest(sipAppSession, method, (Address)from.clone(), (Address)to.clone(), handler, callID, null); } catch (ServletParseException e) { logger.error("Error creating sipServletRequest", e); return null; } }
public Object extract(Object input) { if (inputType == REQUEST) { return ((SipServletRequest) input).getRequestURI(); } else { return ((Address) input).getURI(); } } }
public Object extract(Object input) { return ((Address) input).getDisplayName(); } }
final FromHeader fromHeader = (FromHeader) originalRequest.getHeader(FromHeader.NAME); final ToHeader toHeader = (ToHeader) originalRequest.getHeader(ToHeader.NAME); final AddressImpl currentLocalParty = (AddressImpl)this.getLocalParty().clone(); final AddressImpl currentRemoteParty = (AddressImpl)this.getRemoteParty().clone(); ((Parameters)currentRemoteParty .getAddress().getURI()).removeParameter("tag"); ((Parameters)currentLocalParty .getAddress().getURI()).removeParameter("tag");
public Object extract(Object input) { if (inputType == REQUEST) { return ((SipServletRequest) input).getRequestURI(); } else { return ((Address) input).getURI(); } } }
public Object extract(Object input) { return ((Address) input).getDisplayName(); } }
@Override public String getOriginator() { final SipURI from = (SipURI)initialInvite.getFrom().getURI(); return from.getUser(); }
@Override public String getOriginatorName() { return initialInvite.getFrom().getDisplayName(); }
@Override public String getRecipient() { final SipURI to = (SipURI)initialInvite.getTo().getURI(); return to.getUser(); }
@Override public String getOriginatorURI(){ return initialInvite.getFrom().getURI().toString(); }