[Home]

Summary:ASTERISK-20409: sip_tech_info channels cannot be bridged, not even with themselves
Reporter:Michele Cicciotti (PrivateWave SpA) (michele cicciotti privatewave)Labels:
Date Opened:2012-09-12 10:41:41Date Closed:2012-09-19 11:03:19
Priority:MinorRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:1.8.15.1 Frequency of
Occurrence
Constant
Related
Issues:
must be completed before resolvingASTERISK-20410 Asterisk 1.8.17.0 Blockers
must be completed before resolvingASTERISK-20411 Asterisk 10.9.0 Blockers
causesASTERISK-20333 'directmedia' not working any more
is related toASTERISK-20511 Directrtpsetup does not wrk in SVN-branch-1.8-r374177
Environment:Attachments:
Description:Channels using the sip_tech_info driver cannot use the native bridge at all (they cannot even be bridged to other sip_tech_info channels). This is due to a logic mistake (I think?) in revision 366547, repeated verbatim in callbacks sip_get_udptl_peer, sip_get_rtp_peer, sip_get_vrtp_peer and sip_get_trtp_peer:

{code}
if (!(opp_chan = ast_bridged_channel(chan))) {
return AST_RTP_GLUE_RESULT_FORBID;
} else if ((opp_chan->tech != &sip_tech) || (!(opp = opp_chan->tech_pvt))) {
return AST_RTP_GLUE_RESULT_FORBID;
}
{code}

As you can see, the only channels that can be bridged are sip_tech channels with other sip_tech channels. I see two possible solutions. This one lets sip_tech and sip_tech_info channels to be bridged together, in any combination (will this work? It would be my favorite solution):

{code}
} else if ((opp_chan->tech != &sip_tech && opp_chan->tech != &sip_tech_info) || (!(opp = opp_chan->tech_pvt))) {
{code}

This one, on the other hand, lets sip_tech channels be bridged with other sip_tech channels, and sip_tech_info channels with other sip_tech_info channels:

{code}
} else if ((opp_chan->tech != chan->tech) || (!(opp = opp_chan->tech_pvt))) {
{code}

I marked this as a regression because sip_tech_info bridging used to work in 1.8.9.1, and revision 366547 wasn't meant to disable it, so I assumed this was an accidental side effect
Comments: