Direct media disabled but still present and no audio after 1 second using pjsip

Hi everybody,

I have a problem using FreePBX 14 with Asterisk 15, new installation. There are some extensions that has one way audio after 1 second of the call, I mean, when you answer the call, you can hear the first second of the call, then it goes to only one way audio.

I have check RTP debug and I can see that when the call is answered, there are some packages that sent and received, after a few (10-15) it stop to receiving and only sent.

I have check SIP messages and find out that the call setup is correct and INVITE, Trying, Ringing, ACK, etc., comes and goes as expected.

Call sequence, SIP and RTP debug here: https://pastebin.com/1BALwVZ6

Call sequence is INVITE-Trying-Ringing-200 OK-ACK, and then again INVITE-Trying-200 OK-ACK, after the second 200 OK audio stops.

After the call is answered I see a new INVITE coming from the extensión with the problem, so I create a file /etc/asterisk/pjsip.endpoint_custom_post.conf and write:

[113](+)
type=endpoint
direct_media=no

Then check on CLI, ‘pjsip show endpoint 113’ and I see that direct_media is false:

Even though I still see the re-invite on calls.

Please your help, I don’t know what else to check.

Thanks.

PJSIP Extension 113 config, Extension 113 is on a branch office:

[113]
type=endpoint
aors=113
auth=113-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
allow=ulaw,alaw,gsm,g729
context=from-internal
callerid=device <113>
dtmf_mode=rfc4733
[email protected]
mwi_subscribe_replaces_unsolicited=yes
aggregate_mwi=yes
use_avpf=no
rtcp_mux=no
bundle=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
media_encryption=no
timers=yes
media_encryption_optimistic=no
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=es
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord
language=es

[113]
type=aor
[email protected]
max_contacts=1
remove_existing=yes
maximum_expiration=7200
qualify_frequency=60

[113-auth]
type=auth
auth_type=userpass
password=super secret password ;)
username=113

[113-identify]
type=identify
endpoint=113

[113](+)
type=endpoint
direct_media=no

[0.0.0.0-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
external_media_address=1X2.X04.1X0.14 -> public IP, behind Firewall, no public access, communication between branches are trough VPN, every office has its own firewall
external_signaling_address=1X2.X04.1X0.14
allow_reload=no
tos=cs3
cos=3
local_net=172.16.10.0/24 -> Local SIP Provider ISP
local_net=172.23.1.0/8 -> Server LAN
local_net=192.168.0.0/16 -> Remote Branches

Your endpoint or trunk is trying to move to direct media and you are even saying in asterisk not to but your endpoint or trunk refuses it appears to do that and just stops sending media.

Yes, that’s what I see also, but don’t know how to stop it, endpoint 113 is a Yealink T18 (very old) but I haven’t found on it any parameter about direct_media, re-invite or something like that.

Do you have any idea what can I do?

Thanks.

I did a second look to the debug and I see that the second INVITE was originated from the PBX:

<--- Transmitting SIP request (1040 bytes) to UDP:192.168.50.100:5062 --->
INVITE sip:[email protected]:5062 SIP/2.0
Via: SIP/2.0/UDP 172.23.1.6:5060;rport;branch=z9hG4bKPj4fb5d8e3-85d9-444f-bf64-1cd606298df1
From: "Soporte IPPBX" <sip:[email protected]>;tag=cf390b04-e37e-4b91-a2eb-f25d71183c95
To: <sip:[email protected]>;tag=935358326
Contact: <sip:[email protected]:5060>

Why? is there any global parameter for pjsip to instruct to not do it?

I seem to be having a similar issue with T.38 reinvites in SNG7 and Asterisk 13.22, where the reinvite breaks RTP/UDPTL and it’s been driving me bananas.

Since this might be more of an issue with T.38 I’m opening a new thread. Regular voice calls proceed normally.

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