Hi,
I’ve been working on PJSIP.
Audio and video call is working fine when all the exts were coming from static file i.e pjsip.conf file. Now I have created those in Freepbx with WebRTC enable settings.
call is getting connected successfully but its auto dropped after few seconds when I debug and check the log using pjsip set log on I found below 500 internal error which shows some parsing error.
Don’t know how it’s setting content type as “application/media_control+xml” rather than application/sdp or not sure what exactly the issue is.
PFB below server log.
0xffff84047d80 – Strict RTP switching to RTP target address 192.168.1.1:55748 as source
0xffff840b1410 – Strict RTP switching to RTP target address 192.168.1.1:55748 as source
0xffff840a9b40 – Strict RTP learning after remote address set to: 192.168.1.1:56065
0xffff84038a30 – Strict RTP learning after ICE completion
0xffff840a9b40 – Strict RTP learning after remote address set to: 192.168.1.1:56065
0xffff84038a30 – Strict RTP learning after remote address set to: 192.168.1.1:56065
0xffff84038a30 – Strict RTP switching to RTP target address 192.168.1.1:56065 as source
INFO sip:1003@192.168.1.1:56504;transport=TCP SIP/2.0
Via: SIP/2.0/TCP 122.170.X.X:8000;rport;branch=z9hG4bKPj8efa15f1-e10c-4e02-bf4a-d96eda8582b0;alias
From: “1002” sip:1002@192.168.1.52;tag=825df2b0-aeff-4624-b1fb-68030df05853
To: sip:1003@192.168.1.1;x-ast-orig-host=192.168.1.2:8000;tag=6fc5b046
Call-ID: 1413cec8-0752-404d-94b4-6820c05f647c
CSeq: 16223 INFO
Max-Forwards: 70
User-Agent: FPBX-15.0.16.52(16.10.0)
Content-Type: application/media_control+xml
Content-Length: 178
<media_control>
<vc_primitive>
<to_encoder>
<picture_fast_update/>
</to_encoder>
</vc_primitive>
</media_control>
pjsip.endpoint.conf file settings are as below
[1002]
type=endpoint
aors=1002
auth=1002-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
disallow=all
allow=ulaw,h264
context=internal
callerid=1002 <1002>
dtmf_mode=rfc4733
direct_media=no
aggregate_mwi=no
use_avpf=yes
rtcp_mux=yes
max_audio_streams=1
max_video_streams=1
bundle=yes
ice_support=yes
media_use_received_transport=yes
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=dtls
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=yes
refer_blind_progress=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord
media_encryption=dtls
dtls_verify=fingerprint
dtls_setup=actpass
dtls_rekey=0
dtls_cert_file=/etc/asterisk/keys/default.crt
dtls_private_key=/etc/asterisk/keys/default.key
[1003]
type=endpoint
aors=1003
auth=1003-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
disallow=all
allow=ulaw,h264
context=internal
callerid=1003 <1003>
dtmf_mode=rfc4733
direct_media=no
aggregate_mwi=no
use_avpf=yes
rtcp_mux=yes
max_audio_streams=1
max_video_streams=1
bundle=yes
ice_support=yes
media_use_received_transport=yes
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=dtls
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=yes
refer_blind_progress=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord
media_encryption=dtls
dtls_verify=fingerprint
dtls_setup=actpass
dtls_rekey=0
dtls_cert_file=/etc/asterisk/keys/default.crt
dtls_private_key=/etc/asterisk/keys/default.key
<— Transmitting SIP request (678 bytes) to TCP:192.168.1.1:56504 —>
INFO sip:1003@192.168.1.1:56504;transport=TCP SIP/2.0
Via: SIP/2.0/TCP 122.170.X.X:8000;rport;branch=z9hG4bKPjdc01081f-dd63-4a70-b765-407f26fe817f;alias
From: “1002” sip:1002@192.168.1.52;tag=825df2b0-aeff-4624-b1fb-68030df05853
To: sip:1003@192.168.1.1;x-ast-orig-host=192.168.1.2:8000;tag=6fc5b046
Call-ID: 1413cec8-0752-404d-94b4-6820c05f647c
CSeq: 16224 INFO
Max-Forwards: 70
User-Agent: FPBX-15.0.16.52(16.10.0)
Content-Type: application/media_control+xml
<media_control>
<vc_primitive>
<to_encoder>
<picture_fast_update/>
</to_encoder>
</vc_primitive>
</media_control
0xffff840a9b40 – Strict RTP switching to RTP target address 192.168.1.1:56065 as source
<— Received SIP response (396 bytes) from TCP:192.168.1.1:56504 —>
SIP/2.0 500 Server Internal Error
Via: SIP/2.0/TCP 122.170.X.X:8000;rport=8000;branch=z9hG4bKPjdc01081f-dd63-4a70-b765-407f26fe817f;alias
To: sip:1003@192.168.1.1;x-ast-orig-host=192.168.1.2:8000;tag=6fc5b046
From: “1002” sip:1002@192.168.1.52;tag=825df2b0-aeff-4624-b1fb-68030df05853
Call-ID: 1413cec8-0752-404d-94b4-6820c05f647c
CSeq: 16224 INFO
Retry-After: 8
Content-Length: 0
Also mentioning a pjsip.endpoints.conf file