On Sat, Apr 6, 2019, at 10:04 AM, sean darcy wrote:> On 4/5/19 10:36 AM, sean darcy wrote: > > I'm trying to set up pjsip to work with an obi202 and google voice. But > > I can't configure the endpoint. > > > > pjsip: > > > > [obi202-auth](!) > > type = auth > > auth_type = userpass > > password = <mypass> > > > > [obi202-aor](!) > > type = aor > > max_contacts = 2 > > > > ; ===== endpoints =======> > > > [gv-voice](obi202-endpoint) > > auth = gv-voice > > aors = gv-voice > > identify_by=auth_username > > ;identify_by=username ; I also tried this. Same result. > > context = gv-voice > > > > [gv-voice](obi202-auth) > > username = gv-voice > > > > [gv-voice](obi202-aor) > > > > ############## > > > > From the pjsip logging: > > > > <--- Received SIP request (798 bytes) from UDP:<obi_ip>:5062 ---> > > > > INVITE sip:<gv_num>@<ast_ip>:5060 SIP/2.0 > > > > Call-ID: bb384ee02eab7054 at 10.10.11.181 > > > > Content-Length: 270 > > > > CSeq: 8001 INVITE > > From: <sip:+1<calling_num>@<ast_ip>>;tag=SP377bfeeed75f36b8e > > Max-Forwards: 70 > > To: <sip:<calling_num>@<ast_ip>> > > Via: SIP/2.0/UDP <obi_ip>:5062;branch=z9hG4bK-fec7c7c4;rport > > User-Agent: OBIHAI/OBi202-3.2.2.5921 > > Contact: <sip:gv-voice@<obi_ip>:5062> > > Expires: 60 > > Supported: replaces > > Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE > > Content-Type: application/sdp > > > > v=0 > > > > o=- 112746442 1 IN IP4 10.10.11.181 > > s=- > > c=IN IP4 <obi_ip> > > t=0 0 > > m=audio 17076 RTP/AVP 0 101 104 8 > > a=rtpmap:0 PCMU/8000 > > a=rtpmap:101 telephone-event/8000 > > a=rtpmap:104 G726-32/8000 > > a=rtpmap:8 PCMA/8000 > > a=sendrecv > > a=ptime:20 > > a=xg726bitorder:big-endian > > > > [Apr 3 13:17:12] NOTICE[1762]: res_pjsip/pjsip_distributor.c:672 > > log_failed_request: Request 'INVITE' from > > '<sip:+1<calling_num>@10.10.11.180>' failed for '<obi_ip>:5062' ( > > callid: bb384ee02eab7054@<obi_ip>) - No matching endpoint found > > > > Any help appreciated. > > > > sean > > > > > > I'm expecting gv-voice to be the "matching endpoint". The INVITE has > gv-voice as the "Contact:" . Isn't this the "Username" in pjsip "auth" ?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. This also requires the endpoint to actually authenticate. -- Joshua C. Colp Digium - A Sangoma Company | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
On 4/8/19 6:18 AM, Joshua C. Colp wrote:> On Sat, Apr 6, 2019, at 10:04 AM, sean darcy wrote: >> On 4/5/19 10:36 AM, sean darcy wrote: >>> I'm trying to set up pjsip to work with an obi202 and google voice. But >>> I can't configure the endpoint. >>> >>> pjsip: >>> >>> [obi202-auth](!) >>> type = auth >>> auth_type = userpass >>> password = <mypass> >>> >>> [obi202-aor](!) >>> type = aor >>> max_contacts = 2 >>> >>> ; ===== endpoints =======>>> >>> [gv-voice](obi202-endpoint) >>> auth = gv-voice >>> aors = gv-voice >>> identify_by=auth_username >>> ;identify_by=username ; I also tried this. Same result. >>> context = gv-voice >>> >>> [gv-voice](obi202-auth) >>> username = gv-voice >>> >>> [gv-voice](obi202-aor) >>> >>> ############## >>> >>> From the pjsip logging: >>> >>> <--- Received SIP request (798 bytes) from UDP:<obi_ip>:5062 ---> >>> >>> INVITE sip:<gv_num>@<ast_ip>:5060 SIP/2.0 >>> >>> Call-ID: bb384ee02eab7054 at 10.10.11.181 >>> >>> Content-Length: 270 >>> >>> CSeq: 8001 INVITE >>> From: <sip:+1<calling_num>@<ast_ip>>;tag=SP377bfeeed75f36b8e >>> Max-Forwards: 70 >>> To: <sip:<calling_num>@<ast_ip>> >>> Via: SIP/2.0/UDP <obi_ip>:5062;branch=z9hG4bK-fec7c7c4;rport >>> User-Agent: OBIHAI/OBi202-3.2.2.5921 >>> Contact: <sip:gv-voice@<obi_ip>:5062> >>> Expires: 60 >>> Supported: replaces >>> Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE >>> Content-Type: application/sdp >>> >>> v=0 >>> >>> o=- 112746442 1 IN IP4 10.10.11.181 >>> s=- >>> c=IN IP4 <obi_ip> >>> t=0 0 >>> m=audio 17076 RTP/AVP 0 101 104 8 >>> a=rtpmap:0 PCMU/8000 >>> a=rtpmap:101 telephone-event/8000 >>> a=rtpmap:104 G726-32/8000 >>> a=rtpmap:8 PCMA/8000 >>> a=sendrecv >>> a=ptime:20 >>> a=xg726bitorder:big-endian >>> >>> [Apr 3 13:17:12] NOTICE[1762]: res_pjsip/pjsip_distributor.c:672 >>> log_failed_request: Request 'INVITE' from >>> '<sip:+1<calling_num>@10.10.11.180>' failed for '<obi_ip>:5062' ( >>> callid: bb384ee02eab7054@<obi_ip>) - No matching endpoint found >>> >>> Any help appreciated. >>> >>> sean >>> >>> >> >> I'm expecting gv-voice to be the "matching endpoint". The INVITE has >> gv-voice as the "Contact:" . Isn't this the "Username" in pjsip "auth" ? > > 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.Thanks for the reply. auth_username seems to be enabled: asterisk*CLI> pjsip show identifiers Identifier Names: name not specified ip username anonymous header auth_username Is the order a problem ? I set: endpoint_identifier_order=auth_username,"name not specified",ip,username,anonymous,header restarted. No errors. But no effect on the identifier order. From obi202 : SIP Credentials Parameter Name Value AuthUserName gv-voice AuthPassword password>This also requires the endpoint to actually authenticate.Not sure what this means. Of course, I agree, but how do I make this happen? BTW, this is 16.3.0. sean
On Tue, Apr 9, 2019 at 9:28 AM sean darcy <seandarcy2 at gmail.com> wrote:> On 4/8/19 6:18 AM, Joshua C. Colp wrote: > > On Sat, Apr 6, 2019, at 10:04 AM, sean darcy wrote: > >> On 4/5/19 10:36 AM, sean darcy wrote: > >>> I'm trying to set up pjsip to work with an obi202 and google voice. But > >>> I can't configure the endpoint. > >>> > >>> pjsip: > >>> > >>> [obi202-auth](!) > >>> type = auth > >>> auth_type = userpass > >>> password = <mypass> > >>> > >>> [obi202-aor](!) > >>> type = aor > >>> max_contacts = 2 > >>> > >>> ; ===== endpoints =======> >>> > >>> [gv-voice](obi202-endpoint) > >>> auth = gv-voice > >>> aors = gv-voice > >>> identify_by=auth_username > >>> ;identify_by=username ; I also tried this. Same result. > >>> context = gv-voice > >>> > >>> [gv-voice](obi202-auth) > >>> username = gv-voice > >>> > >>> [gv-voice](obi202-aor) > >>> ><snip>> >>> Any help appreciated. > >>> > >>> sean > >>> > >>> > >> > >> I'm expecting gv-voice to be the "matching endpoint". The INVITE has > >> gv-voice as the "Contact:" . Isn't this the "Username" in pjsip "auth" ? > > > > 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. > > Thanks for the reply. > > auth_username seems to be enabled: > > asterisk*CLI> pjsip show identifiers > Identifier Names: > name not specified > ip > username > anonymous > header > auth_username > > Is the order a problem ? > > I set: > > endpoint_identifier_order=auth_username,"name not > specified",ip,username,anonymous,header > > restarted. No errors. > > But no effect on the identifier order. > > From obi202 : > > SIP Credentials > Parameter Name Value > AuthUserName gv-voice > AuthPassword password > > >This also requires the endpoint to actually authenticate. > > Not sure what this means. Of course, I agree, but how do I make this > happen? > > BTW, this is 16.3.0. > > sean >So you're using the obi with 2 itsp accounts, one Google Voice and the other Asterisk yeah? Then forwarding calls between them? 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? 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... [gv-voice] type = identify match = <obi ip address>/<subnet mask> endpoint = gv-voice 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.> > > > -- > _____________________________________________________________________ > -- 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-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190409/bba5f14b/attachment.html>