My first attempt to make a video call with PJSIP

Added video codecs to pjsip.conf:

allow=h263p
allow=h263
allow=h264
allow=vp8

see full PJSIP configuration on GitHub.

core show channeltypes
Type             Description                              Devicestate   Presencestate Indications   Transfer
-------------    -------------                            ------------- ------------- ------------- -------------
Recorder         Bridge Media Recording Channel Driver    no            no            yes           no
Announcer        Bridge Media Announcing Channel Driver   no            no            yes           no
USTM             UNISTIM Channel Driver                   no            no            yes           no
CBAnn            Conference Bridge Announcing Channel     no            no            yes           no
CBRec            Conference Bridge Recording Channel      no            no            no            no
PJSIP            PJSIP Channel Driver                     yes           no            yes           yes
AudioSocket      AudioSocket Channel Driver               no            no            no            no
UnicastRTP       Unicast RTP Media Channel Driver         no            no            no            no
MulticastRTP     Multicast RTP Paging Channel Driver      no            no            no            no
IAX2             Inter Asterisk eXchange Driver (Ver 2)   yes           no            yes           yes
Local            Local Proxy Channel Driver               yes           no            yes           no
Surrogate        Surrogate channel used to pull channel f no            no            no            no
----------
12 channel drivers registered.
core show codecs
Disclaimer: this command is for informational purposes only.
        It does not indicate anything about your configuration.
      ID TYPE  NAME         FORMAT           QUALITY DESCRIPTION
------------------------------------------------------------------------------------------------
      30 image png          png                    0 (PNG Image)
       6 audio g726         g726                  85 (G.726 RFC3551)
       4 audio alaw         alaw                 100 (G.711 a-law)
       2 audio g723         g723                  20 (G.723.1)
      20 audio speex        speex                 40 (SpeeX)
      21 audio speex        speex16               40 (SpeeX 16khz)
      22 audio speex        speex32               40 (SpeeX 32khz)
      24 audio g722         g722                 110 (G722)
      25 audio siren7       siren7                85 (ITU G.722.1 (Siren7, licensed from Polycom))
      31 video h261         h261                   0 (H.261 video)
      32 video h263         h263                   0 (H.263 video)
       8 audio adpcm        adpcm                 80 (Dialogic ADPCM)
      35 video h265         h265                   0 (H.265 video)
      43 audio silk         silk8                  0 (SILK Codec (8 KHz))
      44 audio silk         silk12                 0 (SILK Codec (12 KHz))
      45 audio silk         silk16                 0 (SILK Codec (16 KHz))
      46 audio silk         silk24                 0 (SILK Codec (24 KHz))
      27 audio g719         g719                  95 (ITU G.719)
      33 video h263p        h263p                  0 (H.263+ video)
      34 video h264         h264                   0 (H.264 video)
      19 audio g729         g729                  20 (G.729A)
       9 audio slin         slin                 115 (16 bit Signed Linear PCM)
      10 audio slin         slin12               116 (16 bit Signed Linear PCM (12kHz))
      11 audio slin         slin16               117 (16 bit Signed Linear PCM (16kHz))
      12 audio slin         slin24               118 (16 bit Signed Linear PCM (24kHz))
      13 audio slin         slin32               119 (16 bit Signed Linear PCM (32kHz))
      14 audio slin         slin44               120 (16 bit Signed Linear PCM (44kHz))
      15 audio slin         slin48               121 (16 bit Signed Linear PCM (48kHz))
      16 audio slin         slin96               122 (16 bit Signed Linear PCM (96kHz))
      17 audio slin         slin192              123 (16 bit Signed Linear PCM (192kHz))
       3 audio ulaw         ulaw                 100 (G.711 u-law)
      18 audio lpc10        lpc10                 25 (LPC10)
      42 audio none         none                   0 (<Null> codec)
      41 image t38          t38                    0 (T.38 UDPTL Fax)
      38 video vp9          vp9                    0 (VP9 video)
      37 video vp8          vp8                    0 (VP8 video)
       5 audio gsm          gsm                   60 (GSM)
      36 video mpeg4        mpeg4                  0 (MPEG4 video)
      23 audio ilbc         ilbc                  45 (iLBC)
      39 text  red          red                    0 (T.140 Realtime Text with redundancy)
      40 text  t140         t140                   0 (Passthrough T.140 Realtime Text)
      28 audio opus         opus                  50 (Opus Codec)
      29 image jpeg         jpeg                   0 (JPEG image)
       7 audio g726aal2     g726aal2              85 (G.726 AAL2)
       1 audio codec2       codec2                 0 (Codec 2)
      26 audio siren14      siren14               90 (ITU G.722.1 Annex C, (Siren14, licensed from Polycom))

