[Asterisk-code-review] res_pjsip: Add "send_cid_in_contact_user" option to endpoint (...asterisk[13])

Richard Mudgett asteriskteam at digium.com
Mon Aug 26 12:56:37 CDT 2019


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

Change subject: res_pjsip: Add "send_cid_in_contact_user" option to endpoint
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/12799/1/contrib/ast-db-manage/config/versions/bbcf3b472a11_add_send_cid_in_contact_user_to_endpoint.py 
File contrib/ast-db-manage/config/versions/bbcf3b472a11_add_send_cid_in_contact_user_to_endpoint.py:

https://gerrit.asterisk.org/#/c/12799/1/contrib/ast-db-manage/config/versions/bbcf3b472a11_add_send_cid_in_contact_user_to_endpoint.py@1 
PS1, Line 1: """Add send_cid_in_contact_user to endpoint
You should *always* use the below type for boolean type options instead of yes/no to avoid type consistency issues between internal usage and realtime databases.

AST_BOOL_NAME = 'ast_bool_values'
# We'll just ignore the n/y and f/t abbreviations as Asterisk does not write
# those aliases.
AST_BOOL_VALUES = [ '0', '1',
                    'off', 'on',
                    'false', 'true',
                    'no', 'yes' ]


https://gerrit.asterisk.org/#/c/12799/1/res/res_pjsip/pjsip_configuration.c 
File res/res_pjsip/pjsip_configuration.c:

https://gerrit.asterisk.org/#/c/12799/1/res/res_pjsip/pjsip_configuration.c@1828 
PS1, Line 1828: 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "send_cid_in_contact_user", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, id.send_cid_in_contact_user));
This is a case in point about consistency:  OPT_BOOL_T writes true/false to sorcery and to the CLI not yes/no.  This is why AST_BOOL_NAME was created to fix the inconsistency in alembic.



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Ic2ca721f7bb5fab39c80907a33e16d4f94097f91
Gerrit-Change-Number: 12799
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Mon, 26 Aug 2019 17:56:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190826/8cf15e62/attachment-0001.html>


More information about the asterisk-code-review mailing list