[asterisk-dev] Pjsip aor with multiple contacts

Kevin Harwell kharwell at digium.com
Mon Apr 27 11:26:40 CDT 2020


On Mon, Apr 27, 2020 at 5:49 AM Learn&Use <office at learnanduse.at> wrote:

> Hi guys,
>
> sorry just a simple question which i can’t find an answer online.. if i
> have multiple contacts listed in one aor section in pjsip.conf and have
> quality on which of the contacts will be used if both contacts are
> reachable?
>
> ie:
> [trunk]
> type = aor
> contact = sip:test at domain1.com:5061
> contact = sip:test at domain2.com:5061
> qualify-frequency = 30
>
> is it round-robin, random, in the order of the config file or the lowest
> RTT?
>

It's semi-random.

>From what I can tell it appears it will choose the "first" reachable
contact (includes dynamic and static contacts) it knows about. I put
"first" in quotes though because the contacts are put into an unsorted
container, and then the "first" reachable contact in the container is used.
So depending on how a particular contact is hashed, and stored in the
container affects its location in said container.

If all you have are static contacts then the same one should be chosen each
time. However when including dynamic contacts it's possible (once
registered, and reachable) it could become the one used.


>
> cheers,
>
> Roland
>
>
-- 
Kevin Harwell
Software Developer
Sangoma Technologies
Check us out at: https://sangoma.com & https://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200427/6e6aca2b/attachment.html>


More information about the asterisk-dev mailing list