Codecs in Linphone desktop client:

mobile Linphone client:

Tried to call from mobile client (C) do desktop client (A) and enable video, but the video was not displayed on client A, see the logs:

I was able to find video and H264 in the logs:

v=0
o=neo 1745 1016 IN IP4 13.163.232.112
s=Talk
c=IN IP4 13.163.232.112
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
a=record:off
m=audio 58875 RTP/AVP 96 97 98 0 8 18 101 99 100
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:97 speex/16000
a=fmtp:97 vbr=on
a=rtpmap:98 speex/8000
a=fmtp:98 vbr=on
a=fmtp:18 annexb=yes
a=rtpmap:101 telephone-event/48000
a=rtpmap:99 telephone-event/16000
a=rtpmap:100 telephone-event/8000
a=rtcp:42841
a=rtcp-fb:* trr-int 1000
a=rtcp-fb:* ccm tmmbr
m=video 48271 RTP/AVP 96 97
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=42801F
a=rtpmap:97 VP8/90000
a=fmtp:97 
a=rtcp:56434
a=rtcp-fb:* trr-int 1000
a=rtcp-fb:* ccm tmmbr
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 nack sli
a=rtcp-fb:97 ack rpsi
a=rtcp-fb:97 ccm fir

A call from C to another desktop client with VP8 codec:

v=0
o=neo 2172 2315 IN IP4 13.163.232.112
s=Talk
c=IN IP4 13.163.232.112
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
a=record:off
m=audio 51280 RTP/AVP 96 97 98 0 8 18 101 99 100
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:97 speex/16000
a=fmtp:97 vbr=on
a=rtpmap:98 speex/8000
a=fmtp:98 vbr=on
a=fmtp:18 annexb=yes
a=rtpmap:101 telephone-event/48000
a=rtpmap:99 telephone-event/16000
a=rtpmap:100 telephone-event/8000
a=rtcp:45829
a=rtcp-fb:* trr-int 1000
a=rtcp-fb:* ccm tmmbr
m=video 48939 RTP/AVP 96
a=rtpmap:96 VP8/90000
a=fmtp:96 
a=rtcp:59925
a=rtcp-fb:* trr-int 1000
a=rtcp-fb:* ccm tmmbr
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 nack sli
a=rtcp-fb:96 ack rpsi
a=rtcp-fb:96 ccm fir

Capabilities does not contain video codecs. What does it mean?

core show channeltype PJSIP
-- Info about channel driver: PJSIP --
  Device State: yes
Presence State: no
    Indication: yes
     Transfer : yes
  Capabilities: (codec2|g723|ulaw|alaw|gsm|g726|g726aal2|adpcm|slin|slin12|slin16|slin24|slin32|slin44|slin48|slin96|slin192|lpc10|g729|speex|speex16|speex32|ilbc|g722|siren7|siren14|g719|opus|silk8|silk12|silk16|silk24)
   Digit Begin: yes
     Digit End: yes
    Send HTML : no
 Image Support: no
  Text Support: yes

3 Responses to My first attempt to make a video call with PJSIP

  1. dmitriano says:

    No video in Asterisk w/ PJSIP
    https://community.asterisk.org/t/no-video-in-asterisk-w-pjsip/67018
    However, it appears that PJSIP is not capable of sending any kind of video?

  2. dmitriano says:

    PJSIP video configuration
    https://community.asterisk.org/t/pjsip-video-configuration/82415
    There is no “videosupport” option, it has to be removed or the endpoint won’t be loaded. That option is for chan_sip only. You only need to specify a video codec in chan_pjsip.
    You can set multiple however Asterisk does not transcode video so both sides have to use the same one.

Leave a Reply

Your email address will not be published. Required fields are marked *