Assume a SIP 3xx response is a redirect unless the "redirect" parameter is explicitely false.

Works around broken providers that lack a Contact header in their CNAM answer.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5214 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2012-07-30 17:26:42 +00:00
parent 871aa79775
commit dc928d64d9
1 changed files with 2 additions and 1 deletions

View File

@ -104,7 +104,8 @@ void QuerySipChannel::disconnected(bool final, const char *reason)
void QuerySipChannel::endCnam(const NamedList& params)
{
if (!params.getBoolValue(YSTRING("redirect")))
int code = params.getIntValue(YSTRING("cause_sip"));
if (!params.getBoolValue(YSTRING("redirect"),((code / 100) == 3)))
return;
// Caller Name is in the description of the P-Asserted-Identity URI
URI ident(params.getValue(YSTRING("sip_p-asserted-identity")));