[Asterisk-code-review] res pjsip/pjsip options: Fix From generation on outgoing OP... (asterisk[13])

George Joseph asteriskteam at digium.com
Tue Mar 15 09:40:07 CDT 2016


George Joseph has posted comments on this change.

Change subject: res_pjsip/pjsip_options:  Fix From generation on outgoing OPTIONS
......................................................................


Patch Set 6:

(2 comments)

https://gerrit.asterisk.org/#/c/2373/6/res/res_pjsip.c
File res/res_pjsip.c:

Line 2916: 	fromuser = endpoint ? (!ast_strlen_zero(endpoint->fromuser) ? endpoint->fromuser : ast_sorcery_object_get_id(endpoint)) : NULL;
> This differs from the behavior of the rest of things by using the endpoint 
True but since we EXPECT the endpoint id in From, it only made sense to put it there in outgoing OOD requests instead of letting it default to 'asterisk' or whatever the default was set to.  Setting from_user on an endpoint will set it for ALL outgoing requests which is probably NOT what we want.


https://gerrit.asterisk.org/#/c/2373/6/res/res_pjsip/pjsip_options.c
File res/res_pjsip/pjsip_options.c:

Line 341: 		endpoint_local = find_an_endpoint(contact);
> Why do you need to always find the endpoint here? We actually only care abo
2 reasons...
Setting a more recognizable From is always a good thing, even on OOD requests, especially if Asterisk is on the receiving end.  Just sending 'asterisk' causes an unidentified failure on the remote end if it's not identified by ip address.

We can use the correct transport.  This was the only remaining place where the transport specified on an endpoint was being ignored.  So if you had more than 1 UDP transport, pjproject was always using the last one we configured.


-- 
To view, visit https://gerrit.asterisk.org/2373
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2207e12bb435e373bd1e03ad091d82e5aba011af
Gerrit-PatchSet: 6
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list