Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

UC-1718: Callcontroller cannot perform external calls

Instruct sipXproxy not to add SipXAuth Identity header when contact header is callcontroller
  • Loading branch information...
commit fc19b551f806f7242d0c0fec3ef4869c26e181fc 1 parent 24ad9e0
@mirceac mirceac authored
View
3  sipXcallController/src/plugin.xml
@@ -5,6 +5,9 @@
<remote-authentication-method>HTTP-DIGEST</remote-authentication-method>
<uri-prefix>/callcontroller</uri-prefix>
<sip-listener-class>org.sipfoundry.callcontroller.SipListenerImpl</sip-listener-class>
+ <![CDATA[ sip-convergence-name value is used to create the SIP contact header, added in the request.
+ sipXproxy reads the header and when the value 'callcontroller' is found, X-Sipx-Authidentity is not added, determining the phone to be challenged
+ for authentication. This value is not meant to be changed ]]>
<sip-convergence-name>callcontroller</sip-convergence-name>
<service-description>
<![CDATA[ The call controller plugin.
View
37 sipXproxy/lib/authplugins/TransferControl.cpp
@@ -151,25 +151,32 @@ TransferControl::authorizeAndModify(const UtlString& id, /**< The authenticat
}
else
{
- // Authenticated REFER
-
- // annotate the refer-to with the authenticated controller identity
- SipXauthIdentity controllerIdentity;
- controllerIdentity.setIdentity(id);
- controllerIdentity.encodeUri(target);
-
- // add the References to the refer-to.
- UtlString refcallId(callId);
- refcallId.append(";rel=refer");
- target.setHeaderParameter(SIP_REFERENCES_FIELD, refcallId.data());
+ UtlString contactString;
+ request.getContactEntry(0, &contactString);
+ Url contactUri( contactString );
+ UtlString userId;
+ contactUri.getUserId(contactString);
+
+ Os::Logger::instance().log(FAC_AUTH, PRI_DEBUG, "TransferControl::authorizeAndModify - Contact field is: %s ", contactString.data());
+
+ if (contactString != "callcontroller") {
+ // Authenticated REFER
+ // annotate the refer-to with the authenticated controller identity
+ SipXauthIdentity controllerIdentity;
+ controllerIdentity.setIdentity(id);
+ controllerIdentity.encodeUri(target);
+
+ // add the References to the refer-to.
+ UtlString refcallId(callId);
+ refcallId.append(";rel=refer");
+ target.setHeaderParameter(SIP_REFERENCES_FIELD, refcallId.data());
- Os::Logger::instance().log(FAC_AUTH, PRI_DEBUG, "TransferControl[%s]::authorizeAndModify "
+ Os::Logger::instance().log(FAC_AUTH, PRI_DEBUG, "TransferControl[%s]::authorizeAndModify "
"adding Reference field [%s] to refer-to",
mInstanceName.data(), callId.data()
);
- request.setReferToField(target.toString().data());
-
-
+ request.setReferToField(target.toString().data());
+ }
}
}
else
Please sign in to comment.
Something went wrong with that request. Please try again.