Video call work only in one direction

Hello all,

i have a VM ubuntu 20.04 configured as bridge (so with a LAN ip) where i have the latest asterisk 18.2.2 and where i connect two clients:

  • a beresip client on the same virtual machine
  • a portsip app running on an Android tablet on the same LAN

my problem is that when i do a video call from portsip to baresip i have a video call, so both the client detect the video and show me this. In the opposite case, so a call made from baresip to portsip, portsip
not detect is a video call and it don’t show me the video answer button. When the call is open and i try to switch to a video call the call is immediatly terminated.
If i use another SIP server like uSipServer (android) all works. This let me think this problem concern the asterisk settings.
The video is h264 encoded

My configuration are:
pjsip.conf

;--
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Non mapped elements start
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[general]
allowoverlap = no

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Non mapped elements end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--;


[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0

[1101]
type = aor
max_contacts = 2

[1101]
type = auth
username = 1101
password = 1101

[1101]
type = endpoint
direct_media = no
context = default
allow = h264
allow = all
auth = 1101
outbound_auth = 1101
aors = 1101

[1102]
type = aor
max_contacts = 2

[1102]
type = auth
username = 1102
password = 1102

[1102]
type = endpoint
direct_media = no
context = default
allow = h264
allow = all
auth = 1102
outbound_auth = 1102
aors = 1102

[1103]
type = aor
max_contacts = 2

[1103]
type = auth
username = 1103
password = 1103

[1103]
type = endpoint
direct_media = no
context = default
allow = h264
allow = all
auth = 1103
outbound_auth = 1103
aors = 1103


[1104]
type = aor
max_contacts = 2

[1104]
type = auth
username = 1104
password = 1104

[1104]
type = endpoint
direct_media = no
context = default
allow = h264
allow = all
auth = 1104
outbound_auth = 1104
aors = 1104

exntension.conf


[general]

static=yes
writeprotect=no
priorityjumping=no
autofallthrough=yes
clearlobalvars=no

;---------------------------------------------------------------------------
; PRIVATE INTERNAL DEVICE
;---------------------------------------------------------------------------
[default]

exten => 1101,1,Dial(PJSIP/1101,10)
exten => 1102,1,Dial(PJSIP/1102,10)
exten => 1103,1,Dial(PJSIP/1103,10)
exten => 1104,1,Dial(PJSIP/1104,10)

Thanks!!

Other information:

[Mar 26 09:48:20] WARNING[9101]: channel.c:5674 set_format: Unable to find a codec translation path: (h264|h261|h263|h263p|h265|mpeg4|vp8|vp9|ulaw) -> (opus)
[Mar 26 09:48:20] WARNING[9101]: channel.c:5674 set_format: Unable to find a codec translation path: (opus) -> (h264|h261|h263|h263p|h265|mpeg4|vp8|vp9|ulaw)
[Mar 26 09:48:42] WARNING[9101]: res_pjsip_session.c:1100 handle_negotiated_sdp: PJSIP/1104-00000015: Local SDP contains 2 media streams while we expected it to contain 1
[Mar 26 09:48:47] WARNING[9143][C-0000000b]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[Mar 26 09:48:47] WARNING[9143][C-0000000b]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[Mar 26 09:48:47] WARNING[9140][C-0000000b]: channel.c:5674 set_format: Unable to find a codec translation path: (g729) -> (ulaw|h264)
[Mar 26 09:48:47] WARNING[9143][C-0000000b]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[Mar 26 09:48:47] WARNING[9143][C-0000000b]: channel.c:5674 set_format: Unable to find a codec translation path: (h264|g729) -> (ulaw)
ubuntu*CLI> pjsip show history entry 6
<--- History Entry 6 Received from 192.168.0.21:5070 at 1616748498 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.21:5060;rport=5060;received=192.168.0.21;branch=z9hG4bKPj199dedfe-ab8c-4499-b192-b144194904c5
From: <sip:1104@192.168.0.21>;tag=326658be-25f0-4e5d-93ca-1aa17436be42
To: <sip:1101-0x55c332b5ad80@192.168.0.21>;tag=96f9a550bb3ea18f
Call-ID: a320fbbd-4db9-4828-9c85-3d3948342122
CSeq: 16494 INVITE
Server: baresip v1.0.0 (x86_64/linux)
Contact: <sip:1101-0x55c332b5ad80@192.168.0.21:5070>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, NOTIFY, SUBSCRIBE, INFO, MESSAGE, REFER
Content-Length: 0
Content-Length:  0

At second 09:48:20 is started a video call from portsip to baresip and this work
At second 09:48:42 is started a video call from baresip to portstip but portsip detect that this is only an audio call
At second 09:48:47 try to switch to a video call from baresip, this crash the call that is terminated

You’d need to actually show the SIP traces to go with this.

This sort of thing happens if you set up a call audio only and then try to add video.

Note that people have had problems with allow=all. You should disallow all, and and then add the specific codecs you need. Note, in particular, that Asterisk cannot transcode video, so you should normally only specify one video codec across all your endpoints.

1 Like

Hello all,

@jcolp attached the sip traces. The portsip to baresip video stream works, the baresip to portsip no.
@david551 yes i have try to set allow=all for try to avoid problems and see if with all enable the video stream works after we will change this setting

Thanks

baresip to portsip.txt (16.1 KB) portsip to baresip.txt (13.9 KB)

I believe the problem is the use of “allow=all”. It is causing an issue with SDP generation. Disallow all as mentioned, and allow only specific codecs.

Yes, setting

disallow=all
allow = h264,ulaw,ulaw

now it’s working. @jcolp and @david551 Thanks for help!!!

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