[asterisk-dev] [Code Review] 4472: chan_pjsip/res_pjsip_callerid: Make Party ID handling simpler and consistent.

rmudgett reviewboard at asterisk.org
Fri Mar 13 11:26:54 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4472/
-----------------------------------------------------------

(Updated March 13, 2015, 11:26 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 432892


Repository: Asterisk


Description
-------

The res_pjsip modules were manually checking both name and number
presentation values when there is a function that determines the combined
presentation for a party ID struct.  The function takes into account if
the name or number components are valid while the manual code rarely
checked if the data was even valid.

* Made use ast_party_id_presentation() rather than manually checking party
ID presentation values.

* Ensure that set_id_from_pai() and set_id_from_rpid() will not return
presentation values other than what is pulled out of the SIP headers.  It
is best if the code doesn't assume that AST_PRES_ALLOWED and
AST_PRES_USER_NUMBER_UNSCREENED are zero.

* Fixed copy paste error in add_privacy_params() dealing with RPID
privacy.

* Pulled the id->number.valid test from add_privacy_header() and
add_privacy_params() up into the parent function add_id_headers() to skip
adding PAI/RPID headers earlier.

* Made update_connected_line_information() not send out connected line
updates if the connected line number is invalid.  Lower level code would
not add the party ID information and thus the sent message would be
unnecessary.

* Eliminated RAII_VAR usage in send_direct_media_request().


Diffs
-----

  /branches/13/res/res_pjsip_caller_id.c 432722 
  /branches/13/channels/chan_pjsip.c 432722 

Diff: https://reviewboard.asterisk.org/r/4472/diff/


Testing
-------

Ran the tests/channels/pjsip testsuite tests.  They still pass.


Thanks,

rmudgett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150313/fd7019af/attachment.html>


More information about the asterisk-dev mailing list