Re: [asterisk-users] pjsip user_eq_phone adds user=phone to anonymous user bug?

2017-06-09 Thread Daniel Tryba
On Fri, Jun 09, 2017 at 11:40:01AM -0300, Joshua Colp wrote:
> What seems to be happening is that the session is being set up and the
> user=phone parameter added. It's only after that the values are updated
> to be Anonymous and the user=phone parameter is left there. Please file
> an issue[1] with the description above.

Issue created:
https://issues.asterisk.org/jira/browse/ASTERISK-27047


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] pjsip user_eq_phone adds user=phone to anonymous user bug?

2017-06-09 Thread Joshua Colp
On Fri, Jun 9, 2017, at 11:30 AM, Daniel Tryba wrote:
> With pjsip (asterisk 13.14.1) I see the problem that an anonymous from
> header gets user=phone appendend to the URI if user_eq_phone=yes is
> specified:
> 
> On the incoming leg:
> From: anonymous
> ;tag=Q5zBj7BMnvI6Fe6O2866fox3ZHmn-smt
> Get transformed to 
> From: "Anonymous"
> ;tag=fa3cb748-6af9-485f-8a70-a2b9ad40b13a
> on the outgoing leg.
> 
> Setting user_eq_phone = no will result in user=phone not being added.
> The upstream provide demands user=phone in URIs if the username
> resembles a phonenumber, but declines the INVITE if user=phone is
> present on an anonymous username.



> sip_uri->user should be "anonymous"
> AST_DIGIT_ANY is: #define AST_DIGIT_ANYNUM "0123456789"
> 
> So in the for loop the first char of sip_uri->user should result in a
> NULL from strchr. Leaving i at the value 0, which is smaller than the
> length of sip_uri->user. And thus the function should return before
> adding the user=phone. So why is user=phone being added?

What seems to be happening is that the session is being set up and the
user=phone parameter added. It's only after that the values are updated
to be Anonymous and the user=phone parameter is left there. Please file
an issue[1] with the description above.

[1] https://issues.asterisk.org/jira

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users