Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Asterisk 13.1.0/PJSIP outbound calling using SIP trunk: Unable to create request with auth.No auth cred


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
sonny.rajagopalan at g...
Guest





PostPosted: Sun Mar 15, 2015 9:33 am    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

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@gw1.sip.us ([email]sip%3Asonny@gw1.sip.us[/email])
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:${[url=http://EXTEN:1}@65.254.44.194:5060]EXTEN:1}@65.254.44.194:5060[/url])
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!
Back to top
george.joseph at fairv...
Guest





PostPosted: Sun Mar 15, 2015 11:20 am    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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@gw1.sip.us ([email]sip%3Asonny@gw1.sip.us[/email])
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.
 
Quote:


[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
Back to top
sonny.rajagopalan at g...
Guest





PostPosted: Sun Mar 15, 2015 11:35 am    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

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@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote:


On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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@gw1.sip.us ([email]sip%3Asonny@gw1.sip.us[/email])
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.
 
Quote:


[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
Back to top
george.joseph at fairv...
Guest





PostPosted: Sun Mar 15, 2015 2:25 pm    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

On Sun, Mar 15, 2015 at 10:34 AM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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.


Any error messages?  If you set 'core set verbose 3' and try it, does the Dial get executed?


 
Quote:

On Sun, Mar 15, 2015 at 12:19 PM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote:


On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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@gw1.sip.us ([email]sip%3Asonny@gw1.sip.us[/email])
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.
 
Quote:


[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




--
_____________________________________________________________________
-- 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
Back to top
sonny.rajagopalan at g...
Guest





PostPosted: Sun Mar 15, 2015 2:33 pm    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

Yes, I think the dial does get executed (sonny calling outbound 202-555-1212):

core set verbose 3
Console verbose was OFF and is now 3.
    -- Executing [912025551212@from-internal:1] Log("PJSIP/sonny-00000031", "NOTICE, Dialing out from "" <sonny> to 12025551212 through fromgw") in new stack
[Mar 15 19:27:06] NOTICE[16648][C-00000022]: Ext. 912025551212:1 @ from-internal:  Dialing out from "" <sonny> to 12025551212 through fromgw
    -- Executing [912025551212@from-internal:2] Dial("PJSIP/sonny-00000031", "PJSIP/12025551212@sonnyGW1") in new stack
    -- Called PJSIP/12025551212@sonnyGW1


the number 202-555-1212 does not ring.


at hangup on caller (sonny):


  == Spawn extension (from-internal, 912025551212, 2) exited non-zero on 'PJSIP/sonny-00000031'



On Sun, Mar 15, 2015 at 3:25 PM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote:
On Sun, Mar 15, 2015 at 10:34 AM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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.


Any error messages?  If you set 'core set verbose 3' and try it, does the Dial get executed?


 
Quote:

On Sun, Mar 15, 2015 at 12:19 PM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote:


On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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@gw1.sip.us ([email]sip%3Asonny@gw1.sip.us[/email])
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.
 
Quote:


[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




--
_____________________________________________________________________
-- 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
Back to top
george.joseph at fairv...
Guest





PostPosted: Sun Mar 15, 2015 3:01 pm    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

On Sun, Mar 15, 2015 at 1:33 PM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
Yes, I think the dial does get executed (sonny calling outbound 202-555-1212):

core set verbose 3
Console verbose was OFF and is now 3.
    -- Executing [912025551212@from-internal:1] Log("PJSIP/sonny-00000031", "NOTICE, Dialing out from "" <sonny> to 12025551212 through fromgw") in new stack
[Mar 15 19:27:06] NOTICE[16648][C-00000022]: Ext. 912025551212:1 @ from-internal:  Dialing out from "" <sonny> to 12025551212 through fromgw
    -- Executing [912025551212@from-internal:2] Dial("PJSIP/sonny-00000031", "PJSIP/12025551212@sonnyGW1") in new stack
    -- Called PJSIP/12025551212@sonnyGW1


the number 202-555-1212 does not ring.




You're probably going to have to turn on debug for the pjsip endpoint with 'pjsip set logger host <server>' and look at the actual outbound INVITE and any response.
 

Quote:


at hangup on caller (sonny):


  == Spawn extension (from-internal, 912025551212, 2) exited non-zero on 'PJSIP/sonny-00000031'



On Sun, Mar 15, 2015 at 3:25 PM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote:
On Sun, Mar 15, 2015 at 10:34 AM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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.


Any error messages?  If you set 'core set verbose 3' and try it, does the Dial get executed?


 
Quote:

On Sun, Mar 15, 2015 at 12:19 PM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote:


On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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@gw1.sip.us ([email]sip%3Asonny@gw1.sip.us[/email])
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.
 
Quote:


[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




--
_____________________________________________________________________
-- 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




--
_____________________________________________________________________
-- 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
Back to top
sonny.rajagopalan at g...
Guest





PostPosted: Sun Mar 15, 2015 3:17 pm    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

I am out now, and can happily send details in a couple of hours. However, I can give you a summary of what happens. The PBX sends an invite and I immediately start ringing at the caller (100 trying) and the I get a 407 proxy auth required to which the server responds but clearly the sip gateway is not happy with this.

Thank you for responding!

On Sunday, March 15, 2015, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote:
On Sun, Mar 15, 2015 at 1:33 PM, Sonny Rajagopalan <[url=javascript:_e(%7B%7D,'cvml','sonny.rajagopalan@gmail.com');]sonny.rajagopalan@gmail.com[/url]> wrote:
Quote:
Yes, I think the dial does get executed (sonny calling outbound 202-555-1212):

core set verbose 3
Console verbose was OFF and is now 3.
    -- Executing [912025551212@from-internal:1] Log("PJSIP/sonny-00000031", "NOTICE, Dialing out from "" <sonny> to 12025551212 through fromgw") in new stack
[Mar 15 19:27:06] NOTICE[16648][C-00000022]: Ext. 912025551212:1 @ from-internal:  Dialing out from "" <sonny> to 12025551212 through fromgw
    -- Executing [912025551212@from-internal:2] Dial("PJSIP/sonny-00000031", "PJSIP/12025551212@sonnyGW1") in new stack
    -- Called PJSIP/12025551212@sonnyGW1


the number 202-555-1212 does not ring.




You're probably going to have to turn on debug for the pjsip endpoint with 'pjsip set logger host <server>' and look at the actual outbound INVITE and any response.
 

Quote:


at hangup on caller (sonny):


  == Spawn extension (from-internal, 912025551212, 2) exited non-zero on 'PJSIP/sonny-00000031'



On Sun, Mar 15, 2015 at 3:25 PM, George Joseph <[url=javascript:_e(%7B%7D,'cvml','george.joseph@fairview5.com');]george.joseph@fairview5.com[/url]> wrote:
Quote:
On Sun, Mar 15, 2015 at 10:34 AM, Sonny Rajagopalan <[url=javascript:_e(%7B%7D,'cvml','sonny.rajagopalan@gmail.com');]sonny.rajagopalan@gmail.com[/url]> wrote:
Quote:
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.


Any error messages?  If you set 'core set verbose 3' and try it, does the Dial get executed?


 
Quote:

On Sun, Mar 15, 2015 at 12:19 PM, George Joseph <[url=javascript:_e(%7B%7D,'cvml','george.joseph@fairview5.com');]george.joseph@fairview5.com[/url]> wrote:
Quote:


On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan <[url=javascript:_e(%7B%7D,'cvml','sonny.rajagopalan@gmail.com');]sonny.rajagopalan@gmail.com[/url]> wrote:
Quote:
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=[url=javascript:_e(%7B%7D,'cvml','sip:sonny@gw1.sip.us');]sip:sonny@gw1.sip.us[/url]
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.
 
Quote:


[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




--
_____________________________________________________________________
-- 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




--
_____________________________________________________________________
-- 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




Back to top
sonny.rajagopalan at g...
Guest





PostPosted: Sun Mar 15, 2015 6:56 pm    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

George,


I have the detailed log below. (Resending after trimming the email to 40KB.)


The sequence below just repeats ad-nauseam. Is this a SIP trunk issue?


Thanks!


---------------------


Transmitting SIP request (885 bytes) to UDP:65.254.44.194:5060 --->
INVITE sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP 18.18.19.123:5060;rport;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>
Contact: <sip:dea9e47d-3a06-4e6e-b88f-8bac70fb6e0b@18.18.19.123:5060>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
in-SE: 90
Content-Type: application/sdp
Content-Length:   239


v=0
o=- 1014372762 1014372762 IN IP4 192.168.13.121
s=Asterisk
c=IN IP4 18.18.19.123
t=0 0
m=audio 11614 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv


[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (342 bytes) from UDP:65.254.44.194:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 18.18.19.123:5060;rport=5060;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2;received=18.18.19.123
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 INVITE
Content-Length: 0




[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (539 bytes) from UDP:65.254.44.194:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 18.18.19.123:5060;rport=5060;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2;received=18.18.19.123
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>;tag=2484f1a5f06b7307c34ab1dd8d74150a.188a
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 INVITE
Proxy-Authenticate: Digest realm="65.254.44.194", nonce="VQYKoVUGCEmlb1riTSTWwGKGMJZeqn7uVKO5AGraoWJnidF+hUD12HhxBszB", qop="auth"
Content-Length: 0




[Kip-192.168.13.121*CLI> [0K<--- Transmitting SIP request (382 bytes) to UDP:65.254.44.194:5060 --->
ACK sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP 18.18.19.123:5060;rport;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>;tag=2484f1a5f06b7307c34ab1dd8d74150a.188a
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 ACK
Content-Length:  0




[Kip-192.168.13.121*CLI> [0K<--- Transmitting SIP request (1186 bytes) to UDP:65.254.44.194:5060 --->
INVITE sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP 18.18.19.123:5060;rport;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>
Contact: <sip:dea9e47d-3a06-4e6e-b88f-8bac70fb6e0b@18.18.19.123:5060>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
in-SE: 90
Proxy-Authorization: Digest username="sonny", realm="65.254.44.194", nonce="VQYKoVUGCEmlb1riTSTWwGKGMJZeqn7uVKO5AGraoWJnidF+hUD12HhxBszB", uri="sip:12025551212@65.254.44.194:5060", response="18623a3fec388b9b85dc8f2bcd023083", cnonce="4616a975-1521-4db5-b4d5-53b33ffba4b6", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length:   239


v=0
o=- 1014372762 1014372762 IN IP4 192.168.13.121
s=Asterisk
c=IN IP4 18.18.19.123
t=0 0
m=audio 11614 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv


[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (342 bytes) from UDP:65.254.44.194:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 18.18.19.123:5060;rport=5060;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076;received=18.18.19.123
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 INVITE
Content-Length: 0




[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (539 bytes) from UDP:65.254.44.194:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 18.18.19.123:5060;rport=5060;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076;received=18.18.19.123
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>;tag=2484f1a5f06b7307c34ab1dd8d74150a.f6bc
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 INVITE
Proxy-Authenticate: Digest realm="65.254.44.194", nonce="VQYKoVUGCEkkNCFzVwnTNw69uvD+cH8QVKO5AGraoWJnidF+hUD12HK5Ps7A", qop="auth"
Content-Length: 0




[Kip-192.168.13.121*CLI> [0K<--- Transmitting SIP request (382 bytes) to UDP:65.254.44.194:5060 --->
ACK sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP 18.18.19.123:5060;rport;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>;tag=2484f1a5f06b7307c34ab1dd8d74150a.f6bc
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 ACK
Content-Length:  0
Back to top
george.joseph at fairv...
Guest





PostPosted: Sun Mar 15, 2015 8:37 pm    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

On Sun, Mar 15, 2015 at 5:56 PM, Sonny Rajagopalan
<sonny.rajagopalan@gmail.com> wrote:
Quote:
George,

I have the detailed log below. (Resending after trimming the email to 40KB.)

The sequence below just repeats ad-nauseam. Is this a SIP trunk issue?

Thanks!


I don't see anything obvious. The registration works though, right?
You might want to compare the register auth exchange to the invite
auth exchange and see if anything differs.

Quote:
---------------------

Transmitting SIP request (885 bytes) to UDP:65.254.44.194:5060 --->
INVITE sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP
18.18.19.123:5060;rport;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2
From: <sip:sonny@192.168.13.121>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194>
Contact: <sip:dea9e47d-3a06-4e6e-b88f-8bac70fb6e0b@18.18.19.123:5060>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL,
UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
in-SE: 90
Content-Type: application/sdp
Content-Length: 239

v=0
o=- 1014372762 1014372762 IN IP4 192.168.13.121
s=Asterisk
c=IN IP4 18.18.19.123
t=0 0
m=audio 11614 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (342 bytes) from
UDP:65.254.44.194:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
18.18.19.123:5060;rport=5060;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2;received=18.18.19.123
From: <sip:sonny@192.168.13.121>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 INVITE
Content-Length: 0


[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (539 bytes) from
UDP:65.254.44.194:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP
18.18.19.123:5060;rport=5060;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2;received=18.18.19.123
From: <sip:sonny@192.168.13.121>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To:
<sip:12025551212@65.254.44.194>;tag=2484f1a5f06b7307c34ab1dd8d74150a.188a
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 INVITE
Proxy-Authenticate: Digest realm="65.254.44.194",
nonce="VQYKoVUGCEmlb1riTSTWwGKGMJZeqn7uVKO5AGraoWJnidF+hUD12HhxBszB",
qop="auth"
Content-Length: 0


[Kip-192.168.13.121*CLI> [0K<--- Transmitting SIP request (382 bytes) to
UDP:65.254.44.194:5060 --->
ACK sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP
18.18.19.123:5060;rport;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2
From: <sip:sonny@192.168.13.121>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To:
<sip:12025551212@65.254.44.194>;tag=2484f1a5f06b7307c34ab1dd8d74150a.188a
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 ACK
Content-Length: 0


[Kip-192.168.13.121*CLI> [0K<--- Transmitting SIP request (1186 bytes) to
UDP:65.254.44.194:5060 --->
INVITE sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP
18.18.19.123:5060;rport;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076
From: <sip:sonny@192.168.13.121>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194>
Contact: <sip:dea9e47d-3a06-4e6e-b88f-8bac70fb6e0b@18.18.19.123:5060>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL,
UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
in-SE: 90
Proxy-Authorization: Digest username="sonny", realm="65.254.44.194",
nonce="VQYKoVUGCEmlb1riTSTWwGKGMJZeqn7uVKO5AGraoWJnidF+hUD12HhxBszB",
uri="sip:12025551212@65.254.44.194:5060",
response="18623a3fec388b9b85dc8f2bcd023083",
cnonce="4616a975-1521-4db5-b4d5-53b33ffba4b6", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length: 239

v=0
o=- 1014372762 1014372762 IN IP4 192.168.13.121
s=Asterisk
c=IN IP4 18.18.19.123
t=0 0
m=audio 11614 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (342 bytes) from
UDP:65.254.44.194:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
18.18.19.123:5060;rport=5060;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076;received=18.18.19.123
From: <sip:sonny@192.168.13.121>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 INVITE
Content-Length: 0


[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (539 bytes) from
UDP:65.254.44.194:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP
18.18.19.123:5060;rport=5060;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076;received=18.18.19.123
From: <sip:sonny@192.168.13.121>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To:
<sip:12025551212@65.254.44.194>;tag=2484f1a5f06b7307c34ab1dd8d74150a.f6bc
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 INVITE
Proxy-Authenticate: Digest realm="65.254.44.194",
nonce="VQYKoVUGCEkkNCFzVwnTNw69uvD+cH8QVKO5AGraoWJnidF+hUD12HK5Ps7A",
qop="auth"
Content-Length: 0


[Kip-192.168.13.121*CLI> [0K<--- Transmitting SIP request (382 bytes) to
UDP:65.254.44.194:5060 --->
ACK sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP
18.18.19.123:5060;rport;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076
From: <sip:sonny@192.168.13.121>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To:
<sip:12025551212@65.254.44.194>;tag=2484f1a5f06b7307c34ab1dd8d74150a.f6bc
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 ACK
Content-Length: 0

--
_____________________________________________________________________
-- 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
Back to top
sonny.rajagopalan at g...
Guest





PostPosted: Sun Mar 15, 2015 8:44 pm    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

Yes, the registration works. I'll check the auth on registration.

On Sun, Mar 15, 2015 at 9:37 PM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote:
On Sun, Mar 15, 2015 at 5:56 PM, Sonny Rajagopalan
<sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
George,

I have the detailed log below. (Resending after trimming the email to 40KB.)

The sequence below just repeats ad-nauseam. Is this a SIP trunk issue?

Thanks!


I don't see anything obvious.  The registration works though, right?
You might want to compare the register auth exchange to the invite
auth exchange and see if anything differs.

Quote:
---------------------

Transmitting SIP request (885 bytes) to UDP:65.254.44.194:5060 --->
INVITE sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP
18.18.19.123:5060;rport;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>
Contact: <sip:dea9e47d-3a06-4e6e-b88f-8bac70fb6e0b@18.18.19.123:5060>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL,
UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
in-SE: 90
Content-Type: application/sdp
Content-Length:   239

v=0
o=- 1014372762 1014372762 IN IP4 192.168.13.121
s=Asterisk
c=IN IP4 18.18.19.123
t=0 0
m=audio 11614 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (342 bytes) from
UDP:65.254.44.194:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
18.18.19.123:5060;rport=5060;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2;received=18.18.19.123
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 INVITE
Content-Length: 0


[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (539 bytes) from
UDP:65.254.44.194:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP
18.18.19.123:5060;rport=5060;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2;received=18.18.19.123
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To:
<sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>;tag=2484f1a5f06b7307c34ab1dd8d74150a.188a
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 INVITE
Proxy-Authenticate: Digest realm="65.254.44.194",
nonce="VQYKoVUGCEmlb1riTSTWwGKGMJZeqn7uVKO5AGraoWJnidF+hUD12HhxBszB",
qop="auth"
Content-Length: 0


[Kip-192.168.13.121*CLI> [0K<--- Transmitting SIP request (382 bytes) to
UDP:65.254.44.194:5060 --->
ACK sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP
18.18.19.123:5060;rport;branch=z9hG4bKPj70617ad5-d57a-4e5b-8043-086b0b8ebba2
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To:
<sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>;tag=2484f1a5f06b7307c34ab1dd8d74150a.188a
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6753 ACK
Content-Length:  0


[Kip-192.168.13.121*CLI> [0K<--- Transmitting SIP request (1186 bytes) to
UDP:65.254.44.194:5060 --->
INVITE sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP
18.18.19.123:5060;rport;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>
Contact: <sip:dea9e47d-3a06-4e6e-b88f-8bac70fb6e0b@18.18.19.123:5060>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL,
UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
in-SE: 90
Proxy-Authorization: Digest username="sonny", realm="65.254.44.194",
nonce="VQYKoVUGCEmlb1riTSTWwGKGMJZeqn7uVKO5AGraoWJnidF+hUD12HhxBszB",
uri="sip:12025551212@65.254.44.194:5060",
response="18623a3fec388b9b85dc8f2bcd023083",
cnonce="4616a975-1521-4db5-b4d5-53b33ffba4b6", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length:   239

v=0
o=- 1014372762 1014372762 IN IP4 192.168.13.121
s=Asterisk
c=IN IP4 18.18.19.123
t=0 0
m=audio 11614 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (342 bytes) from
UDP:65.254.44.194:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
18.18.19.123:5060;rport=5060;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076;received=18.18.19.123
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To: <sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 INVITE
Content-Length: 0


[Kip-192.168.13.121*CLI> [0K<--- Received SIP response (539 bytes) from
UDP:65.254.44.194:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP
18.18.19.123:5060;rport=5060;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076;received=18.18.19.123
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To:
<sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>;tag=2484f1a5f06b7307c34ab1dd8d74150a.f6bc
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 INVITE
Proxy-Authenticate: Digest realm="65.254.44.194",
nonce="VQYKoVUGCEkkNCFzVwnTNw69uvD+cH8QVKO5AGraoWJnidF+hUD12HK5Ps7A",
qop="auth"
Content-Length: 0


[Kip-192.168.13.121*CLI> [0K<--- Transmitting SIP request (382 bytes) to
UDP:65.254.44.194:5060 --->
ACK sip:12025551212@65.254.44.194:5060 SIP/2.0
Via: SIP/2.0/UDP
18.18.19.123:5060;rport;branch=z9hG4bKPjda9b69bb-a368-4ec0-a523-df5a920a7076
From: <sip:sonny@192.168.13.121 ([email]sip%3Asonny@192.168.13.121[/email])>;tag=6953923b-1798-41a0-a983-fe27ff6a1db8
To:
<sip:12025551212@65.254.44.194 ([email]sip%3A12025551212@65.254.44.194[/email])>;tag=2484f1a5f06b7307c34ab1dd8d74150a.f6bc
Call-ID: 012135e9-b05e-4ffd-8ed7-32b3160273e3
CSeq: 6754 ACK
Content-Length:  0

--
_____________________________________________________________________
-- 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
Back to top
sonny.rajagopalan at g...
Guest





PostPosted: Tue Mar 24, 2015 3:10 pm    Post subject: [asterisk-users] Asterisk 13.1.0/PJSIP outbound calling usin Reply with quote

Hi George,


Well, as it turns out the removal of "realm" in sonnyGW1_auth above does not remove the issue. I still see the issue. I did not see the issue earlier likely due to the CLI logging command mixup which I have now solved using a wireshark trace (CLI was just too verbose). I see the 407 authentication required still, and the following pattern just repeats at the Asterisk server (which is connected to the SIP trunk at 65.254.44.194) because the SIP trunk needs it to complete the outbound call, but the Asterisk server doesn't ever send it even after the 407 from the SIP trunk:

Wireshark trace of failed outbound call:


 217274 5915.986472000 sonnysMachine         65.254.44.194         SIP/SDP  1227   Request: INVITE sip:16175551212@65.254.44.194:5060 |
 217280 5916.059148000 65.254.44.194         sonnysMachine         SIP      385    Status: 100 Trying | 
 217282 5916.059909000 65.254.44.194         sonnysMachine         SIP      582    Status: 407 Proxy Authentication Required | 
 217285 5916.060227000 sonnysMachine         65.254.44.194         SIP      425    Request: ACK sip:16175551212@65.254.44.194:5060 |

...
(repeats ad infinitum)


When I look at the challenge in 407 Proxy Authentication Required from the server, I see that the realm is 65.254.44.194 (gw1.sip.us), but the appropriate Authorization (sent in the trunk registration, for example) is never sent back from the Asterisk server. Here's what the SIP trunk actually says (407 Auth required message; the nonce was changed by me):


Wireshark detail of 407 Proxy Authentication Required packet from SIP trunk:



Proxy-Authenticate: Digest realm="65.254.44.194", nonce="BLUBBERbbb/e495019b-83b4-491c-8f33-3e238a3c6af2", qop="auth"
            Authentication Scheme: Digest
            Realm: "65.254.44.194"
            Nonce Value: "BLUBBERbbb/e495019b-83b4-491c-8f33-3e238a3c6af2"
            QOP: "auth"



And here's how the SIP trunk registration works (correctly); note the bigger REGISTER message in the 3rd line pertaining to the registration at 65.254.44.194, it pertains to the additional 274 bytes of authentication information:


Wireshark detail of successful SIP trunk registration:


  12634 230.390420000  sonnysMachine         65.254.44.194         SIP      543    Request: REGISTER sip:gw1.sip.us    (fetch bindings) |

  12635 230.461572000  65.254.44.194         sonnysMachine         SIP      560    Status: 401 Unauthorized    (0 bindings) | 
  12637 230.462041000  sonnysMachine         65.254.44.194         SIP      815    Request: REGISTER sip:gw1.sip.us    (fetch bindings) | 
  12639 230.535100000  65.254.44.194         sonnysMachine         SIP      486    Status: 200 OK    (0 bindings) |





Any help is deeply appreciated.


Has anyone successfully done SIP trunk registration with PJSIP in Asterisk 13.1.0?


On Sun, Mar 15, 2015 at 12:34 PM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote:


On Sun, Mar 15, 2015 at 8:32 AM, Sonny Rajagopalan <sonny.rajagopalan@gmail.com (sonny.rajagopalan@gmail.com)> wrote:
Quote:
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@gw1.sip.us ([email]sip%3Asonny@gw1.sip.us[/email])
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.
 
Quote:


[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



Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services