Sonny Rajagopalan
2015-Mar-15 14:32 UTC
[asterisk-users] Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
I have setup my Asterisk 13.1.0 server with PJSIP on AWS/EC2. My basic configuration works, and I am connected to a SIP trunk using SIP.US, and have set up my inbound calling which works correctly (when I call my PBX DID, the call does come into my PBX network). The issue is that I am not able to make outbound calls, because the call fails with the error: res_pjsip_outbound_authenticator_digest.c:125 digest_create_request_with_auth: Unable to create request with auth.No auth credentials for any realms in challenge. CLI> pjsip show endpoint sonnyGW1 ... ======================================================================================== Endpoint: sonnyGW1 Not in use 0 of inf OutAuth: sonnyGW1_auth/sonny Aor: sonnyGW1 0 Contact: sonnyGW1/sip:65.254.44.194:5060 Unknown nan Transport: transport-udp udp 0 0 0.0.0.0:5060 Identify: sonnyGW1/sonnyGW1 Match: 65.254.44.194/32 My pjsip.conf is as below [sonnyGW1] type=registration transport=transport-udp outbound_auth=sonnyGW1_auth server_uri=sip:gw1.sip.us client_uri=sip:sonny at gw1.sip.us contact_user=sonny retry_interval=60 forbidden_retry_interval=600 expiration=3600 [sonnyGW1_auth] type=auth auth_type=userpass password=somepassword username=sonny realm=gw1.sip.us [sonnyGW1] type=aor contact=sip:65.254.44.194:5060 [sonnyGW1] type=endpoint transport=transport-udp context=gateway1 allow=!all,ulaw outbound_auth=sonnyGW1_auth aors=sonnyGW1 [sonnyGW1] type=identify endpoint=sonnyGW1 match=65.254.44.194 My extensions.conf stub for the appropriate section looks like this (from https://wiki.asterisk.org/wiki/display/AST/Dialing+PJSIP+Channels) : exten => _9XXXX.,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to ${EXTEN:1} through gateway1) exten => _9XXXX.,n,Dial(PJSIP/${EXTEN:1}@sonnyGW1) ; Have also tried ; exten => _9XXXX.,n,Dial(PJSIP/sip:${EXTEN:1}@65.254.44.194:5060) exten => _9XXXX.,n,Playtones(congestion) exten => _9XXXX.,n,Hangup() I do know that this code is being executed as I see the log in the first line above. Have I correctly set up authentication for outbound calling? Any help appreciated. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150315/2ff229db/attachment.html>
George Joseph
2015-Mar-15 16:19 UTC
[asterisk-users] Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan < sonny.rajagopalan at gmail.com> wrote:> I have setup my Asterisk 13.1.0 server with PJSIP on AWS/EC2. My basic > configuration works, and I am connected to a SIP trunk using SIP.US, and > have set up my inbound calling which works correctly (when I call my PBX > DID, the call does come into my PBX network). > > The issue is that I am not able to make outbound calls, because the call > fails with the error: > > res_pjsip_outbound_authenticator_digest.c:125 > digest_create_request_with_auth: Unable to create request with auth.No auth > credentials for any realms in challenge. > > CLI> pjsip show endpoint sonnyGW1 > > ... > ========================================================================================> > Endpoint: sonnyGW1 Not in use > 0 of inf > OutAuth: sonnyGW1_auth/sonny > Aor: sonnyGW1 0 > Contact: sonnyGW1/sip:65.254.44.194:5060 Unknown > nan > Transport: transport-udp udp 0 0 0.0.0.0:5060 > Identify: sonnyGW1/sonnyGW1 > Match: 65.254.44.194/32 > > My pjsip.conf is as below > > [sonnyGW1] > type=registration > transport=transport-udp > outbound_auth=sonnyGW1_auth > server_uri=sip:gw1.sip.us > client_uri=sip:sonny at gw1.sip.us > contact_user=sonny > retry_interval=60 > forbidden_retry_interval=600 > expiration=3600 > > [sonnyGW1_auth] > type=auth > auth_type=userpass > password=somepassword > username=sonny > realm=gw1.sip.us >You probably need to remove the 'realm' line so that it will match any realm in the challenge.> > [sonnyGW1] > type=aor > contact=sip:65.254.44.194:5060 > > [sonnyGW1] > type=endpoint > transport=transport-udp > context=gateway1 > allow=!all,ulaw > outbound_auth=sonnyGW1_auth > aors=sonnyGW1 > > [sonnyGW1] > type=identify > endpoint=sonnyGW1 > match=65.254.44.194 > > My extensions.conf stub for the appropriate section looks like this (from > https://wiki.asterisk.org/wiki/display/AST/Dialing+PJSIP+Channels) : > > exten => _9XXXX.,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to > ${EXTEN:1} through gateway1) > exten => _9XXXX.,n,Dial(PJSIP/${EXTEN:1}@sonnyGW1) > ; Have also tried > ; exten => _9XXXX.,n,Dial(PJSIP/sip:${EXTEN:1}@65.254.44.194:5060) > exten => _9XXXX.,n,Playtones(congestion) > exten => _9XXXX.,n,Hangup() > > I do know that this code is being executed as I see the log in the first > line above. > > Have I correctly set up authentication for outbound calling? > > Any help appreciated. Thanks! > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > 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/20150315/259dc6af/attachment.html>
Sonny Rajagopalan
2015-Mar-15 16:34 UTC
[asterisk-users] Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
That was the issue, thanks. I now am able to get the caller ringing on an outbound call, but an external phone number (E164) I am dialing does not ring. On Sun, Mar 15, 2015 at 12:19 PM, George Joseph <george.joseph at fairview5.com> wrote:> > > On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan < > sonny.rajagopalan at gmail.com> wrote: > >> I have setup my Asterisk 13.1.0 server with PJSIP on AWS/EC2. My basic >> configuration works, and I am connected to a SIP trunk using SIP.US, and >> have set up my inbound calling which works correctly (when I call my PBX >> DID, the call does come into my PBX network). >> >> The issue is that I am not able to make outbound calls, because the call >> fails with the error: >> >> res_pjsip_outbound_authenticator_digest.c:125 >> digest_create_request_with_auth: Unable to create request with auth.No auth >> credentials for any realms in challenge. >> >> CLI> pjsip show endpoint sonnyGW1 >> >> ... >> ========================================================================================>> >> Endpoint: sonnyGW1 Not in use >> 0 of inf >> OutAuth: sonnyGW1_auth/sonny >> Aor: sonnyGW1 0 >> Contact: sonnyGW1/sip:65.254.44.194:5060 Unknown >> nan >> Transport: transport-udp udp 0 0 0.0.0.0:5060 >> Identify: sonnyGW1/sonnyGW1 >> Match: 65.254.44.194/32 >> >> My pjsip.conf is as below >> >> [sonnyGW1] >> type=registration >> transport=transport-udp >> outbound_auth=sonnyGW1_auth >> server_uri=sip:gw1.sip.us >> client_uri=sip:sonny at gw1.sip.us >> contact_user=sonny >> retry_interval=60 >> forbidden_retry_interval=600 >> expiration=3600 >> >> [sonnyGW1_auth] >> type=auth >> auth_type=userpass >> password=somepassword >> username=sonny >> realm=gw1.sip.us >> > > You probably need to remove the 'realm' line so that it will match any > realm in the challenge. > > >> >> [sonnyGW1] >> type=aor >> contact=sip:65.254.44.194:5060 >> >> [sonnyGW1] >> type=endpoint >> transport=transport-udp >> context=gateway1 >> allow=!all,ulaw >> outbound_auth=sonnyGW1_auth >> aors=sonnyGW1 >> >> [sonnyGW1] >> type=identify >> endpoint=sonnyGW1 >> match=65.254.44.194 >> >> My extensions.conf stub for the appropriate section looks like this (from >> https://wiki.asterisk.org/wiki/display/AST/Dialing+PJSIP+Channels) : >> >> exten => _9XXXX.,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to >> ${EXTEN:1} through gateway1) >> exten => _9XXXX.,n,Dial(PJSIP/${EXTEN:1}@sonnyGW1) >> ; Have also tried >> ; exten => _9XXXX.,n,Dial(PJSIP/sip:${EXTEN:1}@65.254.44.194:5060) >> exten => _9XXXX.,n,Playtones(congestion) >> exten => _9XXXX.,n,Hangup() >> >> I do know that this code is being executed as I see the log in the first >> line above. >> >> Have I correctly set up authentication for outbound calling? >> >> Any help appreciated. Thanks! >> >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> New to Asterisk? Join us for a live introductory webinar every Thurs: >> http://www.asterisk.org/hello >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users >> > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > 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/20150315/2c44a5f5/attachment.html>
Possibly Parallel Threads
- Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
- Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
- Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
- Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.
- Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth credentials for any realms in challenge.