[Asterisk-code-review] res pjsip endpoint identifier ip.c: Added regex support to m... (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Fri Jul 27 10:57:55 CDT 2018
Hello Jenkins2, George Joseph, Joshua Colp,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/9718
to look at the new patch set (#3).
Change subject: res_pjsip_endpoint_identifier_ip.c: Added regex support to match_header
......................................................................
res_pjsip_endpoint_identifier_ip.c: Added regex support to match_header
This patch adds regular expression support to make the identify section's
match_header option more useful when attempting to match complex headers
like the 'To' or 'From' headers. The 'From' header has variable
components such as the tag parameter that you cannot predict. To specify
a regular expression put slashes around the regular expression in place of
the header value.
[identify-alice]
type=identify
endpoint=alice
match_header=From: /<sip:alice at 127\\.0\\.0\\.1>/
* Added regex support to match_header so you could match a 'To' header
among other complex headers.
Fixed reported crashes when trying to match special headers like 'Contact'.
The identify section's match_header method used code that assumed you were
matching a generic header. Any other type of header could cause a crash
if the header structure variant did not match the generic header enough.
* Made use code that will work for any header type instead of code
specific to generic headers.
Other fixes while in the area:
* Made check all headers of the requested name.
* Added some more sanity checks to the configured identify matching
options when applying the configuration.
ASTERISK-27548
Change-Id: I27dfd4ff5e2259b906640e3c330681b76b4ed1f1
---
M CHANGES
M res/res_pjsip_endpoint_identifier_ip.c
2 files changed, 125 insertions(+), 38 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/18/9718/3
--
To view, visit https://gerrit.asterisk.org/9718
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I27dfd4ff5e2259b906640e3c330681b76b4ed1f1
Gerrit-Change-Number: 9718
Gerrit-PatchSet: 3
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180727/35f5afc4/attachment.html>
More information about the asterisk-code-review
mailing list