-
Notifications
You must be signed in to change notification settings - Fork 581
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[uac_registrant] Match reply Contact with binding_URI by parameter.
Added new integer module parameter 'match_contact' to choose, what parts of URI from Contact header should match binding_URI when OpenSIPS chooses expiration time for registration.
- Loading branch information
1 parent
41a3230
commit 229eb20
Showing
3 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,23 @@ | |
#define URN_NENA_SERVICE_STR ":nena:service:" | ||
#define URN_NENA_SERVICE_STR_LEN (sizeof(URN_NENA_SERVICE_STR) - 1) | ||
|
||
enum uri_match_flags { | ||
URI_MATCH_TYPE = (1<<0), | ||
URI_MATCH_USER = (1<<1), | ||
URI_MATCH_PASSWD = (1<<2), | ||
URI_MATCH_HOST = (1<<3), | ||
URI_MATCH_PORT = (1<<4), | ||
URI_MATCH_TRANSPORT = (1<<5), | ||
URI_MATCH_TTL = (1<<6), | ||
URI_MATCH_USERPARAM = (1<<7), | ||
URI_MATCH_MADDR = (1<<8), | ||
URI_MATCH_METHOD = (1<<9), | ||
URI_MATCH_LR = (1<<10), | ||
URI_MATCH_R2 = (1<<11), | ||
URI_MATCH_ALL = (URI_MATCH_TYPE | URI_MATCH_USER | URI_MATCH_PASSWD | URI_MATCH_HOST | URI_MATCH_PORT | URI_MATCH_TRANSPORT | | ||
URI_MATCH_TTL | URI_MATCH_USERPARAM | URI_MATCH_MADDR | URI_MATCH_METHOD | URI_MATCH_LR | URI_MATCH_R2), | ||
}; | ||
|
||
/* buf= pointer to beginning of uri (sip:[email protected]:5060;a=b?h=i) | ||
* len= len of uri | ||
* returns: fills uri & returns <0 on error or 0 if ok | ||
|
@@ -69,6 +86,7 @@ int parse_sip_msg_uri(struct sip_msg* msg); | |
int parse_orig_ruri(struct sip_msg* msg); | ||
int compare_uris(str *raw_uri_a,struct sip_uri* parsed_uri_a, | ||
str *raw_uri_b,struct sip_uri *parsed_uri_b); | ||
int compare_uris_parts(str *raw_uri_a, str *raw_uri_b, enum uri_match_flags opts); | ||
static inline int get_uri_param_val(const struct sip_uri *uri, | ||
const str *param, str *val); | ||
static inline int get_uri_param_idx(const str *param, | ||
|