SIP trunk outbound auth (no registration)

Connecting to Twilio’s voice application with asterisk 22.1.0 pjsip sending them calls work just fine, no registration just peer/ip acl.

If i enable authentication on the twilio side, i get the challenge back on the invite, but asterisk fails it and says
ERROR[92162]: res_pjsip_outbound_authenticator_digest.c:450 digest_create_request_with_auth: Endpoint: ‘trunk_twilio’: There were no auth ids available

here is a (mangled) config:

[auth_twilio]
type=auth
auth_type=userpass
password=mypass
username=whatever
realm=sip.twilio.com

[trunk_twilio]
type=endpoint
transport=transport-tcp
context=from-tw
send_rpid=yes
send_pai=yes
trust_id_inbound=no
trust_id_outbound=yes
direct_media=no
disallow=all
allow=ulaw
force_rport=yes
rewrite_contact=yes
aors=trunk_twilio
auth_outbound=auth_twilio

[trunk_twilio]
type=aor
qualify_frequency=0
contact=sip:myspecialnamehere.sip.twilio.com:5060

[trunk_twilio]
type=identify
match=twilio-ip-here
endpoint=trunk_twilio

i wonder if there is some misbehavior that it expects a registration for all outbound auths? or did i misplace something?

and i did compare the realm - the challenge looks as follows:

Proxy-Authenticate: Digest realm=“sip.twilio.com”,qop=“auth”,nonce=“stuffhere”,opaque=“morestuffhere”

Note the word order:

I am not understanding your reply - Line 222 is related to registrations, and the word “order” does not appear in that section.

Are you saying i have section or something out of needed order?

The section my configuration reflects is the one for endpoint/trunk without registration, and with auth - ref line 275

You have ‘auth_outbound’.
Remember, computers are stupid (including AI), the syntax is unforgiving.

oh wow - hah - i should have noticed that myself… ty cable!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.