Skip to content

Commit

Permalink
More attributes for the contact-related events.
Browse files Browse the repository at this point in the history
The E_UL_CONTACT_INSERT, E_UL_CONTACT_UPDATE and E_UL_CONTACT_DELETE have now more attributes (full set to describe the contact):
* path string
* q value
* socket description
* branch flags
* expires
* uri as former "address"
  • Loading branch information
bogdan-iancu committed Mar 7, 2017
1 parent edd6f77 commit 03a5e99
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 135 deletions.
102 changes: 48 additions & 54 deletions modules/usrloc/README
Expand Up @@ -12,9 +12,9 @@ Bogdan-Andrei Iancu

Ovidiu Sas

Copyright 2003 FhG FOKUS
Copyright © 2003 FhG FOKUS

Copyright 2005-2008 Voice Sistem SRL
Copyright © 2005-2008 Voice Sistem SRL
Revision History
Revision $Revision: 8740 $ $Date$
__________________________________________________________
Expand Down Expand Up @@ -195,7 +195,7 @@ Chapter 1. Admin Guide

For more details on how to control/select the contact matching
algorithm, please see the module parameter matching_mode at
Section 1.3.23, "matching_mode (integer)".
Section 1.3.23, matching_mode (integer).

1.1.2. Contact replication

Expand Down Expand Up @@ -260,7 +260,7 @@ Chapter 1. Admin Guide
module.

WARNING: Setting INT flags is deprecated! Use quoted strings
instead! Default value is "NULL" (not set).
instead! Default value is NULL (not set).

Example 1.1. Set nat_bflag parameter
...
Expand All @@ -271,7 +271,7 @@ modparam("usrloc", "nat_bflag", "NAT_BFLAG")

Name of column containing usernames.

Default value is "username".
Default value is username.

Example 1.2. Set user_column parameter
...
Expand All @@ -282,7 +282,7 @@ modparam("usrloc", "user_column", "username")

Name of column containing domains.

Default value is "domain".
Default value is domain.

Example 1.3. Set user_column parameter
...
Expand All @@ -293,7 +293,7 @@ modparam("usrloc", "domain_column", "domain")

Name of column containing contacts.

Default value is "contact".
Default value is contact.

Example 1.4. Set contact_column parameter
...
Expand All @@ -304,7 +304,7 @@ modparam("usrloc", "contact_column", "contact")

Name of column containing expires value.

Default value is "expires".
Default value is expires.

Example 1.5. Set expires_column parameter
...
Expand All @@ -315,7 +315,7 @@ modparam("usrloc", "expires_column", "expires")

Name of column containing q values.

Default value is "q".
Default value is “q”.

Example 1.6. Set q_column parameter
...
Expand All @@ -326,7 +326,7 @@ modparam("usrloc", "q_column", "q")

Name of column containing callid values.

Default value is "callid".
Default value is callid.

Example 1.7. Set callid_column parameter
...
Expand All @@ -337,7 +337,7 @@ modparam("usrloc", "callid_column", "callid")

Name of column containing cseq numbers.

Default value is "cseq".
Default value is cseq.

Example 1.8. Set cseq_column parameter
...
Expand All @@ -348,7 +348,7 @@ modparam("usrloc", "cseq_column", "cseq")

Name of column containing supported methods.

Default value is "methods".
Default value is methods.

Example 1.9. Set methods_column parameter
...
Expand All @@ -359,7 +359,7 @@ modparam("usrloc", "methods_column", "methods")

Name of column to save the internal flags of the record.

Default value is "flags".
Default value is flags.

Example 1.10. Set flags_column parameter
...
Expand All @@ -370,7 +370,7 @@ modparam("usrloc", "flags_column", "flags")

Name of column to save the branch/contact flags of the record.

Default value is "cflags".
Default value is cflags.

Example 1.11. Set cflags_column parameter
...
Expand All @@ -381,7 +381,7 @@ modparam("usrloc", "cflags_column", "cflags")

Name of column containing user-agent values.

