Unable to turn a voice call to video call

I am trying since a long time to make video calls work properly at an Asterisk installation. I am using the latest FreePBX iso (Asterisk 18.6.0 and FreePBX 15.0.17.63)

All tests are being done with Android mobile phones and Linphone and Grandstream Wave softphones.

Until now, video calls work fine if they have been initiated as video calls from the beggining. If at such call duration any call party stops the video (by pressing the relevant button at the softphone) , it can be initiated again without issues.

I have never managed to start a phone call WITHOUT video from the beggining and make it a video call while talking. With Linphone if any party presses the video button, no error message is displayed but video does not start. Doing the same with Grandstream Wave, i get error Video invite failed and also in this case video does not start. In both cases, asterisk console (asterisk -grvvvvvvvvvv) does not display errors.

By issuing stip set debug on at asterisk console, i get the following when i attempt to start video at a call that has not been a video call from the beggining. This test has been done with Grandstream Wave and unfortunatelly i don’t remember from which extension i tried to initiate video.

<β€” SIP read from UDP:HOME_IP:17579 β€”>
INVITE sip:[email protected]_IP:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.190:52851;branch=z9hG4bK1714403858;rport
From: β€œvideo2” sip:[email protected]_HOSTNAME;tag=342041145
To: sip:[email protected]_HOSTNAME;tag=as21f92715
Call-ID: [email protected]
CSeq: 37 INVITE
Contact: sip:[email protected]:52851
Max-Forwards: 70
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.0.3.34
Session-Expires: 1800;refresher=uas
Min-SE: 1800
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 482

v=0
o=101 8000 8006 IN IP4 192.168.0.190
s=SIP Call
c=IN IP4 192.168.0.190
t=0 0
m=audio 28740 RTP/AVP 8 0 101
a=sendrecv
a=rtcp:28741 IN IP4 192.168.0.190
a=rtpmap:8 PCMA/8000
a=ptime:20
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
m=video 37242 RTP/AVP 105
b=AS:704
a=sendrecv
a=rtcp:37243 IN IP4 192.168.0.190
a=rtpmap:105 H264/90000
a=fmtp:105 profile-level-id=428016; packetization-mode=1
a=rtcp-fb:* nack pli
a=rtcp-fb:* ccm fir
<------------->
β€” (16 headers 21 lines) β€”
Sending to HOME_IP:17579 (NAT)
Comparing SDP version 8005 β†’ 8006 and unique parts [101 8000 IN IP4 192.168.0.190] β†’ [101 8000 IN IP4 192.168.0.190]
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (alaw|g722|ulaw|ilbc|gsm|g726|vp8|h265|h264|mpeg4), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (alaw|ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.0.190:28740

<β€” Transmitting (NAT) to HOME_IP:17579 β€”>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.190:52851;branch=z9hG4bK1714403858;received=HOME_IP;rport=17579
From: β€œvideo2” sip:[email protected]_HOSTNAME;tag=342041145
To: sip:[email protected]_HOSTNAME;tag=as21f92715
Call-ID: [email protected]
CSeq: 37 INVITE
Server: FPBX-15.0.17.63(18.6.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:[email protected]_IP:5060
Content-Length: 0

<------------>
Audio is at 13352
Adding codec alaw to SDP
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<β€” Reliably Transmitting (NAT) to HOME_IP:17579 β€”>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.190:52851;branch=z9hG4bK1714403858;received=HOME_IP;rport=17579
From: β€œvideo2” sip:[email protected]_HOSTNAME;tag=342041145
To: sip:[email protected]_HOSTNAME;tag=as21f92715
Call-ID: [email protected]
CSeq: 37 INVITE
Server: FPBX-15.0.17.63(18.6.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:[email protected]_IP:5060
Content-Type: application/sdp
Require: timer
Content-Length: 530

v=0
o=root 308174370 308174376 IN IP4 ASTERISK_IP
s=Asterisk PBX 18.6.0
c=IN IP4 ASTERISK_IP
t=0 0
m=audio 13352 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=ice-ufrag:1fd229157386479e07dcd4652605b4b8
a=ice-pwd:220c4f167ef9039f5ac92959171edd6d
a=candidate:Hb9a8c354 1 UDP 2130706431 ASTERISK_IP 13352 typ host
a=candidate:Hb9a8c354 2 UDP 2130706430 ASTERISK_IP 13353 typ host
a=rtcp-mux
a=sendrecv
m=video 0 RTP/AVP 105

<------------>

<β€” SIP read from UDP:HOME_IP:17579 β€”>
ACK sip:[email protected]_IP:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.190:52851;branch=z9hG4bK695479871;rport
From: sip:[email protected]_HOSTNAME;tag=342041145
To: sip:[email protected]_HOSTNAME;tag=as21f92715
Call-ID: [email protected]
CSeq: 37 ACK
Contact: sip:[email protected]:52851
Max-Forwards: 70
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.0.3.34
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

<------------->
β€” (12 headers 0 lines) β€”

Where ASTERISK_IP , is the public IP of Asterisk installation.
Where HOME_IP , is my home public IP
Where ASTERISK_HOSTNAME , is the Asterisk installation hostname

I have two extensions: 100 with video1 name and 101 with video2 name.

canreinvite is no at both extensions. I have tried enabling it, but no difference.

I have done also a PCAP trace, both with canreinvite NO and YES with the following cases. I used Grandstream Wave and i got error Video invite failed even when i had canreinvite to YES at both extensions:

a) Call from 101 to 100 without video from the beggining
b) Attempt to start a call first from the one extension and then from the other

The PCAP trace was done with command tcpdump host HOME_IP -n -w FILE_NAME.pcap , so to catch only the traffic between this Asterisk and my home IP and not the whole traffic of this Asterisk. Then i converted the files to TXT with command tcpdump -A -r INPUT_FILE_NAME.pcap > OUTPUT_FILE_NAME.txt .

I attach a .zip with the two files of PCAP traces:
a) without_reinvite_masked.txt where the tests have been done with canreinvite NO at both extensions
b) with_reinvite_masked.txt where the tests have been done with canreinvite YES at both extensions

At both PCAP files, i have masked the hostnames and public IPs as below:
ASTERISK_HOSTNAME : The Asterisk hostname
HOMEIP_HOSTNAME : The hostname of my home public IP
ASTERISK_IP : The Asterisk public IP
HOME_IP : My home public IP

Asterisk has been installed to a Virtual Machine with a public IP (so no NAT at Asterisk side) and has only one network interface which has the public IP. I register both extensions from my home without any VPN and voice calls between them work without issues.

I provide some screenshots with the settings of one extension (the second extension has exactly the same settings) and the Asterisk SIP Settings at FreePBX.

I have tried exactly the same setup with two different Asterisk versions (Asterisk 16 and Asterisk 18) and i have the same issues:

  1. An installation inside my home. In this case i register with local IPs and no NAT is done anywhere
  2. A Virtual Machine with a public IP in another location from the location i am sending the logs
  3. Activating TLS & SRTP (with a wildcard SSL, not self signed) at both extensions

I have done a lot of Google search and i have not found something that can help me.

I would really appreciate any assistance.













asterisk_pcap.tgz (95.6 KB)

The chan_sip module does not support this. The chan_pjsip module does.

2 Likes

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