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

Kirill Katsnelson asteriskteam at digium.com
Tue Aug 1 19:04:55 CDT 2017


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

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


Patch Set 2:

(3 comments)

> Documentation of how this feature works is needed in sip.conf.sample.

I spotted a lot of chan_sip-specific variables in code (just search for 'var_helper('), and none is documented in sip.conf.sample; it feels kind of out of place there (but maybe all variables should be documented there). I added the documentation to the function SIP_HEADER instead, as this is probable the place users will be looking for when they want access to the REFER headers. At least, I did.

> A note about the addition of this feature is needed in the CHANGES file.

Done.

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:
Done


https://gerrit.asterisk.org/#/c/6118/2/channels/chan_sip.c@18643
PS2, Line 18643: 				struct ast_str *pbxvar = ast_str_alloca(120);
> Using ast_str_alloca() inside a loop can conceivably cause a crash because 
D-oh! Classic fail, thanks for spotting!

Done.


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 h
Done



-- 
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: Kirill Katsnelson <kkm at smartaction.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 02 Aug 2017 00:04:55 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170801/680932fd/attachment.html>


More information about the asterisk-code-review mailing list