Issue with Audio

Hi,

I am using Grandstream (Ext. 10001) and Aiphone(Ext. 10002) with the Asterisk 13 and PJSIP.

When I make a call from Ext. 10002 to Ext. 10001, audio and video both work perfectly fine.

However, when I make a call from Ext. 10001 to Ext. 10002, video is working fine but the audio is not working.

pjsip.conf

[global]
type=global
keep_alive_interval=20
endpoint_identifier_order=username,ip,anonymous

[simple]
type=transport
protocol=udp
bind=0.0.0.0
tos=cs7
cos=7

[simpletrans]
type=transport
protocol=tcp
bind=0.0.0.0:5060
tos=cs7
cos=7
local_net=xxx.xxx.xxx.xxx
external_media_address=xxx.xxx.xxx.xxx
external_signaling_address=xxx.xxx.xxx.xxx

[userxxx]
type=registration
outbound_auth=userxxx
outbound_proxy=sip:yyyyyy.twilio.com;transport=tcp
transport=simpletrans
line=yes
endpoint=userxxx
expiration=160
server_uri=sip:yyyyyy.twilio.com;transport=tcp
client_uri=sip:userxxx@yyyyyy.twilio.com;transport=tcp

[userxxx]
type=auth
auth_type=userpass
password=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
username=userxxx

[userxxx]
type=aor
remove_existing=yes
qualify_frequency=15
contact=sip:yyyyyy.twilio.com;transport=tcp

[userxxx]
type=endpoint
tos_audio=cs7
cos_audio=7
direct_media=no
force_rport=yes
rtp_symmetric=yes
context=incoming-userxxx
rewrite_contact=yes
transport=simpletrans
mailboxes=999@vmsetup
disallow=all
allow=gsm,ulaw,alaw,h263,h264
from_user=userxxxx
from_domain=yyyyyy.twilio.com;transport=tcp
aors=userxxx
outbound_auth=userxxx

[10001]
type=endpoint
transport=simple
context=incoming-userxxx
send_pai=yes
send_rpid=yes
disallow=all
tos_audio=cs7
cos_audio=7
rewrite_contact=yes
dtmf_mode=rfc4733
allow=ulaw,h263,h264
mailboxes=999@vm_setup
auth=10001
aors=10001

[10001]
type=auth
auth_type=userpass
password=abcdabcd
username=10001

[10001]
type=aor
max_contacts=2

[10002]
type=endpoint
transport=simple
context=incoming-userxxx
send_pai=yes
send_rpid=yes
disallow=all
tos_audio=cs7
cos_audio=7
rewrite_contact=yes
dtmf_mode=rfc4733
allow=ulaw,h263,h264
mailboxes=999@vm_setup
auth=10002
aors=10002

[10002]
type=auth
auth_type=userpass
password=abcdabcd
username=10002

[10002]
type=aor
max_contacts=2

extensions.conf


; /etc/asterisk/extensions.conf - Asterisk dial plan for SECN 2
;--------------------------------------------------------------

[general]
static=yes
writeprotect=no
clearglobalvars=no

[globals]

[incoming-userxxx]
exten => s,1,NoOp(inside context)
 same => n,Wait(1)
 same => n,Set(MYCALLERNAME=${PJSIP_HEADER(read,X-customName)})
 same => n,Set(CALLERID(name)=${MYCALLERNAME})
 same => n,Answer()
 same => n,Dial(PJSIP/10001,20)
 same => n,Voicemail(999@vm_setup)
 same => n,Hangup()

exten => 10001,1,NoOp(context-dahdi)
 same => n,Dial(PJSIP/10001,30)
 same => n,Voicemail(999@vm_setup)
 same => n,Hangup()

exten => 10002,1,NoOp(context-dahdi)
 same => n,Dial(PJSIP/10002,30)
 same => n,Voicemail(999@vm_setup)
 same => n,Hangup()

exten => _[+*0-9].,1,NoOp(dialing-remote)
 same => n,Dial(PJSIP/${EXTEN}@userxxx,60,r)

Also, following is the log from asterisk CLI when audio is not working during the call. ( from Ext. 10001 to Ext. 10002)

