Trivial issue with video but I am stuck


#1

Hello everyone,

I’ve installed an asterisk server on a raspberry pi 3 with RASPBX.

I have the asterisk server and 2 softphone on android on the same LAN (there is no firewall at all on the LAN).

The voice call are great however the video does not work with Zoiper but the video does work with Linphone. The codec I use are alaw for the sound and vp8 for the video (at the moment only those two for simplicity). And the video is properly enabled on asterisk. Zoiper supports vp8 and (I guess) properly configured the Zoiper App tu use vp8.

When I use two Zoiper softphone I understand that the following is happening:

Exchange information to set up the sound channel.

<------------>
[2017-11-28 22:10:15] VERBOSE[26582] chan_sip.c:
<--- SIP read from UDP:192.168.1.13:50512 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.41:5060;branch=z9hG4bK1d1f0da4
Contact: <sip:Phone2@192.168.1.13:50512>
To: <sip:Phone2@192.168.1.13:50512;rinstance=f4c27b3e08aa7060;transport=UDP>;tag=0a007371
From: <sip:Phone1@192.168.1.41>;tag=as79658b9e
Call-ID: 661a37d4513a01dd5660f0497c152d94@192.168.1.41:5060
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper rd82a609
Allow-Events: presence, kpml, talk
Content-Length: 194

v=0
o=Zoiper 0 1 IN IP4 192.168.1.13
s=Zoiper
c=IN IP4 192.168.1.13
t=0 0
m=audio 38676 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv

<------------->
[2017-11-28 22:10:15] VERBOSE[26582] chan_sip.c: --- (12 headers 10 lines) ---
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found RTP audio format 8
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found RTP audio format 101
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found audio description format PCMA for ID 8
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found audio description format telephone-event for ID 101
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Capabilities: us - (alaw|vp8), peer - audio=(alaw)/video=(nothing)/text=(nothing), combined - (alaw)
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Peer audio RTP is at port 192.168.1.13:38676
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] sip/route.c: sip_route_dump: route/path hop: <sip:Phone2@192.168.1.13:50512>
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: set_destination: Parsing <sip:Phone2@192.168.1.13:50512> for address/port to send to
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: set_destination: set destination to 192.168.1.13:50512
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Transmitting (no NAT) to 192.168.1.13:50512:
ACK sip:Phone2@192.168.1.13:50512 SIP/2.0^M
Via: SIP/2.0/UDP 192.168.1.41:5060;branch=z9hG4bK7dce94b2^M
Max-Forwards: 70^M
From: <sip:Phone1@192.168.1.41>;tag=as79658b9e^M
To: <sip:Phone2@192.168.1.13:50512;rinstance=f4c27b3e08aa7060;transport=UDP>;tag=0a007371^M
Contact: <sip:Phone1@192.168.1.41:5060>^M
Call-ID: 661a37d4513a01dd5660f0497c152d94@192.168.1.41:5060^M
CSeq: 102 ACK^M
User-Agent: FPBX-14.0.1.8(13.17.1)^M
Content-Length: 0^M
^M


---
[2017-11-28 22:10:15] VERBOSE[28195][C-0000000e] app_dial.c: SIP/Phone2-0000001d answered SIP/Phone1-0000001c
[2017-11-28 22:10:15] VERBOSE[28195][C-0000000e] chan_sip.c: Audio is at 18218
[2017-11-28 22:10:15] VERBOSE[28195][C-0000000e] chan_sip.c: Adding codec alaw to SDP
[2017-11-28 22:10:15] VERBOSE[28195][C-0000000e] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2017-11-28 22:10:15] VERBOSE[28195][C-0000000e] chan_sip.c:
<--- Reliably Transmitting (no NAT) to 192.168.1.15:39142 --->
SIP/2.0 200 OK^M
Via: SIP/2.0/UDP 192.168.1.15:39142;branch=z9hG4bK-524287-1---a19a67d7e719e3aa;received=192.168.1.15;rport=39142^M
From: <sip:Phone1@192.168.1.41:5060;transport=UDP>;tag=b378bb3a^M
To: <sip:102@192.168.1.41:5060;transport=UDP>;tag=as0515441f^M
Call-ID: BUCwuex4cN4zy-Of75H3UQ..^M
CSeq: 2 INVITE^M
Server: FPBX-14.0.1.8(13.17.1)^M
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE^M
Supported: replaces, timer^M
Contact: <sip:102@192.168.1.41:5060>^M
Content-Type: application/sdp^M
Content-Length: 238^M
^M
v=0^M
o=root 827770960 827770960 IN IP4 192.168.1.41^M
s=Asterisk PBX 13.17.1^M
c=IN IP4 192.168.1.41^M
t=0 0^M
m=audio 18218 RTP/AVP 8 101^M
a=rtpmap:8 PCMA/8000^M
a=rtpmap:101 telephone-event/8000^M
a=fmtp:101 0-16^M
a=maxptime:150^M
a=sendrecv^M

