<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 9, 2019 at 9:28 AM sean darcy <<a href="mailto:seandarcy2@gmail.com">seandarcy2@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 4/8/19 6:18 AM, Joshua C. Colp wrote:<br>
> On Sat, Apr 6, 2019, at 10:04 AM, sean darcy wrote:<br>
>> On 4/5/19 10:36 AM, sean darcy wrote:<br>
>>> I'm trying to set up pjsip to work with an obi202 and google voice. But<br>
>>> I can't configure the endpoint.<br>
>>><br>
>>> pjsip:<br>
>>><br>
>>> [obi202-auth](!)<br>
>>> type = auth<br>
>>> auth_type = userpass<br>
>>> password = <mypass><br>
>>><br>
>>> [obi202-aor](!)<br>
>>> type = aor<br>
>>> max_contacts = 2<br>
>>><br>
>>> ; ===== endpoints  ========<br>
>>><br>
>>> [gv-voice](obi202-endpoint)<br>
>>> auth = gv-voice<br>
>>> aors = gv-voice<br>
>>> identify_by=auth_username<br>
>>> ;identify_by=username ; I also tried this. Same result.<br>
>>> context = gv-voice<br>
>>><br>
>>> [gv-voice](obi202-auth)<br>
>>> username = gv-voice<br>
>>><br>
>>> [gv-voice](obi202-aor)<br>
>>><br></blockquote><div><br></div><div><snip></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>>> Any help appreciated.<br>
>>><br>
>>> sean<br>
>>><br>
>>><br>
>><br>
>> I'm expecting gv-voice to be the "matching endpoint". The INVITE has<br>
>> gv-voice as the "Contact:" . Isn't this the "Username" in pjsip "auth" ?<br>
> <br>
> Nope. The Contact is never considered for that. The From username is what is matched for an endpoint using the "username" option. The authentication username is what is matched for an endpoint using the "auth_username" option but you also need to ensure it is enabled in "endpoint_identifier_order" global option.<br>
<br>
Thanks for the reply.<br>
<br>
auth_username seems to be enabled:<br>
<br>
asterisk*CLI> pjsip show identifiers<br>
Identifier Names:<br>
name not specified<br>
ip<br>
username<br>
anonymous<br>
header<br>
auth_username<br>
<br>
Is the order a problem ?<br>
<br>
I set:<br>
<br>
endpoint_identifier_order=auth_username,"name not <br>
specified",ip,username,anonymous,header<br>
<br>
restarted. No errors.<br>
<br>
But no effect on the identifier order.<br>
<br>
 From obi202 :<br>
<br>
SIP Credentials<br>
Parameter Name  Value<br>
AuthUserName    gv-voice        <br>
AuthPassword    password<br>
<br>
>This also requires the endpoint to actually authenticate. <br>
<br>
Not sure what this means. Of course, I agree, but how do I make this happen?<br>
<br>
BTW, this is 16.3.0.<br>
<br>
sean<br></blockquote><div><br></div><div>So you're using the obi with 2 itsp accounts, one Google Voice and the other Asterisk yeah?  Then forwarding calls between them?</div><div>Are the credentials defined in the gv-voice auth object also configured in the obi account that points to Asterisk?  Is the obi registering successfully to Asterisk?</div><div><br></div><div>In this situation it might be better to treat the OBi like an ITSP in Asterisk.  Instead of using registration and userid/password authentication, add an "identify" object that matches on the obi's ip address and points to the gv-voice endpoint...<br></div><div><br></div><div>[gv-voice]</div><div>type = identify</div><div>match = <obi ip address>/<subnet mask></div><div>endpoint = gv-voice</div><div><br></div><div>This way you don't need to set up any auth objects at all and you just need to set "identify = ip" on the endpoint.</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
<br>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div></div>