Skip to content

Commit

Permalink
registrar: Add latency-based filtering flags
Browse files Browse the repository at this point in the history
    * "yXXXXX" lookup() flag - discard contacts beyond a certain latency
    * "Y" lookup() flag - sort branches by ascending latency order
  • Loading branch information
liviuchircu committed Mar 28, 2018
1 parent 928eebc commit c9478d4
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 59 deletions.
6 changes: 4 additions & 2 deletions lib/reg/config.h
Expand Up @@ -50,7 +50,9 @@
#define REG_LOOKUP_METHODFILTER_FLAG (1<<0)
#define REG_LOOKUP_NOBRANCH_FLAG (1<<1)
#define REG_LOOKUP_UAFILTER_FLAG (1<<2)
#define REG_BRANCH_AOR_LOOKUP_FLAG (1<<3)
#define REG_LOOKUP_LOCAL_ONLY_FLAG (1<<4)
#define REG_LOOKUP_LOCAL_ONLY_FLAG (1<<3)
#define REG_LOOKUP_MAX_LATENCY_FLAG (1<<4)
#define REG_LOOKUP_LATENCY_SORT_FLAG (1<<5)
#define REG_BRANCH_AOR_LOOKUP_FLAG (1<<6)

#endif /* __LIB_REG_CONFIG__ */
8 changes: 8 additions & 0 deletions modules/registrar/README
Expand Up @@ -632,6 +632,14 @@ remove("location", "sip:bob@atlanta.com", "sip:bob@46.50.64.78", "50.60.
branches for the call. Only the direct (local)
contacts behind the AoR will be routed to if this flag
is enabled.
+ 'yXXXXX' (Max pinging latency) - maximally accepted
contact pinging latency (microseconds). Contacts of an
AoR with a higher latency will be discarded during the
lookup.
+ 'Y' (Sort by pinging latency) - contacts will be
picked in ascending order of their last successful
pinging latency (fastest ping -> slowest ping). This
flag may work together with the "y" flag.
* AOR (optional)- AOR to lookup for; if missing, the RURI is
used as AOR; This must be a variable.

Expand Down
15 changes: 15 additions & 0 deletions modules/registrar/doc/registrar_admin.xml
Expand Up @@ -868,6 +868,21 @@ remove("location", "sip:bob@atlanta.com", "sip:bob@46.50.64.78", "50.60.50.60");
be routed to if this flag is enabled.
</para>
</listitem>
<listitem>
<para>
<emphasis>'yXXXXX' (Max pinging latency)</emphasis> - maximally
accepted contact pinging latency (microseconds). Contacts of an
AoR with a higher latency will be discarded during the lookup.
</para>
</listitem>
<listitem>
<para>
<emphasis>'Y' (Sort by pinging latency)</emphasis> - contacts
will be picked in ascending order of their last successful
pinging latency (fastest ping -> slowest ping). This flag may
work together with the "y" flag.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
Expand Down

0 comments on commit c9478d4

Please sign in to comment.