Default value is "user_agent".
Default value is user_agent.

Example 1.12. Set user_agent_column parameter
...
Expand All @@ -393,7 +393,7 @@ modparam("usrloc", "user_agent_column", "user_agent")
Name of column containing the source IP, port, and protocol
from the REGISTER message.

Default value is "received".
Default value is received.

Example 1.13. Set received_column parameter
...
Expand All @@ -405,7 +405,7 @@ modparam("usrloc", "received_column", "received")
Name of column containing the received socket information
(IP:port) for the REGISTER message.

Default value is "socket".
Default value is socket.

Example 1.14. Set socket_column parameter
...
Expand All @@ -416,7 +416,7 @@ modparam("usrloc", "socket_column", "socket")

Name of column containing the Path header.

Default value is "path".
Default value is path.

Example 1.15. Set path_column parameter
...
Expand All @@ -427,7 +427,7 @@ modparam("usrloc", "path_column", "path")

Name of column containing the SIP instance.

Default value is "NULL".
Default value is NULL.

Example 1.16. Set sip_instance_column parameter
...
Expand All @@ -439,7 +439,7 @@ modparam("usrloc", "sip_instance_column", "sip_instance")
Name of column containing additional registration-related
information.

Default value is "NULL".
Default value is NULL.

Example 1.17. Set attr_column parameter
...
Expand All @@ -452,7 +452,7 @@ modparam("usrloc", "attr_column", "attr")
for identifing the user (along with the username part). Useful
in multi domain scenarios. Non 0 value means true.

Default value is "0 (false)".
Default value is 0 (false).

Example 1.18. Set use_domain parameter
...
Expand All @@ -465,7 +465,7 @@ modparam("usrloc", "use_domain", 1)
otherwise the contact will be ordered based on q value. Non 0
value means true.

Default value is "0 (false)".
Default value is 0 (false).

Example 1.19. Set desc_time_order parameter
...
Expand All @@ -490,7 +490,7 @@ modparam("usrloc", "timer_interval", 120)
URL of the database that should be used.

Default value is
"mysql://opensips:opensipsrw@localhost/opensips".
mysql://opensips:opensipsrw@localhost/opensips.

Example 1.21. Set db_url parameter
...
Expand Down Expand Up @@ -550,7 +550,7 @@ modparam("usrloc", "db_mode", 2)
1.3.23. matching_mode (integer)

What contact matching algorithm to be used. Refer to section
Section 1.1.1, "Contact matching" for the description of the
Section 1.1.1, Contact matching for the description of the
algorithms.

The parameter may take the following values:
Expand All @@ -577,7 +577,7 @@ modparam("usrloc", "matching_mode", 1)

A value of 0 disable the retransmission detection.

Default value is "20 seconds".
Default value is 20 seconds.

Example 1.24. Set cseq_delay parameter
...
Expand All @@ -591,12 +591,12 @@ modparam("usrloc", "cseq_delay", 5)
instances, that belong to the specified cluster id, through the
Binary Interface.

Default value is "0" (no cluster id specified) - Binary
Default value is “0” (no cluster id specified) - Binary
Interface listeners (if any) will simply ignore any
usrloc-related packets

More details on the user location replication mechanism are
available in Section 1.1.2, "Contact replication"
available in Section 1.1.2, Contact replication

Example 1.25. Setting the accept_replicated_contacts parameter
...
Expand All @@ -613,7 +613,7 @@ modparam("usrloc", "accept_replicated_contacts", 1)
Default value is 0 (no cluster id specified)

More details on the user location replication mechanism are
available in Section 1.1.2, "Contact replication"
available in Section 1.1.2, Contact replication

Example 1.26. Setting the replicate_contacts_to parameter
...
Expand All @@ -630,7 +630,7 @@ modparam("usrloc", "replicate_contacts_to", 1)
Interface events, DB queries may be freely performed)

More details on the user location replication mechanism are
available in Section 1.1.2, "Contact replication"
available in Section 1.1.2, Contact replication