== Using SIP RTP Audio TOS bits 224
== Using SIP RTP Audio CoS mark 7
  -- Executing [10002@incoming-userxxx:1] NoOp("PJSIP/10001-00000006", "context-local-call") in new stack
  -- Executing [10002@incoming-userxxx:2] Dial("PJSIP/10001-00000006", "PJSIP/10002,30") in new stack
  -- Called PJSIP/10002
== Using SIP RTP Audio TOS bits 224
== Using SIP RTP Audio CoS mark 7
  -- PJSIP/10002-00000007 is ringing
  -- Call on PJSIP/10002-00000007 placed on hold
  -- Music class default requested but no musiconhold loaded.
  -- PJSIP/10002-00000007 answered PJSIP/10001-00000006
  -- Channel PJSIP/10002-00000007 joined 'simple_bridge' basic-bridge <7749796f-c270-459e-90ed-b96cee5845b0>
  -- Channel PJSIP/10001-00000006 joined 'simple_bridge' basic-bridge <7749796f-c270-459e-90ed-b96cee5845b0>
     > 0xb775b8 -- Probation passed - setting RTP source address to 192.165.123.23:5004
     > 0xc2aa28 -- Probation passed - setting RTP source address to 192.165.123.16:5000
     > 0xc33c10 -- Probation passed - setting RTP source address to 192.165.123.16:30000

Packets info (from “pjsip set logger on”)

<--- Received SIP request (1018 bytes) from UDP:192.165.123.23:5060 --->
INVITE sip:10002@192.165.123.55 SIP/2.0
Via: SIP/2.0/UDP 192.165.123.23:5060;branch=z9hG4bK331543466;rport
From: "10001" <sip:10001@192.165.123.55>;tag=1654782185
To: <sip:10002@192.165.123.55>
Call-ID: 1770778621-5060-26@BJC.BGI.B.CDA
CSeq: 250 INVITE
Contact: "10001" <sip:10001@192.165.123.23:5060>
Max-Forwards: 70
User-Agent: Grandstream GXV3240 1.0.3.184
Privacy: none
P-Preferred-Identity: "10001" <sip:10001@192.165.123.55>
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=00-0B-82-C7-FA-8C
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length:   295

v=0
o=10001 8000 8000 IN IP4 192.165.123.23
s=SIP Call
c=IN IP4 192.165.123.23
t=0 0
m=audio 5004 RTP/AVP 0 8 9 101
a=sendrecv
a=rtcp:5005 IN IP4 192.165.123.23
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<--- Transmitting SIP response (481 bytes) to UDP:192.165.123.23:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.165.123.23:5060;rport=5060;received=192.165.123.23;branch=z9hG4bK331543466
Call-ID: 1770778621-5060-26@BJC.BGI.B.CDA
From: "10001" <sip:10001@192.165.123.55>;tag=1654782185
To: <sip:10002@192.165.123.55>;tag=z9hG4bK331543466
CSeq: 250 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1558056887/8d0a59bde63d7332ea38a6773e2c9c5e",opaque="178461b65a631b07",algorithm=md5,qop="auth"
Server: Asterisk PBX 13.9.1
Content-Length:  0


<--- Received SIP request (281 bytes) from UDP:192.165.123.23:5060 --->
ACK sip:10002@192.165.123.55 SIP/2.0
Via: SIP/2.0/UDP 192.165.123.23:5060;branch=z9hG4bK331543466;rport
From: "10001" <sip:10001@192.165.123.55>;tag=1654782185
To: <sip:10002@192.165.123.55>;tag=z9hG4bK331543466
Call-ID: 1770778621-5060-26@BJC.BGI.B.CDA
CSeq: 250 ACK
Content-Length: 0


