Does ARI registered endpoints honour AURS?

Dear Asterisk Community,

Having used ARI in Asterisk 18.13 for a while now, I am stumped that I am unable to get something “simple” sorted. I am registering my endpoints and aors via ARI. Everything works perfectly, however, I noticed that there are several contacts associated with my AOR, and this I do not want. In simple terms, I want one or nothing (if I create this via the file manually, the behaviour works). As an example, here is one endpoint’s AOR (What am I doing wrong?):

liogateway*CLI> pjsip show aor SIM9001

      Aor:  <Aor..............................................>  <MaxContact>
    Contact:  <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

      Aor:  SIM9001                                              1
    Contact:  SIM9001/sip:SIM9001@192.168.88.250:6000      e09dd38343 NonQual         nan
    Contact:  SIM9001/sip:SIM9001@192.168.88.250:1024      8eae4ca946 NonQual         nan
    Contact:  SIM9001/sip:SIM9001@192.168.88.250:6000      e09dd38343 NonQual         nan


 ParameterName        : ParameterValue
 ======================================================
 authenticate_qualify : false
 contact              : sip:SIM9001@192.168.88.250:6000
 contact              : sip:SIM9001@192.168.88.250:1024
 contact              : sip:SIM9001@192.168.88.250:6000
 default_expiration   : 3600
 mailboxes            : 
 max_contacts         : 1
 maximum_expiration   : 7200
 minimum_expiration   : 60
 outbound_proxy       : 
 qualify_frequency    : 0
 qualify_timeout      : 3.000000
 remove_existing      : true
 remove_unavailable   : true
 support_path         : true
 voicemail_extension  : 

Can someone maybe clarify what I am doing incorrectly please? I understand that the “remove_unavailable” is relatively new, but reading from the documentation I think I am causing a conflict somewhere with the “max_contacts”.

Best regards,

Dawie

Set these values which emulates the contact behavior of chan_sip which is what you describe.
max_contacts=1
remove_existing=yes

;max_contacts=0 ; Maximum number of contacts that can bind to an AoR (default:
                ; "0")
;remove_existing=no     ; Allow a registration to succeed by displacing any existing
                        ; contacts that now exceed the max_contacts count.  Any
                        ; removed contacts are the next to expire.  The behaviour is
                        ; beneficial when rewrite_contact is enabled and max_contacts
                        ; is greater than one.  The removed contact is likely the old
                        ; contact created by rewrite_contact that the device is
                        ; refreshing.
                        ; (default: "no")

rmudgett,

Thanks. But isn’t that what I do have? Or do you mean I need to disable the “remove_unavailable” in the config? However, I do see you say “yes”, whereas I said “true” in our config … probably the same thing? (I hope)

Best regrads,

Dawie

Asterisk accepts many truth value aliases for boolean parameters in the config files. (yes/no, y/n, on/off, true/false, t/f, 1/0)

The remove_unavailable option was added after I worked on that part of the code so it may interfere with the remove_existing option when it is also enabled.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.