[Asterisk-code-review] res_pjsip_session: Add custom parameter support. (asterisk[master])

N A asteriskteam at digium.com
Fri Jul 22 19:00:49 CDT 2022


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

Change subject: res_pjsip_session: Add custom parameter support.
......................................................................


Patch Set 1:

(1 comment)

Patchset:

PS1: 
> What does the pjproject library have to do with a testsuite test? The test should just use a SIPp sc […]
I'm using Asterisk, not SIPp, since that makes more sense for this kind of test. In an ideal end to end test, you set the ANI2 manually on an outbound call and then on an incoming call that value should be present on CALLERID(ani2), via a loopback PJSIP call. That effectively tests 3 things at once.

This change itself works (it's on the outbound side). It's easy to confirm by doing a SIP debug and making some outbound calls. I couldn't get header parameters working due to pjproject issues so that's not part of this patch, just URI parameters.

The problems with the test are really on the incoming side. It seems like perhaps the parameters searched are either only header or URI parameters, but one of them is completely missing and can't be retrieved. So pjsip_param_find can't be used to confirm the parameters.

It *IS* in the incoming invite (again, this can be confirmed using a debug) and if we wanted to just make the test work, a quick and dirty way would be just using PJSIP_HEADER and confirm that the substring exists using a regex. Not as elegant, but probably more reliable at this point since pjproject is so flaky.

However, aside from using that for the test or not, it's a problem in and of itself if pjproject isn't cooperating for that, so this is a separate thing that will need to be looked into.

Maybe I can just do the PJSIP_HEADER/REGEX method for now, and look into this on the side since it's a really a separate issue pertaining to how pjproject parses things on incoming calls, and the structures in play.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ifb1bc3c512ad5f6faeaebd7817f004a2ecbd6428
Gerrit-Change-Number: 18830
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Sat, 23 Jul 2022 00:00:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220722/4fdda413/attachment-0001.html>


More information about the asterisk-code-review mailing list