Allow the "earlymedia" parameter to override a missing source and create provisional RTP.

git-svn-id: http://yate.null.ro/svn/yate/trunk@6128 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2016-08-12 12:38:07 +00:00
parent 2a0c76f8d5
commit 813bd8fd18
1 changed files with 3 additions and 4 deletions

View File

@ -6445,13 +6445,12 @@ bool YateSIPConnection::emitPRACK(const SIPMessage* msg)
// Creates a SDP for provisional (1xx) messages
MimeSdpBody* YateSIPConnection::createProvisionalSDP(Message& msg)
{
if (!msg.getBoolValue(YSTRING("earlymedia"),true))
// check if we are forwarding RTP or our peer can source at least audio data
if (!msg.getBoolValue(YSTRING("earlymedia"),m_rtpForward
|| (getPeer() && getPeer()->getSource())))
return 0;
if (m_rtpForward)
return createPasstroughSDP(msg);
// check if our peer can source at least audio data
if (!(getPeer() && getPeer()->getSource()))
return 0;
if (m_rtpAddr.null())
return 0;
if (s_1xx_formats)