Media formats lists are updated with information from routing.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1240 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
420825aa03
commit
11aaeeffb8
|
@ -3135,6 +3135,28 @@ bool YateSIPConnection::callRouted(Message& msg)
|
|||
setStatus("redirected");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_rtpMedia) {
|
||||
// update formats lists
|
||||
unsigned int n = msg.length();
|
||||
for (unsigned int i = 0; i < n; i++) {
|
||||
const NamedString* p = msg.getParam(i);
|
||||
if (!p)
|
||||
continue;
|
||||
// search for formats_MEDIANAME parameters
|
||||
String tmp = p->name();
|
||||
if (!tmp.startSkip("formats",false))
|
||||
continue;
|
||||
if (tmp && (tmp[0] != '_'))
|
||||
continue;
|
||||
if (tmp.null())
|
||||
tmp = "audio";
|
||||
NetMedia* rtp = static_cast<NetMedia*>(m_rtpMedia->operator[](tmp));
|
||||
if (rtp && rtp->update(*p))
|
||||
Debug(this,DebugNote,"Formats for '%s' changed to '%s'",tmp.c_str(),p->c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if (msg.getBoolValue("progress",s_cfg.getBoolValue("general","progress",false)))
|
||||
m_tr->setResponse(183);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue