[asterisk-dev] [Code Review] 4456: testsuite: res_pjsip - conflicting endpoint identifiers test

Kevin Harwell reviewboard at asterisk.org
Tue Mar 3 18:01:49 CST 2015



> On March 3, 2015, 1:42 p.m., Mark Michelson wrote:
> > I'm not sure that this test actually verifies the new global option. Asterisk 1 sends one call to Asterisk 2. On the call, the username is "alice" and the source IP address is 127.0.0.1:5060. On Asterisk 2, the only configured endpoint is called "ast1". This means that there is no ambiguity on how the call will be matched on Asterisk 2. This is just another test that verifies that matching based on IP address works. If Asterisk 2 had an endpoint called "alice" on it, then you could make sure that the "ast1" endpoint got matched instead of the "alice" endpoint on the incoming call.
> > 
> > However, even if you did this, I'm not so sure that this would verify the configured priority took effect since it's possible that you just got lucky and the IP endpoint identifier was consulted first. I think to truly test this, you need to have the configuration you have now, verify the call matches the expected endpoint, then change the global configuration to match in a different preferred order, then retry the same call and verify that a different endpoint is matched instead.

You might have missed it when looking at the config, but the pjsip.conf on ast2 does have endpoint alice specified. Also, I manually did what you stated in the second part. I swapped the order of the endpoints in the 'identify_by_priority' option and the test failed as expected. I didn't state this in the testing done part, but I also then with the same config (the reversed one) modified the extensions.conf file so the username one passes and the ip extension fails and then it passed.

Were you thinking there was a way to automate this?


- Kevin


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


On March 2, 2015, 2:04 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4456/
> -----------------------------------------------------------
> 
> (Updated March 2, 2015, 2:04 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24840
>     https://issues.asterisk.org/jira/browse/ASTERISK-24840
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> It is possible that two or more endpoint identifiers could match against an incoming call. This test makes sure that no matter what order the endpoint identifier modules were loaded priority is given based on the ones specified in the global identify_by_priority option. See more details see https://reviewboard.asterisk.org/r/4455/
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/channels/pjsip/tests.yaml 6482 
>   /asterisk/trunk/tests/channels/pjsip/endpoint_identify/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/endpoint_identify/configs/ast2/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/endpoint_identify/configs/ast2/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/endpoint_identify/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/endpoint_identify/configs/ast1/extensions.conf PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/4456/diff/
> 
> 
> Testing
> -------
> 
> Ran the test without the code fix in and it would fail. Patched the code and it passed. Also modified the identify order and re-ran the test and it would fail as expected.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150304/5ca31bbe/attachment-0001.html>


More information about the asterisk-dev mailing list