Added support for following forked transactions' 1xx provisional messages.
git-svn-id: http://voip.null.ro/svn/yate@6318 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
1a8b055ed2
commit
7de893f3c1
|
@ -154,6 +154,11 @@
|
||||||
; This parameter is applied on reload
|
; This parameter is applied on reload
|
||||||
;fork=enable
|
;fork=enable
|
||||||
|
|
||||||
|
; fork_early: bool: Also follow forked 1xx on early dialogs
|
||||||
|
; Ignored if fork following on 2xx is disabled
|
||||||
|
; This parameter is applied on reload
|
||||||
|
;fork_early=disable
|
||||||
|
|
||||||
; progress: bool: Send an "183 Session Progress" just after successfull routing
|
; progress: bool: Send an "183 Session Progress" just after successfull routing
|
||||||
;progress=disable
|
;progress=disable
|
||||||
|
|
||||||
|
|
|
@ -672,6 +672,7 @@ private:
|
||||||
bool m_prack;
|
bool m_prack;
|
||||||
bool m_info;
|
bool m_info;
|
||||||
bool m_fork;
|
bool m_fork;
|
||||||
|
bool m_forkEarly;
|
||||||
bool m_foreignAuth;
|
bool m_foreignAuth;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4555,6 +4556,7 @@ void YateSIPEngine::initialize(NamedList* params)
|
||||||
params = &dummy;
|
params = &dummy;
|
||||||
lazyTrying(params->getBoolValue("lazy100",false));
|
lazyTrying(params->getBoolValue("lazy100",false));
|
||||||
m_fork = params->getBoolValue("fork",true);
|
m_fork = params->getBoolValue("fork",true);
|
||||||
|
m_forkEarly = params->getBoolValue("fork_early",false);
|
||||||
m_flags = params->getIntValue("flags",m_flags);
|
m_flags = params->getIntValue("flags",m_flags);
|
||||||
m_foreignAuth = params->getBoolValue("auth_foreign",false);
|
m_foreignAuth = params->getBoolValue("auth_foreign",false);
|
||||||
m_reqTransCount = params->getIntValue("sip_req_trans_count",4,2,10,false);
|
m_reqTransCount = params->getIntValue("sip_req_trans_count",4,2,10,false);
|
||||||
|
@ -4572,12 +4574,18 @@ void YateSIPEngine::initialize(NamedList* params)
|
||||||
|
|
||||||
SIPTransaction* YateSIPEngine::forkInvite(SIPMessage* answer, SIPTransaction* trans)
|
SIPTransaction* YateSIPEngine::forkInvite(SIPMessage* answer, SIPTransaction* trans)
|
||||||
{
|
{
|
||||||
if (m_fork && trans->isActive() && (answer->code/100) == 2)
|
if (m_fork && (answer->code > 100) && trans->isActive()) {
|
||||||
{
|
switch (answer->code / 100) {
|
||||||
Debug(this,DebugNote,"Changing early dialog tag because of forked 2xx");
|
case 1:
|
||||||
trans->setDialogTag(answer->getParamValue("To","tag"));
|
if (!m_forkEarly)
|
||||||
trans->processMessage(answer);
|
break;
|
||||||
return trans;
|
// fall through
|
||||||
|
case 2:
|
||||||
|
Debug(this,DebugNote,"Changing early dialog tag because of forked %d",answer->code);
|
||||||
|
trans->setDialogTag(answer->getParamValue("To","tag"));
|
||||||
|
trans->processMessage(answer);
|
||||||
|
return trans;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return SIPEngine::forkInvite(answer,trans);
|
return SIPEngine::forkInvite(answer,trans);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue