Fixed bug: don't advertise RFC2833 telephone event support when missing and rtp is forwarded.

git-svn-id: http://yate.null.ro/svn/yate/trunk@5275 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2012-09-19 12:55:17 +00:00
parent c0a1420b5e
commit 1204460b32
1 changed files with 10 additions and 3 deletions

View File

@ -327,9 +327,16 @@ MimeSdpBody* SDPSession::createSDP(const char* addr, ObjList* mediaList)
SDPMedia* m = static_cast<SDPMedia*>(ml->get());
int rfc2833 = 0;
if ((m_rfc2833 >= 0) && m->isAudio()) {
rfc2833 = m->rfc2833().toInteger(m_rfc2833);
if (rfc2833 < 96 || rfc2833 > 127)
rfc2833 = 101;
if (!m_rtpForward) {
rfc2833 = m->rfc2833().toInteger(m_rfc2833);
if (rfc2833 < 96 || rfc2833 > 127)
rfc2833 = 101;
}
else if (m->rfc2833().toBoolean(true)) {
rfc2833 = m->rfc2833().toInteger();
if (rfc2833 < 96 || rfc2833 > 127)
rfc2833 = 0;
}
}
String mline(m->fmtList());
ObjList* l = mline.split(',',false);