コード例 #1
0
ファイル: SipProxy.java プロジェクト: abhishekdixit98/cipango
  private SipURI newProxyURI(SipConnector connector, boolean applicationId) {
    SipURI rrUri = (SipURI) connector.getSipUri().clone();
    rrUri.setParameter("lr", "");

    if (applicationId) {
      AppSession appSession = _tx.getRequest().appSession();
      rrUri.setParameter(ID.APP_SESSION_ID_PARAMETER, appSession.getAppId());
    }

    return rrUri;
  }
コード例 #2
0
ファイル: SipProxy.java プロジェクト: abhishekdixit98/cipango
 public void customizeRequest(SipRequest request, SipConnection connection) {
   SipConnector connector = _tx.getRequest().getConnection().getConnector();
   if (getRecordRoute() && connection.getConnector() != connector) {
     SipURI rrUri = newProxyURI(connection.getConnector(), true);
     rrUri.setParameter(SipParams.DRR, "2");
     _branchRRUri.setParameter(SipParams.DRR, "");
     if (connector.getTransportOrdinal() == SipConnectors.TCP_ORDINAL)
       _branchRRUri.setTransportParam("tcp");
     if (connection.getConnector().getTransportOrdinal() == SipConnectors.TCP_ORDINAL)
       rrUri.setTransportParam("tcp");
     request.addRecordRoute(new NameAddr(rrUri));
   }
 }