[asterisk-users] RTP address learning and timing problem
David Cunningham
dcunningham at voisonics.com
Mon Apr 17 18:50:56 CDT 2023
Hi Joshua,
Thank you for that. From the code it kind of looks like
STRICT_RTP_LEARN_TIMEOUT is a minimum, not a maximum:
if (!ast_sockaddr_isnull(&rtp->strict_rtp_address)
&& STRICT_RTP_LEARN_TIMEOUT < ast_tvdiff_ms(ast_tvnow(),
rtp->rtp_source_learn.start)) {
ast_verb(4, "%p -- Strict RTP learning complete - Locking on source address
%s\n",
Our call shows:
# grep C-00024cd5 full.log | egrep 'Strict RTP'
[Feb 22 11:16:41] VERBOSE[29023][C-00024cd5] res_rtp_asterisk.c: >
0x2b308c074f80 -- Strict RTP learning after remote address set to:
xx.xx.154.111:18578
[Feb 22 11:17:00] VERBOSE[29023][C-00024cd5] res_rtp_asterisk.c: >
0x2b315c01cbc0 -- Strict RTP learning after remote address set to:
xx.xx.0.12:16498
[Feb 22 11:17:00] VERBOSE[28191][C-00024cd5] res_rtp_asterisk.c: >
0x2b308c074f80 -- Strict RTP switching to RTP remote address
xx.xx.154.111:18578 as source
[Feb 22 11:17:00] VERBOSE[28191][C-00024cd5] res_rtp_asterisk.c: >
0x2b308c074f80 -- Strict RTP learning complete - Locking on source address
xx.xx.154.111:18578
[Feb 22 11:17:00] VERBOSE[28194][C-00024cd5] res_rtp_asterisk.c: >
0x2b315c01cbc0 -- Strict RTP switching source address to xx.xx.114.237:16498
[Feb 22 11:17:01] VERBOSE[28194][C-00024cd5] res_rtp_asterisk.c: >
0x2b315c01cbc0 -- Strict RTP learning complete - Locking on source address
xx.xx.114.237:16498
I'm a bit confused because the second "Strict RTP learning after remote
address set" should reset the rtp_source_learn.start timestamp, and yet the
"Strict RTP learning complete" messages are less than 5000ms after that.
What could be happening?
Thanks again.
On Tue, 18 Apr 2023 at 10:40, Joshua C. Colp <jcolp at sangoma.com> wrote:
> It's probably best if you read the logic[1]. There's an entire comment
> that talks about how it works.
>
> [1]
> https://github.com/asterisk/asterisk/blob/20/res/res_rtp_asterisk.c#L8158
>
> On Mon, Apr 17, 2023 at 7:10 PM David Cunningham <
> dcunningham at voisonics.com> wrote:
>
>> Hi Joshua,
>>
>> Could you confirm if the 5 second period for learning a new audio stream
>> is a minimum or a maximum? The unusual call flow in question results in
>> Asterisk learning a new audio stream when we don't want it to, and having a
>> minimum of say 2 seconds of audio would help avoid this.
>>
>> Thank you!
>>
>>
>> On Thu, 2 Mar 2023 at 12:32, Joshua C. Colp <jcolp at sangoma.com> wrote:
>>
>>> On Tue, Feb 28, 2023 at 9:51 AM Joshua C. Colp <jcolp at sangoma.com>
>>> wrote:
>>>
>>>> On Tue, Feb 28, 2023 at 9:50 AM David Cunningham <
>>>> dcunningham at voisonics.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Does anyone know if one of the "strictrtp" options disables RTP
>>>>> learning? As far as I can tell from the documentation the values "no" and
>>>>> "seqno" are more permissive in allowing other sources rather than less, but
>>>>> I thought I'd check.
>>>>>
>>>>
>>>> Setting it to "no" disables the learning.
>>>>
>>>
>>> Since I haven't gotten the email yet I'll just reply to my own.
>>>
>>> The "no" option disables strict RTP protection. Learning is part of
>>> strict RTP protection, it is what determines what the source of media is
>>> and then blocks other packets. There is no ability to set it
>>> per-peer/per-endpoint.
>>>
>>> --
>>> Joshua C. Colp
>>> Asterisk Project Lead
>>> Sangoma Technologies
>>> Check us out at www.sangoma.com and www.asterisk.org
>>> --
>>> _____________________________________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Check out the new Asterisk community forum at:
>>> https://community.asterisk.org/
>>>
>>> New to Asterisk? Start here:
>>> https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>>
>> --
>> David Cunningham, Voisonics Limited
>> http://voisonics.com/
>> USA: +1 213 221 1092
>> New Zealand: +64 (0)28 2558 3782
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>> https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
> --
> Joshua C. Colp
> Asterisk Project Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
> https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20230418/fdc51fef/attachment.html>
More information about the asterisk-users
mailing list