<span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 12px"><div>Dave</div>
<div> </div>
<div>from_user fixed the issue. </div>
<div> </div>
<div>Thank You Thank You Thank You </div>
<div> </div>
<div>I was about ready to chuck pjsip. The lack of good / complete documentation is a real problem. </div>
<div>Man you saved me another late night. </div>
<div><br />
Thanks<br />
<br />
Bryant</div>
<div> </div>
<hr align="center" size="2" width="100%" />
<div><span style="font-family: tahoma,arial,sans-serif; font-size: 10pt;"><b>From</b>: "Dave Platt" <dplatt@radagast.org><br />
<b>Sent</b>: Tuesday, September 26, 2017 3:28 PM<br />
<b>To</b>: asterisk-users@lists.digium.com<br />
<b>Subject</b>: Re: [asterisk-users] Asterisk pjsip registration issues</span>
<div> </div>
<br />
> Hey all<br />
><br />
> I am trying to register a PJSIP server on our office to an Asterisk 11<br />
> chan_sip server in a datacenter.<br />
><br />
> I keep getting<br />
> WARNING[18084]: res_pjsip_outbound_authenticator_digest.c:178<br />
> digest_create_request_with_auth_from_old: Host: 'XXX.XXX.XXX.XXX:5060':<br />
> Unable to create request with auth. No auth credentials for realm(s)<br />
> 'asterisk' in challenge.<br />
><br />
> Any insights would be appreciated I have been banging my head for<br />
several<br />
> days now.<br />
<br />
I ran into a very similar problem when I tried to switch my PJSIP<br />
service with Vitelity from "fixed IP address" to "registration-based".<br />
I would try to place a call, and it would simply time out and then get<br />
a "busy here" error from Vitelity.<br />
<br />
Calls to a similar Vitelity sub-account from a Zoiper soft-phone worked<br />
just fine.<br />
<br />
I wiresharked the sessions and found that the critical difference seemed<br />
to be in the From: and Contact: headers. Zoiper set these to the<br />
Vitelity sub-account name (the registration name) while PJSIP just set<br />
them to "asterisk".<br />
<br />
I checked the PJSIP wizard file, and found that the outbound<br />
authentication object had the right username information in it,<br />
so that wasn't the problem.<br />
<br />
After stumbling around for hours, I found that it's necessary to<br />
set the "from_user" parameter in the endpoint object to match the<br />
username in the outbound authentication object. This causes PJSIP<br />
to send this value (rather than "asterisk") in the From and Contact<br />
fields of the INVITE, and this apparently gives the far end the<br />
information it needs to issue a proper credentials challenge.<br />
<br />
Once I added this one line to my definition and restarted, outbound<br />
calls worked like a charm.<br />
<br />
So, in pjsip_wizard, one would write something like<br />
<br />
[peername]<br />
type = wizard<br />
transport = transport-udp<br />
remote_hosts = outbound.peer.com<br />
sends_auth = yes<br />
endpoint/context = outbound<br />
endpoint/from_user = MYNAME<br />
outbound_auth/username = MYNAME<br />
outbound_auth/password = MYPASSWORD<br />
<br />
Modify and embellish as required. If you're writing your PJSIP<br />
objects individually rather than via the wizard, just set the<br />
fields in those objects appropriately.<br />
<br />
<br />
<br />
--<br />
_____________________________________________________________________<br />
-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br />
<br />
Check out the new Asterisk community forum at: https://community.asterisk.org/<br />
<br />
New to Asterisk? Start here:<br />
https://wiki.asterisk.org/wiki/display/AST/Getting+Started<br />
<br />
asterisk-users mailing list<br />
To UNSUBSCRIBE or update options visit:<br />
http://lists.digium.com/mailman/listinfo/asterisk-users<br />
</div></span>