Translate between SIP Remote-Party-ID fields "party" and "id-type" and Yate parameters "remote_party" and "remote_id_type".

git-svn-id: http://yate.null.ro/svn/yate/trunk@4083 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-01-28 13:53:30 +00:00
parent 56ed6de9dc
commit 0ff37e944c
1 changed files with 12 additions and 0 deletions

View File

@ -675,6 +675,12 @@ static void copyPrivacy(Message& msg, const SIPMessage& sip)
tmp = uri.getHost();
if (tmp)
msg.setParam("privacy_domain",tmp);
const String* str = hl->getParam("party");
if (!TelEngine::null(str))
msg.setParam("remote_party",*str);
str = hl->getParam("id-type");
if (!TelEngine::null(str))
msg.setParam("remote_id_type",*str);
}
}
@ -722,6 +728,12 @@ static void copyPrivacy(SIPMessage& sip, const Message& msg)
hl->setParam("privacy","uri");
else
hl->setParam("privacy","none");
const char* str = msg.getValue("remote_party");
if (str)
hl->setParam("party",str);
str = msg.getValue("remote_id_type");
if (str)
hl->setParam("id-type",str);
sip.addHeader(hl);
}
if (rfc3323.null()) {