[Asterisk-code-review] chan sip: Access incoming REFER headers in dialplan (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Tue Aug 1 13:32:30 CDT 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/6118 )

Change subject: chan_sip: Access incoming REFER headers in dialplan
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.asterisk.org/#/c/6118/2/channels/chan_sip.c
File channels/chan_sip.c:

https://gerrit.asterisk.org/#/c/6118/2/channels/chan_sip.c@18639
PS2, Line 18639: 		if (ast_begins_with(header, prefix)) {
Forgot to add:

I think that an empty prefix string value to match all headers has a subtle problem.  It can conceivably get confused with the variable not existing and you cannot disable the feature once it is enabled on the channel.  I suggest using an asterisk '*' as the match any header value instead so an empty or non-existing variable can mean the feature is disabled.


https://gerrit.asterisk.org/#/c/6118/2/channels/chan_sip.c@18722
PS2, Line 18722: 			if (get_xfrdata != NULL) {
Use !ast_strlen_zero(get_xferdata) test here along with the '*' match all headers idea.



-- 
To view, visit https://gerrit.asterisk.org/6118
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I73d7a1e95981693bc59aa0d5093c074b555f708e
Gerrit-Change-Number: 6118
Gerrit-PatchSet: 2
Gerrit-Owner: Kirill Katsnelson <kkm at smartaction.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 01 Aug 2017 18:32:30 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170801/52c29d3d/attachment.html>


More information about the asterisk-code-review mailing list