<--- Received SIP request (1284 bytes) from UDP:192.165.123.23:5060 --->
INVITE sip:10002@192.165.123.55 SIP/2.0
Via: SIP/2.0/UDP 192.165.123.23:5060;branch=z9hG4bK84628768;rport
From: "10001" <sip:10001@192.165.123.55>;tag=1654782185
To: <sip:10002@192.165.123.55>
Call-ID: 1770778621-5060-26@BJC.BGI.B.CDA
CSeq: 251 INVITE
Contact: "10001" <sip:10001@192.165.123.23:5060>
Authorization: Digest username="10001", realm="asterisk", nonce="1558056887/8d0a59bde63d7332ea38a6773e2c9c5e", uri="sip:10002@192.165.123.55", response="d6b7e7ea7238b4246c7e9114f565ef98", algorithm=md5, cnonce="02467425", opaque="178461b65a631b07", qop=auth, nc=00000004
Max-Forwards: 70
User-Agent: Grandstream GXV3240 1.0.3.184
Privacy: none
P-Preferred-Identity: "10001" <sip:10001@192.165.123.55>
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=00-0B-82-C7-FA-8C
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length:   295

v=0
o=10001 8000 8000 IN IP4 192.165.123.23
s=SIP Call
c=IN IP4 192.165.123.23
t=0 0
m=audio 5004 RTP/AVP 0 8 9 101
a=sendrecv
a=rtcp:5005 IN IP4 192.165.123.23
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

  == Using SIP RTP Audio TOS bits 224
  == Using SIP RTP Audio CoS mark 7
<--- Transmitting SIP response (306 bytes) to UDP:192.165.123.23:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.165.123.23:5060;rport=5060;received=192.165.123.23;branch=z9hG4bK84628768
Call-ID: 1770778621-5060-26@BJC.BGI.B.CDA
From: "10001" <sip:10001@192.165.123.55>;tag=1654782185
To: <sip:10002@192.165.123.55>
CSeq: 251 INVITE
Server: Asterisk PBX 13.9.1
Content-Length:  0


    -- Executing [10002@incoming-userxxx:1] NoOp("PJSIP/10001-00000008", "context-dahdi") in new stack
    -- Executing [10002@incoming-userxxx:2] Dial("PJSIP/10001-00000008", "PJSIP/10002,30") in new stack
  == Using SIP RTP Audio TOS bits 224
  == Using SIP RTP Audio CoS mark 7
    -- Called PJSIP/10002
<--- Transmitting SIP request (1031 bytes) to UDP:192.165.123.16:5060 --->
INVITE sip:10002@192.165.123.16:5060 SIP/2.0
Via: SIP/2.0/UDP 192.165.123.55:5060;rport;branch=z9hG4bKPj2b653a82-84b4-4ffd-97a9-218fee939216
From: "10001" <sip:10001@192.165.123.55>;tag=c70527d0-1edf-4a41-a576-9155ae34eb0e
To: <sip:10002@192.165.123.16>
Contact: <sip:asterisk@192.165.123.55:5060>
Call-ID: 38cf285b-50a9-435d-9c47-5abc1f6ea99b
CSeq: 21636 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 13.9.1
Content-Type: application/sdp
Content-Length:   375

v=0
o=Asterisk 727575383 727575383 IN IP4 192.165.123.55
s=Asterisk
c=IN IP4 192.165.123.55
t=0 0
m=audio 28854 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
m=video 8332 RTP/AVP 34 99
a=rtpmap:34 H263/90000
a=rtpmap:99 H264/90000
a=sendrecv

<--- Received SIP response (309 bytes) from UDP:192.165.123.16:5060 --->
SIP/2.0 100 Trying
To: <sip:10002@192.165.123.16>
From: "10001"<sip:10001@192.165.123.55>;tag=c70527d0-1edf-4a41-a576-9155ae34eb0e
Via: SIP/2.0/UDP 192.165.123.55:5060;branch=z9hG4bKPj2b653a82-84b4-4ffd-97a9-218fee939216;rport
Call-ID: 38cf285b-50a9-435d-9c47-5abc1f6ea99b
CSeq: 21636 INVITE
Content-Length: 0


<--- Received SIP response (370 bytes) from UDP:192.165.123.16:5060 --->
SIP/2.0 180 Ringing
To: <sip:10002@192.165.123.16>;tag=c4b4958azps4.0.0
From: "10001"<sip:10001@192.165.123.55>;tag=c70527d0-1edf-4a41-a576-9155ae34eb0e
Via: SIP/2.0/UDP 192.165.123.55:5060;branch=z9hG4bKPj2b653a82-84b4-4ffd-97a9-218fee939216;rport
Call-ID: 38cf285b-50a9-435d-9c47-5abc1f6ea99b
CSeq: 21636 INVITE
Content-Length: 0
Contact: 10002<sip:10002@192.165.123.16>