<------------>
[2017-11-28 22:10:15] VERBOSE[28196][C-0000000e] bridge_channel.c: Channel SIP/Phone2-0000001d joined 'simple_bridge' basic-bridge <782934c9-11c1-4c5c-b5b9-509fff9239fb>
[2017-11-28 22:10:15] VERBOSE[28195][C-0000000e] bridge_channel.c: Channel SIP/Phone1-0000001c joined 'simple_bridge' basic-bridge <782934c9-11c1-4c5c-b5b9-509fff9239fb>
[2017-11-28 22:10:15] VERBOSE[26582] chan_sip.c:
<--- SIP read from UDP:192.168.1.15:39142 --->
ACK sip:102@192.168.1.41:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.15:39142;branch=z9hG4bK-524287-1---c76c02b72704b082;rport
Max-Forwards: 70
Contact: <sip:Phone1@192.168.1.15:39142;transport=UDP>
To: <sip:102@192.168.1.41:5060;transport=UDP>;tag=as0515441f
From: <sip:Phone1@192.168.1.41:5060;transport=UDP>;tag=b378bb3a
Call-ID: BUCwuex4cN4zy-Of75H3UQ..
CSeq: 2 ACK
User-Agent: Zoiper rd82a609
Content-Length: 0

=> It works.

And then it exchanges information to set up the video channel.

<------------->
[2017-11-28 22:10:15] VERBOSE[26582] chan_sip.c: --- (10 headers 0 lines) ---
[2017-11-28 22:10:15] VERBOSE[26582] chan_sip.c:
<--- SIP read from UDP:192.168.1.15:39142 --->
INVITE sip:102@192.168.1.41:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.15:39142;branch=z9hG4bK-524287-1---2dd91c45cf2daebc;rport
Max-Forwards: 70
Contact: <sip:Phone1@192.168.1.15:39142;transport=UDP>
To: <sip:102@192.168.1.41:5060;transport=UDP>;tag=as0515441f
From: <sip:Phone1@192.168.1.41:5060;transport=UDP>;tag=b378bb3a
Call-ID: BUCwuex4cN4zy-Of75H3UQ..
CSeq: 3 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper rd82a609
Authorization: Digest username="Phone1",realm="asterisk",nonce="40575e0c",uri="sip:102@192.168.1.41:5060",response="6ff13aa0ea3c25795000517a54d069e6",algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 257

v=0
o=Zoiper 0 1 IN IP4 192.168.1.15
s=Zoiper
c=IN IP4 192.168.1.15
t=0 0
m=audio 54494 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
m=video 54496 RTP/AVP 116
a=rtpmap:116 VP8/90000
a=sendrecv
<------------->
[2017-11-28 22:10:15] VERBOSE[26582] chan_sip.c: --- (14 headers 13 lines) ---
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Sending to 192.168.1.15:39142 (no NAT)
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found RTP audio format 8
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found RTP audio format 101
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found audio description format PCMA for ID 8
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found audio description format telephone-event for ID 101
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found RTP video format 116
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Found video description format VP8 for ID 116
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Capabilities: us - (alaw|vp8), peer - audio=(alaw)/video=(vp8)/text=(nothing), combined - (alaw|vp8)
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[2017-11-28 22:10:15] VERBOSE[26582][C-0000000e] chan_sip.c: Peer audio RTP is at port 192.168.1.15:54494
[2017-11-28 22:10:16] VERBOSE[26582][C-0000000e] chan_sip.c:
<--- Transmitting (no NAT) to 192.168.1.15:39142 --->
SIP/2.0 100 Trying^M
Via: SIP/2.0/UDP 192.168.1.15:39142;branch=z9hG4bK-524287-1---2dd91c45cf2daebc;received=192.168.1.15;rport=39142^M
From: <sip:Phone1@192.168.1.41:5060;transport=UDP>;tag=b378bb3a^M
To: <sip:102@192.168.1.41:5060;transport=UDP>;tag=as0515441f^M
Call-ID: BUCwuex4cN4zy-Of75H3UQ..^M
CSeq: 3 INVITE^M
Server: FPBX-14.0.1.8(13.17.1)^M
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE^M
Supported: replaces, timer^M
Contact: <sip:102@192.168.1.41:5060>^M
Content-Length: 0^M



