with chan_sip, I can simply directly call another server with Dial(SIP/user@domain.tld)
With PJSIP, I created a dummy endpoint and tried with Dial(PJSIP/dummy/sip:user@domain.tld)
with no luck:
res_pjsip_outbound_authenticator_digest.c:178 digest_create_request_with_auth:
Endpoint: 'dummy': Unable to create request with auth.
No auth credentials for realm(s) 'domain.tld' in challenge.
Well, yes… I don’t want any auth…
In my pjsip.conf I just added:
[dummy]
type=endpoint
Do I have to configure anything else for this to work?
The other side does though, and that can only be changed from the other side (although note that there are reports that flowroute can have authentication requests suppressed by using a modified outbound URI).
Thanks - finally I did a SIP trace and found out weird behaviour of the called target.
The target normally does not enforce authentication, but it does somehow in my case, because of a problem with the SDP. The log debug log of the called device states, that it’s rejecting an unauthenticated call with missing mandatory SDP information.
It’s odd behaviour, but it’s definetely caused by an invalid SDP sent from my Asterisk:
That (null) instead of the IP address is causing the problem.
When calling another server (an Asterisk server with chan_sip), that call gets rejected with SIP/488 because of incomplete SDP information.
.
In pjsip.conf I configured a transport with:
[transport-udp](!)
type = transport
protocol = udp
[transport-udp-ipv4-1](transport-udp)
bind = 192.168.0.166
local_net = 192.168.0.0/16
external_media_address = 93.209.xxxx
external_signaling_address = 93.209.xxxx
It think I’ve hit a bug, or at least, an unexpected behaviour:
If I don’t set “stunaddr=mystunserver:3478” in rtp.conf, the Media IP field is “(null)”.
As soon as I add the STUN server configuration, it gets populated with the IP address determined by STUN.
Where is the packet going? Within local_net or external? Is that your actual configuration? What’s the full SIP request? Are you selectively loading modules?