Example 1.27. Setting the skip_replicated_db_ops parameter
...
Expand Down Expand Up @@ -659,7 +659,7 @@ modparam("usrloc", "max_contact_delete", 10)
the maximu size of this parameter is 16, meaning that the hash
supports maximum 65536 entries.

Default value is "9".
Default value is “9”.

Example 1.29. Set hash_size parameter
...
Expand All @@ -676,7 +676,7 @@ modparam("usrloc", "hash_size", 10)
parameter is changed. Enabling this parameter will regenerate
broken contact id's based on current configurations.

Default value is "0(not enabled)"
Default value is 0(not enabled)

Example 1.30. Set regen_broken_contactid parameter
...
Expand Down Expand Up @@ -716,7 +716,7 @@ modparam("usrloc", "regen_broken_contactid", 1)

Parameters:
* brief - (optional, may not be present); if equals to string
"brief", a brief dump will be done (only AOR and contacts,
brief, a brief dump will be done (only AOR and contacts,
with no other details)

1.5.4. ul_flush
Expand Down Expand Up @@ -817,12 +817,22 @@ modparam("usrloc", "regen_broken_contactid", 1)

Parameters:
* aor - The AOR of the inserted contact.
* address - The binding address of the inserted contact.
* callid - The Call-ID header of the registration message.
* uri - The contact URI of the inserted contact.
* received - IP, port and protocol the registration message
was received from. If these have the same value as the
contact's address (see the address parameter) then the
received parameter will be an empty string.
* path - The PATH header value of the registration
message.(empty string if not present)
* qval - The Q value (priority) of the contact (as integer
value from 0 to 10).
* socket - The SIP socket/listener (as string) used by
OpenSIPS to receive the contact registations.
* bflags - The branch flags (bflags) of the contact (in
integer value of the bitmask)
* expires - The expires value of the contact (as UNIX
timestamp integer).
* callid - The Call-ID header of the registration message.
* cseq - The cseq number as an int value.

1.7.4. E_UL_CONTACT_DELETE
Expand All @@ -832,30 +842,14 @@ modparam("usrloc", "regen_broken_contactid", 1)
then both the E_UL_AOR_DELETE and E_UL_CONTACT_DELETE events
will be raised.

Parameters:
* aor - The AOR of the deleted contact.
* address - The binding address of the deleted contact.
* callid - The Call-ID header of the registration message.
* received - IP, port and protocol the registration message
was received from. If these have the same value as the
contact's address (see the address parameter) then the
received parameter will be an empty string.
* cseq - The cseq number as an int value.
Parameters: same as E_UL_CONTACT_INSERT event

1.7.5. E_UL_CONTACT_UPDATE

This event is raised when a contact's info is updated by
receiving another registration message.

Parameters:
* aor - The AOR of the updated contact.
* address - The binding address of the updated contact.
* callid - The Call-ID header of the registration message.
* received - IP, port and protocol the registration message
was received from. If these have the same value as the
contact's address (see the address parameter) then the
received parameter will be an empty string.
* cseq - The cseq number as an int value.
Parameters: same as E_UL_CONTACT_INSERT event

Chapter 2. Developer Guide

Expand Down Expand Up @@ -1006,7 +1000,7 @@ is_replicated)
buffer. If the buffer is too small, the function returns
positive value indicating how much additional space would be
necessary to accommodate all of them. Please note that the
positive return value should be used only as a "hint", as there
positive return value should be used only as a hint, as there
is no guarantee that during the time between two subsequent
calls number of registered contacts will remain the same.

Expand All @@ -1030,7 +1024,7 @@ is_replicated)
too small, the function returns positive value indicating how
much additional space would be necessary to accommodate all of
them. Please note that the positive return value should be used
only as a "hint", as there is no guarantee that during the time
only as a hint, as there is no guarantee that during the time
between two subsequent calls number of registered contacts will
remain the same.

Expand Down

0 comments on commit 03a5e99

Please sign in to comment.