Newbie Setup: Cannot able to receive calls

Hello,

I am very new to astericks and somehow i installed and configured it,
version : Asterisk 19.5.0

pjsip.conf

[ben]
type=endpoint
context=office-phones
disallow=all
allow=ulaw
auth=ben-auth
aors=ben

[ben-auth]
type=auth
auth_type=userpass
username=ben
password=samuel

[ben]
type=aor
max_contacts=5

;-----------------------------------------

[samuel]
type=endpoint
context=office-phones
disallow=all
allow=ulaw
auth=samuel-auth
aors=samuel

[samuel-auth]
type=auth
auth_type=userpass
username=samuel
password=password

[samuel]
type=aor
max_contacts=5

extensions.conf

[office-phones]
exten => 9001,1,Dial(PJSIP/alice)
exten => 9002,1,Dial(PJSIP/samuel)

Now my sip client installed on both android phones are registered

instance-20220712-1205*CLI>  pjsip show aors
==========================================================================================
      Aor:  ben                                                  5
      Aor:  greeshma                                             5
      Aor:  samuel                                               5

Objects found: 3

instance-20220712-1205*CLI> pjsip show endpoints
==========================================================================================

 Endpoint:  ben                                                  Unavailable   0 of inf
     InAuth:  ben-auth/ben
        Aor:  ben                                                5

 Endpoint:  greeshma                                             Unavailable   0 of inf
     InAuth:  greeshma-auth/greeshma
        Aor:  greeshma                                           5

 Endpoint:  samuel                                               Unavailable   0 of inf
     InAuth:  samuel-auth/samuel
        Aor:  samuel                                             5

Objects found: 3

instance-20220712-1205*CLI> pjsip show aors
==========================================================================================

      Aor:  ben                                                  5
    Contact:  ben/sip:ben@188.236.202.5:54504;ob           6cf4960fda NonQual         nan

      Aor:  greeshma                                             5

      Aor:  samuel                                               5
    Contact:  samuel/sip:samuel@188.236.202.5:57735;ob     4466a639f0 NonQual         nan

Objects found: 3

instance-20220712-1205*CLI> dialplan show office-phones
[ Context 'office-phones' created by 'pbx_config' ]
  '9001' =>         1. Dial(PJSIP/alice)                          [extensions.conf:867]
  '9002' =>         1. Dial(PJSIP/samuel)                         [extensions.conf:868]
  '9003' =>         1. Dial(PJSIP/greeshma)                       [extensions.conf:869]

-= 3 extensions (3 priorities) in 1 context. =-

currently i am trying to call 9002 from the sip client 9001, and the client 9002 is not ringing(not showing anything in console).

Anyone please help me to fix this issue.

Regards,
Ben

Hello,

anyone please help to solve this issue

Please provide verbose level 5+ logging after enabling the full log, and with “pjsip set logger on” enabled.

I tried calling from 9003 to 9001 , and below are the logs

<--- Received SIP request (1235 bytes) from UDP:188.236.181.104:51132 --->
INVITE sip:9001@158.101.230.44;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.98.154:51132;rport;branch=z9hG4bKPj632cf418-d1d7-4f8e-9a5d-675846889fe5
Max-Forwards: 70
From: <sip:greeshma@158.101.230.44>;tag=ab1dce5e-3ce9-4b24-b2e2-567c3386f957
To: sip:9001@158.101.230.44
Contact: <sip:greeshma@188.236.181.104:51132;ob>
Call-ID: 92121114-29f5-4c87-af66-c988e929808b
CSeq: 2622 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: Calls+
Content-Type: application/sdp
Content-Length:   585

v=0
o=- 3867042080 3867042080 IN IP4 192.168.98.154
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 8 0 3 9 18 97 98 99 104 120 96
c=IN IP4 192.168.98.154
b=TIAS:96000
a=rtcp:4001 IN IP4 192.168.98.154
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 speex/8000
a=rtpmap:98 speex/16000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16

<--- Transmitting SIP response (577 bytes) to UDP:188.236.181.104:51132 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.98.154:51132;rport=51132;received=188.236.181.104;branch=z9hG4bKPj632cf418-d1d7-4f8e-9a5d-675846889fe5
Call-ID: 92121114-29f5-4c87-af66-c988e929808b
From: <sip:greeshma@158.101.230.44>;tag=ab1dce5e-3ce9-4b24-b2e2-567c3386f957
To: <sip:9001@158.101.230.44>;tag=z9hG4bKPj632cf418-d1d7-4f8e-9a5d-675846889fe5
CSeq: 2622 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1658053280/f5593bdbe549aa7ba0e2c243d075394d",opaque="31c2692726efdac1",algorithm=MD5,qop="auth"
Server: Asterisk PBX 19.5.0
Content-Length:  0


