[Asterisk-code-review] res pjsip session: add new flag use callerid contact (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Tue Oct 16 08:05:06 CDT 2018


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

Change subject: res_pjsip_session: add new flag use_callerid_contact
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

> This needs ansible to add it to the ps_globals table.

s/ansible/alembic/

https://gerrit.asterisk.org/#/c/10357/2/res/res_pjsip/config_global.c
File res/res_pjsip/config_global.c:

https://gerrit.asterisk.org/#/c/10357/2/res/res_pjsip/config_global.c@576
PS2, Line 576: 		OPT_BOOL_T, 1, FLDSET(struct global_config, use_callerid_contact));
Use OPT_YESNO_T instead of OPT_BOOL_T.  The only difference between the two types is that the yes/no version writes the yes/no string to configuration files instead of the true/false strings.


https://gerrit.asterisk.org/#/c/10357/2/res/res_pjsip_session.c
File res/res_pjsip_session.c:

https://gerrit.asterisk.org/#/c/10357/2/res/res_pjsip_session.c@796
PS2, Line 796: 			pj_strdup2(dlg_pool, &dlg_contact_uri->user, connected_id.number.str);
There is more than one finding here:

* You need to check the valid flag before you can use the number string.  If the valid flag is not true you cannot use the number string no matter what is there.  S_COR(connected_id.number.valid, connected_id.number.str, "")


* What if there is no number?



-- 
To view, visit https://gerrit.asterisk.org/10357
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I9a720e058323f6862a91c62f8a8c1a4b5c087b95
Gerrit-Change-Number: 10357
Gerrit-PatchSet: 2
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 16 Oct 2018 13:05:06 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181016/a81106f8/attachment.html>


More information about the asterisk-code-review mailing list