H323 warns about impossibility to forward RTP due to no remote media address.

SIP passes any disconnect reasons in the 487 answer.


git-svn-id: http://voip.null.ro/svn/yate@193 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2005-01-12 12:53:13 +00:00
parent 3ad0991821
commit 6e3e2a6f3c
2 changed files with 13 additions and 6 deletions

View File

@ -864,11 +864,15 @@ void YateH323Connection::OnEstablished()
if (m_targetid)
m->addParam("targetid",m_targetid);
m->addParam("status","answered");
if (m_passtrough && m_remotePort) {
m->addParam("rtp_forward","yes");
m->addParam("rtp_addr",m_remoteAddr);
m->addParam("rtp_port",String(m_remotePort));
m->addParam("formats",m_remoteFormats);
if (m_passtrough) {
if (m_remotePort) {
m->addParam("rtp_forward","yes");
m->addParam("rtp_addr",m_remoteAddr);
m->addParam("rtp_port",String(m_remotePort));
m->addParam("formats",m_remoteFormats);
}
else
Debug(DebugWarn,"H323 RTP passtrough with no remote address! [%p]",this);
}
Engine::enqueue(m);
}

View File

@ -191,6 +191,7 @@ private:
bool m_hungup;
bool m_byebye;
int m_state;
String m_reason;
SIPDialog m_id;
URI m_uri;
String m_target;
@ -692,7 +693,7 @@ void YateSIPConnection::clearTransaction()
if (m_tr) {
m_tr->setUserData(0);
if (m_tr->isIncoming())
m_tr->setResponse(487,"Request Terminated");
m_tr->setResponse(487,m_reason.null() ? "Request Terminated" : m_reason.c_str());
m_tr->deref();
m_tr = 0;
}
@ -890,6 +891,8 @@ SDPBody* YateSIPConnection::createSDP(const char* addr, const char* port, const
void YateSIPConnection::disconnected(bool final, const char *reason)
{
Debug(DebugAll,"YateSIPConnection::disconnected() '%s' [%p]",reason,this);
if (reason)
m_reason = reason;
setStatus("disconnected");
setTarget();
}