preserve transfer-capability in Q.931 -> Q.931 calls

This is important so udi/rdi doesn't get converted to speech.
This commit is contained in:
Harald Welte 2022-03-04 12:11:02 +01:00
parent 4679853a20
commit 02ab7441ae
2 changed files with 4 additions and 2 deletions

View File

@ -1297,6 +1297,7 @@ SignallingEvent* ISDNQ931Call::processMsgSetup(ISDNQ931Message* msg)
msg->params().setParam("callednumtype",m_data.m_calledType);
msg->params().setParam("callednumplan",m_data.m_calledPlan);
msg->params().setParam("overlapped",String::boolText(m_overlap));
msg->params().setParam("transfer-cap",m_data.m_transferCapability);
return new SignallingEvent(SignallingEvent::NewCall,msg,this);
}
@ -1655,7 +1656,7 @@ bool ISDNQ931Call::sendSetup(SignallingMessage* sigMsg)
if (q931()->parserData().flag(ISDNQ931::ForceSendComplete))
msg->appendSafe(new ISDNQ931IE(ISDNQ931IE::SendComplete));
// BearerCaps
m_data.m_transferCapability = "speech";
m_data.m_transferCapability = sigMsg->params().getValue(YSTRING("transfer-cap"), "speech");
m_data.m_transferMode = "circuit";
m_data.m_transferRate = "64kbit";
m_data.m_format = sigMsg->params().getValue(YSTRING("format"),q931()->format());

View File

@ -1085,7 +1085,7 @@ SigChannel::SigChannel(SignallingEvent* event)
// call.preroute message
m_route = message("call.preroute",false,true);
// Parameters to be copied to call.preroute
static String params = "caller,called,callername,format,formats,callernumtype,callernumplan,callerpres,callerscreening,callednumtype,callednumplan,inn,overlapped";
static String params = "caller,called,callername,format,formats,callernumtype,callernumplan,callerpres,callerscreening,callednumtype,callednumplan,inn,overlapped,transfer-cap";
plugin.copySigMsgParams(*m_route,event,&params);
if (m_route->getBoolValue("overlapped") && !m_route->getValue("called"))
m_route->setParam("called","off-hook");
@ -1237,6 +1237,7 @@ bool SigChannel::startCall(Message& msg, SigTrunk* trunk)
sigMsg->params().copyParam(msg,"callednumplan");
sigMsg->params().copyParam(msg,"inn");
sigMsg->params().copyParam(msg,"calledpointcode");
sigMsg->params().copyParam(msg,"transfer-cap");
// Copy RTP parameters
if (msg.getBoolValue("rtp_forward")) {
NamedList* tmp = new NamedList("rtp");