<------------>
[2017-11-28 22:10:16] VERBOSE[26582][C-0000000e] chan_sip.c: Audio is at 18218
[2017-11-28 22:10:16] VERBOSE[26582][C-0000000e] chan_sip.c: Adding codec alaw to SDP
[2017-11-28 22:10:16] VERBOSE[26582][C-0000000e] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2017-11-28 22:10:16] VERBOSE[26582][C-0000000e] chan_sip.c:
<--- Reliably Transmitting (no NAT) to 192.168.1.15:39142 --->
SIP/2.0 200 OK^M
Via: SIP/2.0/UDP 192.168.1.15:39142;branch=z9hG4bK-524287-1---2dd91c45cf2daebc;received=192.168.1.15;rport=39142^M
From: <sip:Phone1@192.168.1.41:5060;transport=UDP>;tag=b378bb3a^M
To: <sip:102@192.168.1.41:5060;transport=UDP>;tag=as0515441f^M
Call-ID: BUCwuex4cN4zy-Of75H3UQ..^M
CSeq: 3 INVITE^M
Server: FPBX-14.0.1.8(13.17.1)^M
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE^M
Supported: replaces, timer^M
Contact: <sip:102@192.168.1.41:5060>^M
Content-Type: application/sdp^M
Content-Length: 261^M
^M
v=0^M
o=root 827770960 827770961 IN IP4 192.168.1.41^M
s=Asterisk PBX 13.17.1^M
c=IN IP4 192.168.1.41^M
t=0 0^M
m=audio 18218 RTP/AVP 8 101^M
a=rtpmap:8 PCMA/8000^M
a=rtpmap:101 telephone-event/8000^M
a=fmtp:101 0-16^M
a=maxptime:150^M
a=sendrecv^M
m=video 0 RTP/AVP 116^M

<------------>
[2017-11-28 22:10:16] VERBOSE[26582] chan_sip.c:
<--- SIP read from UDP:192.168.1.15:39142 --->
ACK sip:102@192.168.1.41:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.15:39142;branch=z9hG4bK-524287-1---43804def0910b8ab;rport
Max-Forwards: 70
Contact: <sip:Phone1@192.168.1.15:39142;transport=UDP>
To: <sip:102@192.168.1.41:5060;transport=UDP>;tag=as0515441f
From: <sip:Phone1@192.168.1.41:5060;transport=UDP>;tag=b378bb3a
Call-ID: BUCwuex4cN4zy-Of75H3UQ..
CSeq: 3 ACK
User-Agent: Zoiper rd82a609
Content-Length: 0

=> the video channel is ready (the codec are compatible between us and the peer):
Capabilities: us - (alaw|vp8), peer - audio=(alaw)/video=(vp8)/text=(nothing), combined - (alaw|vp8)

=> the video port 54496 is sent:
m=video 54496 RTP/AVP 116

However the answer by asterisk (or the softphone) is to decline the video offer by setting the video port to 0:
m=video 0 RTP/AVP 116

What am I missing, why the video stream is declined?

Again the video works perfectly with exactly the same configuration of asterisk with the Linphone App running on the two softphones. (But I cannot use Linphone because the call is dropped after exactly 32 seconds every time, and the 32 seconds drop call does never happened with Zoiper…).

Thank you so much for your help.


#2

The Zoiper needs to request video in the initial INVITE. Asterisk cannot change this once the call is up, and, in particular will not pass any renegotiated codec information to the B side of the call.


#3

Hello David, Thank you so much for your help.

I’ve tried the entire evening to make Zoiper request the video in the initial INVITE by changing parameters in the APP. I could’nt figure it out where is the option…

I believe it should be:
Config/Video/Always offer video (X)

I also tried to change the protocol from UDP to TCP. Both protocols work but only the sound, never the video.

Any advices?

Thank you so much for your time.


#4

Hello everyone,

I update my post to let the future readers know about the solution I found.

After contacting Zoiper, it seems that it is not a question about a parameter in the app. It appears that the Zoiper app is not fully compatible with asterisk for the video (at least for now).

What you can do is try to change in Asterisk:
videosupport=yes
by
videosupport=always

It will improve a bit and sometimes you’ll get the video stream but just in one direction… (which is not acceptable).

The real solution I found is to use another app on android: “Linphone”.

However at this time the version on the playstore is the “3.3.1” and contains a bug when Linphone is the callee (the bug is that the call is dropped after 32 seconds exactly).

What I did to solve this issue is to install a previous version of the Linphone app. In my case the 3.2.7 where the bug is not present.

Now the video and the audio work flawlessly (on the same network) with Linphone 3.2.7 and asterisk 13.

Thanks to all of you for your support!

Regards,