<--- Received SIP request (409 bytes) from UDP:188.236.181.104:51132 --->
ACK sip:9001@158.101.230.44;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.98.154:51132;rport;branch=z9hG4bKPj632cf418-d1d7-4f8e-9a5d-675846889fe5
Max-Forwards: 70
From: <sip:greeshma@158.101.230.44>;tag=ab1dce5e-3ce9-4b24-b2e2-567c3386f957
To: sip:9001@158.101.230.44;tag=z9hG4bKPj632cf418-d1d7-4f8e-9a5d-675846889fe5
Call-ID: 92121114-29f5-4c87-af66-c988e929808b
CSeq: 2622 ACK
Content-Length:  0


Another one from 9001 to 9003

<--- Received SIP request (1295 bytes) from UDP:188.236.181.104:53986 --->
INVITE sip:9003@158.101.230.44;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.245.118.249:53986;rport;branch=z9hG4bKPjf3e1d065-2784-4c6e-a7db-66a73e837569
Max-Forwards: 70
From: <sip:ben@158.101.230.44>;tag=e476bcb8-bedd-4083-83ae-f0668bc616b6
To: sip:9003@158.101.230.44
Contact: <sip:ben@188.236.181.104:53986;ob>;+sip.ice
Call-ID: 7d47d7a7-64ae-4a5e-992e-6c59977fdf48
CSeq: 11010 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: Calls+
Content-Type: application/sdp
Content-Length:   645

v=0
o=- 3867042482 3867042482 IN IP4 10.245.118.249
s=pjmedia
b=AS:30
t=0 0
a=X-nat:0
m=audio 37075 RTP/AVP 3 18 96
c=IN IP4 10.245.118.249
b=TIAS:13200
a=rtcp:38385 IN IP4 10.245.118.249
a=sendrecv
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=ice-ufrag:4ac4d426
a=ice-pwd:38fc31e0
a=candidate:Haf576f9 1 UDP 2130706431 10.245.118.249 37075 typ host
a=candidate:Hc0a86286 1 UDP 2130706431 192.168.98.134 37075 typ host
a=candidate:Haf576f9 2 UDP 2130706430 10.245.118.249 38385 typ host
a=candidate:Hc0a86286 2 UDP 2130706430 192.168.98.134 38385 typ host

<--- Transmitting SIP response (573 bytes) to UDP:188.236.181.104:53986 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.245.118.249:53986;rport=53986;received=188.236.181.104;branch=z9hG4bKPjf3e1d065-2784-4c6e-a7db-66a73e837569
Call-ID: 7d47d7a7-64ae-4a5e-992e-6c59977fdf48
From: <sip:ben@158.101.230.44>;tag=e476bcb8-bedd-4083-83ae-f0668bc616b6
To: <sip:9003@158.101.230.44>;tag=z9hG4bKPjf3e1d065-2784-4c6e-a7db-66a73e837569
CSeq: 11010 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1658053680/88c1016ed7e7c7e862c268fab9cfed13",opaque="2ed411132e92fb40",algorithm=MD5,qop="auth"
Server: Asterisk PBX 19.5.0
Content-Length:  0


<--- Received SIP request (405 bytes) from UDP:188.236.181.104:53986 --->
ACK sip:9003@158.101.230.44;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.245.118.249:53986;rport;branch=z9hG4bKPjf3e1d065-2784-4c6e-a7db-66a73e837569
Max-Forwards: 70
From: <sip:ben@158.101.230.44>;tag=e476bcb8-bedd-4083-83ae-f0668bc616b6
To: sip:9003@158.101.230.44;tag=z9hG4bKPjf3e1d065-2784-4c6e-a7db-66a73e837569
Call-ID: 7d47d7a7-64ae-4a5e-992e-6c59977fdf48
CSeq: 11010 ACK
Content-Length:  0

You haven’t configured passwords on the devices, or the 401 requests for passwords are failing to reach them. They are being challenged for passwords, but failing to provide them.

I have configured (logged in ) to SIP client with username and password.

After authenticate client, i am getting below. if my client is not running/authenticated, contact is not showing

instance-20220712-1205*CLI> pjsip show aors

      Aor:  <Aor..............................................>  <MaxContact>
    Contact:  <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

      Aor:  ben                                                  5
    Contact:  ben/sip:ben@188.236.181.104:53986;ob         322644627d NonQual         nan

      Aor:  greeshma                                             5
    Contact:  greeshma/sip:greeshma@188.236.181.104:51132; 29bd85bc47 NonQual         nan

      Aor:  samuel                                               5

Objects found: 3

Whilst that is confusing, it does’t change the fact that the devices are ignoring requests for passwords for the INVITEs.

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