<--- Received SIP response (957 bytes) from UDP:192.165.123.16:5060 --->
SIP/2.0 200 OK
To: <sip:10002@192.165.123.16>;tag=c4b4958azps4.0.0
From: "10001"<sip:10001@192.165.123.55>;tag=c70527d0-1edf-4a41-a576-9155ae34eb0e
Via: SIP/2.0/UDP 192.165.123.55:5060;branch=z9hG4bKPj2b653a82-84b4-4ffd-97a9-218fee939216;rport
Call-ID: 38cf285b-50a9-435d-9c47-5abc1f6ea99b
CSeq: 21636 INVITE
Content-Length: 409
Contact: 10002<sip:10002@192.165.123.16>
Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,INFO,UPDATE,PRACK,SUBSCRIBE,NOTIFY,REFER
Require: timer
Supported: timer
Session-Expires: 1800;refresher=uas
Content-Type: application/sdp

v=0
o=- 2605846844 2605846844 IN IP4 192.165.123.16
s=-
c=IN IP4 192.165.123.16
t=0 0
m=audio 30000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=inactive
m=video 30000 RTP/AVP 96
a=rtpmap:96 H264/90000
a=recvonly
a=framesize:96 640-480
a=framerate:15
a=fmtp:96 packetization-mode=1;profile-level-id=64001e;sprop-parameter-sets=Z2QAHqy0BQHsgA==,aO4Jgw==

    -- PJSIP/10002-00000009 is ringing
<--- Transmitting SIP response (492 bytes) to UDP:192.165.123.23:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.165.123.23:5060;rport=5060;received=192.165.123.23;branch=z9hG4bK84628768
Call-ID: 1770778621-5060-26@BJC.BGI.B.CDA
From: "10001" <sip:10001@192.165.123.55>;tag=1654782185
To: <sip:10002@192.165.123.55>;tag=f85fd4b1-2cec-4d93-b999-95375fea2696
CSeq: 251 INVITE
Server: Asterisk PBX 13.9.1
Contact: <sip:192.165.123.55:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Content-Length:  0


<--- Transmitting SIP request (401 bytes) to UDP:192.165.123.16:5060 --->
ACK sip:10002@192.165.123.16:5060 SIP/2.0
Via: SIP/2.0/UDP 192.165.123.55:5060;rport;branch=z9hG4bKPjbbd31b73-6887-47cf-9732-dbb9ef7a5434
From: "10001" <sip:10001@192.165.123.55>;tag=c70527d0-1edf-4a41-a576-9155ae34eb0e
To: <sip:10002@192.165.123.16>;tag=c4b4958azps4.0.0
Call-ID: 38cf285b-50a9-435d-9c47-5abc1f6ea99b
CSeq: 21636 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 13.9.1
Content-Length:  0


    -- Call on PJSIP/10002-00000009 placed on hold
    -- Music class default requested but no musiconhold loaded.
    -- PJSIP/10002-00000009 answered PJSIP/10001-00000008
<--- Transmitting SIP response (822 bytes) to UDP:192.165.123.23:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.165.123.23:5060;rport=5060;received=192.165.123.23;branch=z9hG4bK84628768
Call-ID: 1770778621-5060-26@BJC.BGI.B.CDA
From: "10001" <sip:10001@192.165.123.55>;tag=1654782185
To: <sip:10002@192.165.123.55>;tag=f85fd4b1-2cec-4d93-b999-95375fea2696
CSeq: 251 INVITE
Server: Asterisk PBX 13.9.1
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Contact: <sip:192.165.123.55:5060>
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length:   253

