No Incoming calls from SIP TRUNK

I am using voipvoip.com sip trunk, Internal calls and outbound calls are working perfectly but when i call the DID number from my phone it doesn’t work , sometimes it keeps on ringing but there’s no output in Asterisk CLI and sometimes it rings for like 3 seconds and then disconnects , when this happens I see SIP Logs in CLI but other times there’s nothing. Please Help !

Here are my configurations:

###########PJSIP.CONF############
[global]
type=global

[0.0.0.0-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
external_media_address=65.3.162.241
external_signaling_address=65.3.162.241
allow_reload=no
tos=cs3
cos=3
local_net=171.21.31.222/24

[VoIPVoIP-auth]
type = auth
auth_type = userpass
username = 5551231234
password = secret 	; your VoIPVoIP password

[VoIPVoIP-aor]
type = aor
contact = sip:sip3.voipvoip.com ; SIP trunk provider's URI


; Add any other AOR settings here if needed

[VoIPVoIP-endpoint]
type = endpoint
context = from-trunk
transport = 0.0.0.0-udp
disallow = all
allow = ulaw
;allow = alaw
;allow=g729
;allow=g722
dtmf_mode = rfc4733
aors = VoIPVoIP-aor
auth = VoIPVoIP-auth
outbound_auth = VoIPVoIP-auth
;outbound_proxy = sip:sip3.voipvoip.com 	; Replace with your SIP trunk provider's URI
from_domain = sip3.voipvoip.com 	; Replace with your SIP trunk provider's domain
from_user = 5551231234
rtp_symmetric=yes

[VoIPVoIP-registration]
type=registration
transport=0.0.0.0-udp ; Replace with your transport configuration
outbound_auth=VoIPVoIP-auth
server_uri=sip:sip3.voipvoip.com ; SIP trunk provider's URI
client_uri=sip:5551231234@sip3.voipvoip.com ; Your VoIPVoIP account URI
retry_interval=60 ; You can adjust this retry interval as needed
forbidden_retry_interval=300 ; You can adjust this retry interval as needed
fatal_retry_interval=3600 ; You can adjust this retry interval as needed


[VoIPVoIP-identify]
type=identify
endpoint=VoIPVoIP-endpoint
match=sip3.voipvoip.com



; Add any other endpoint settings here if needed


;--------------------------
;       ENDPOINT TEMPLATE
;--------------------------

[endpoint-basic](!)
type=endpoint
transport=0.0.0.0-udp
context=from-internal
disallow=all
allow=ulaw
allow=alaw


[auth-userpass](!)
type=auth
auth_type=userpass
password=secret

[aor-single-reg](!)
type=aor
max_contacts=1

;---------------------
;       EXTENSION 7001
;---------------------

[7001](endpoint-basic)
callerid= "7001" <7001>
auth= 7001
aors=7001
rewrite_contact=yes
direct_media=no
force_rport=yes
rtp_symmetric=yes

[7001](auth-userpass)
username=7001

[7001](aor-single-reg)
max_contacts=2

##########extensions.conf#########
[from-trunk]
exten => _X.,1,NoOp(Incoming call from SIP trunk)
        same => n,Goto(from-internal,7001,1)
        same => n,Answer()
        same => n,Hangup()

[from-internal]

exten => 7001,1,Dial(PJSIP/7001)

############PJSIP  LOGS#########

<--- Received SIP request (1098 bytes) from UDP:66.220.10.66:5060 --->
INVITE sip:s@65.3.162.241:5060 SIP/2.0
Record-Route: <sip:66.220.10.66;lr;ftag=gK0404874a;did=223.718e9713>
Via: SIP/2.0/UDP 66.220.10.66:5060;branch=z9hG4bK01bf.01646d91e9eca39ea32bc3d787ce6961.0
Via: SIP/2.0/UDP 4.55.22.227:5060;rport=5060;received=4.55.22.227;branch=z9hG4bK04B9bd407c44ec320ea
From: <sip:+12054648571@4.55.22.227:5060>;tag=gK0404874a
To: <sip:+16092460216@66.220.10.66:5060>
Call-ID: 704921709_12840331@4.55.22.227
CSeq: 30702 INVITE
Max-Forwards: 68
Allow: INVITE,ACK,CANCEL,BYE,PRACK,UPDATE
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay,  multipart/mixed
Contact: <sip:+12054648571@4.55.22.227:5060>
Supported: 100rel
Content-Length:  303
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 23536 9325 IN IP4 4.55.22.227
s=SIP Media Capabilities
c=IN IP4 4.55.22.194
t=0 0
m=audio 8844 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=maxptime:20

<--- Transmitting SIP response (733 bytes) to UDP:66.220.10.66:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 66.220.10.66:5060;rport=5060;received=66.220.10.66;branch=z9hG4bK01bf.01646d91e9eca39ea32bc3d787ce6961.0
Via: SIP/2.0/UDP 4.55.22.227:5060;rport=5060;received=4.55.22.227;branch=z9hG4bK04B9bd407c44ec320ea
Record-Route: <sip:66.220.10.66;lr;ftag=gK0404874a;did=223.718e9713>
Call-ID: 704921709_12840331@4.55.22.227
From: <sip:+12054648571@4.55.22.227>;tag=gK0404874a
To: <sip:+16092460216@66.220.10.66>;tag=z9hG4bK01bf.01646d91e9eca39ea32bc3d787ce6961.0
CSeq: 30702 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1697279527/e5d296ccb8380d6889015e5e80d8d515",opaque="495806c41f870657",algorithm=md5,qop="auth"
Server: Asterisk PBX certified-18.9-cert5
Content-Length:  0


<--- Received SIP request (365 bytes) from UDP:66.220.10.66:5060 --->
ACK sip:s@65.3.162.241:5060 SIP/2.0
Via: SIP/2.0/UDP 66.220.10.66:5060;branch=z9hG4bK01bf.01646d91e9eca39ea32bc3d787ce6961.0
From: <sip:+12054648571@4.55.22.227>;tag=gK0404874a
Call-ID: 704921709_12840331@4.55.22.227
To: <sip:+16092460216@66.220.10.66>;tag=z9hG4bK01bf.01646d91e9eca39ea32bc3d787ce6961.0
CSeq: 30702 ACK
Max-Forwards: 70
Content-Length: 0

You’ve asked the calling UAC (there is no such thing as a trunk in SIP) to authenticate itself, but I know of no ITSP that will do that.

so should i remove this “auth” part?

You should read the documentation, understand what auth does, then conclude that you should have outbound_auth, but not auth.

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