[Asterisk-code-review] res_pjsip_caller_id: Add ANI2/OLI parsing (asterisk[master])

George Joseph asteriskteam at digium.com
Wed Jun 9 08:51:14 CDT 2021


Attention is currently required from: N A.
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16041 )

Change subject: res_pjsip_caller_id: Add ANI2/OLI parsing
......................................................................


Patch Set 2: Code-Review-1

(4 comments)

Patchset:

PS2: 
Going to need a test as well.


File res/res_pjsip_caller_id.c:

https://gerrit.asterisk.org/c/asterisk/+/16041/comment/cf31317e_f815b607 
PS2, Line 146: 		return ast_str_to_int(oli1->value.ptr, ani2);
             : 	} else if ((oli2 = pjsip_param_find(&from_hdr->other_param, &oli_str2))) {
             : 		return ast_str_to_int(oli2->value.ptr, ani2);
             : 	} else if ((oli3 = pjsip_param_find(&from_hdr->other_param, &oli_str3))) {
             : 		return ast_str_to_int(oli3->value.ptr, ani2);
You can't use the pj_str_t ptr directly as a char * because it's not null terminated.  See the use of ast_copy_pj_str() set_id_from_header() above.


https://gerrit.asterisk.org/c/asterisk/+/16041/comment/fd963d36_bb0de870 
PS2, Line 407: 		struct ast_party_caller caller;
Other than initializing this, it doesn't look used.


https://gerrit.asterisk.org/c/asterisk/+/16041/comment/9417c2d9_f795fe1f 
PS2, Line 416: 			ast_party_caller_init(&caller);
What's the purpose of this?



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ifc938a7a7d45ce33999ebf3656a542226f6d3847
Gerrit-Change-Number: 16041
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-CC: Stanislav Abramenkov <stas.abramenkov at gmail.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Wed, 09 Jun 2021 13:51:14 +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/20210609/c54a6f31/attachment-0001.html>


More information about the asterisk-code-review mailing list