v=0
o=Asterisk 8000 8002 IN IP4 192.165.123.55
s=Asterisk
c=IN IP4 192.165.123.55
t=0 0
m=audio 5750 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP request (539 bytes) from UDP:192.165.123.23:5060 --->
ACK sip:192.165.123.55:5060 SIP/2.0
Via: SIP/2.0/UDP 192.165.123.23:5060;branch=z9hG4bK1676420234;rport
From: "10001" <sip:10001@192.165.123.55>;tag=1654782185
To: <sip:10002@192.165.123.55>;tag=f85fd4b1-2cec-4d93-b999-95375fea2696
Call-ID: 1770778621-5060-26@BJC.BGI.B.CDA
CSeq: 251 ACK
Contact: <sip:10001@192.165.123.23:5060>
Max-Forwards: 70
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream GXV3240 1.0.3.184
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


    -- Channel PJSIP/10002-00000009 joined 'simple_bridge' basic-bridge <d315e2f8-8eb0-4b70-a83a-3b1e54e0f6d9>
    -- Channel PJSIP/10001-00000008 joined 'simple_bridge' basic-bridge <d315e2f8-8eb0-4b70-a83a-3b1e54e0f6d9>
       > 0xb775b8 -- Probation passed - setting RTP source address to 192.165.123.23:5004
<--- Received SIP request (1080 bytes) from UDP:192.165.123.16:5060 --->
INVITE sip:asterisk@192.165.123.55:5060 SIP/2.0
To: <sip:10001@192.165.123.55>;tag=c70527d0-1edf-4a41-a576-9155ae34eb0e
From: "10002"<sip:10002@192.165.123.16>;tag=c4b4958azps4.0.0
Via: SIP/2.0/UDP 192.165.123.16:5060;branch=z9hG4bK4b8ca64069d3ae2a
Call-ID: 38cf285b-50a9-435d-9c47-5abc1f6ea99b
CSeq: 1000000001 INVITE
Max-Forwards: 70
Content-Length: 408
Contact: 10002<sip:10002@192.165.123.16>
Supported: timer
Session-Expires: 1800;refresher=uac
Content-Type: application/sdp
Min-SE: 90
x-autoanswer: off
x-backlightstate: notifydisablecompensation
x-electrickeystate: off
x-devicekind: interphone
x-deviceseries: ix2
x-answernode: 10002
x-reinvitekind: answer

v=0
o=- 2605846844 2605846845 IN IP4 192.165.123.16
s=-
c=IN IP4 192.165.123.16
t=0 0
m=audio 5000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
m=video 30000 RTP/AVP 96
a=rtpmap:96 H264/90000
a=sendrecv
a=framesize:96 640-480
a=framerate:15
a=fmtp:96 packetization-mode=1;profile-level-id=64001e;sprop-parameter-sets=Z2QAHqy0BQHsgA==,aO4Jgw==

<--- Transmitting SIP response (959 bytes) to UDP:192.165.123.16:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.165.123.16:5060;rport=5060;received=192.165.123.16;branch=z9hG4bK4b8ca64069d3ae2a
Call-ID: 38cf285b-50a9-435d-9c47-5abc1f6ea99b
From: "10002" <sip:10002@192.165.123.16>;tag=c4b4958azps4.0.0
To: <sip:10001@192.165.123.55>;tag=c70527d0-1edf-4a41-a576-9155ae34eb0e
CSeq: 1000000001 INVITE
Session-Expires: 1800;refresher=uac
Require: timer
Contact: <sip:asterisk@192.165.123.55:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Server: Asterisk PBX 13.9.1
Content-Type: application/sdp
Content-Length:   301

v=0
o=Asterisk 727575383 727575384 IN IP4 192.165.123.55
s=Asterisk
c=IN IP4 192.165.123.55
t=0 0
m=audio 28854 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
m=video 8332 RTP/AVP 96
a=rtpmap:96 H264/90000
a=sendrecv

<--- Received SIP request (347 bytes) from UDP:192.165.123.16:5060 --->
ACK sip:asterisk@192.165.123.55:5060 SIP/2.0
To: <sip:10001@192.165.123.55>;tag=c70527d0-1edf-4a41-a576-9155ae34eb0e
From: "10002"<sip:10002@192.165.123.16>;tag=c4b4958azps4.0.0
Via: SIP/2.0/UDP 192.165.123.16:5060;branch=z9hG4bK9dd042ba94673aac
Call-ID: 38cf285b-50a9-435d-9c47-5abc1f6ea99b
CSeq: 1000000001 ACK
Max-Forwards: 70
Content-Length: 0


       > 0xbd91a8 -- Probation passed - setting RTP source address to 192.165.123.16:5000
       > 0xc26340 -- Probation passed - setting RTP source address to 192.165.123.16:30000

Why “Call on PJSIP/10002-00000007 placed on hold” this is happening? Is it the issue for audio not working? (Note: When I did “rtp set debug on”, it is showing me that the media data are being transferred. Also, when audio is working during the call I am not seeing that line in the asterisk CLI.

Is it related to sdp negotiation?

How can I solve this?

Are you handling local and external calls within the same context?

Why do you need an s extension?

I’d proceed step by step. First, get rid of all the external stuff. Then define an extension that either does the echo test or calls the MOH app. Then try to call other local devices. The rest follows.

> 0xb775b8 -- Probation passed - setting RTP source address to 192.165.123.23:5004
> 0xc2aa28 -- Probation passed - setting RTP source address to 192.165.123.16:5000
> 0xc33c10 -- Probation passed - setting RTP source address to 192.165.123.16:30000

There would normally only be one line here for each direction. You should look at the actual RTP to see what is happening.

Also note when you say extension, you really mean device.

@EkFudrek Yes, I am handling both local and external calling. That is why I have s extension.

@david551

Yes, I agree. When the call is working fine it is showing me 2 lines of"Probation passed", being one line for each direction.

I am not sure why it is showing multiple times when I am having the issue. Can it be related to the phone? When I use the same configuration and setup with Grandstream and Yealink, they are working great.

How can I check the RTP? I already did “rtp set debug on” and did not find any issue. Check the attachment.ex_pckts.txt (85.2 KB)

192.165.123.16 changed its port number from 5000 to 30000. You need to identify 192.165.123.16 and find out why it did that. Asterisk has continued to send to first port used.

I think you using some sort of comedia option, but I don’t know how that is specified in pjsip. I think that because your side seems to have ignored the port in the SDP…

@david551, Thanks for the reply.

I was able to get rid of the additional port. the port additional port was responsible for the video. That is why the “probation” line was multiple time.

Check the following logs from asterisk after I disable h264 codec.

== Using SIP RTP Audio TOS bits 224
== Using SIP RTP Audio CoS mark 7
  -- Executing [10002@incoming-userxxx:1] NoOp("PJSIP/10001-00000006", "context-dahdi") in new stack
  -- Executing [10002@incoming-userxxx:2] Dial("PJSIP/10001-00000006", "PJSIP/10002,30") in new stack
  -- Called PJSIP/10002
== Using SIP RTP Audio TOS bits 224
== Using SIP RTP Audio CoS mark 7
  -- PJSIP/10002-00000007 is ringing
  -- Call on PJSIP/10002-00000007 placed on hold
  -- Music class default requested but no musiconhold loaded.
  -- PJSIP/10002-00000007 answered PJSIP/10001-00000006
  -- Channel PJSIP/10002-00000007 joined 'simple_bridge' basic-bridge <3902fff2-4cb7-4244-aaa7-45766f28baa6>
  -- Channel PJSIP/10001-00000006 joined 'simple_bridge' basic-bridge <3902fff2-4cb7-4244-aaa7-45766f28baa6>
     > 0xc1e7f0 -- Probation passed - setting RTP source address to 192.165.123.23:5004
     > 0xbfbca0 -- Probation passed - setting RTP source address to 192.165.123.16:2

I am still having the same issue,
Let me know if you need packets for this call.

Using low numbered ports for RTP might be triggerring firewall blocks.

What range do you suggest then?

Tried 20000-40000 range and still the same issue. Also, I disabled all the firewall on the machine which is running asterisk and also disabled firewall on the router.

Looking fruther at your RTP trace, Asterisk is forwarding the media in both directions, in a comedia fashion (i.e. it is using the port number from which it receives media, not the port number in the SDP. That all looks good to me. You need to find out where the lost media goes after it leaves Asterisk. and maybe using tcp dump and wireshark to listen it it to make sure what is forwarded is what is received.

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