I use Asterisk v13.10 on Ubuntu. I have to
establish a h263p video call between two peers ‘e100’ and ‘e101’. I have
a setup the sip.conf and users.conf to enable h263p and videosupport.
The problem is that only audio is allowed and video is deactivated. Both
peers can establish a video call with a direct peer to peer sip call,
without going through asterisk. I have also tested the same
configuration with h264 which works. But my requirement is to use h263p.
I’ve used different clients microsip on pc, cispsimple android app and
pjsip app on pc as peers. I was able to find one error as below.
14:17:20.897 pjsua_media.c …pjsua_vid_channel_update() failed for call_id 0
media 1: Invalid SDP fmtp attribute (PJMEDIA_SDP_EINFMTP)
14:17:20.897 pjsua_media.c …Error updating media call00:1: Invalid SDP fmtp attribute (PJMEDIA_SDP_EINFMTP)
I am clueless on how to fix this. I’ve attached my call logs. I would be
thankful if the someone can suggest a solution for this.
My conf files are as follows.
sip.conf
Context-Extension
type=friend
nat=yes
directmedia=yes
host=dynamic
canreinvite=no
context=Context
subscribecontext=Context
allowsubscribe=yes
busylevel=1
disallow=all
videosupport=yes
;allow=speex16
;allow=gsm
;allow=g722
;allow=g726
;allow=h261
;allow=h263p
allow=speex16,h263p
;allow=h264
accept_outofcall_message=yes
outofcall_message_context=Context
auth_message_requests=yes
e100
username=e100
secret=mysecret
mailbox=e100@default
e101
username=e101
secret=Orv101
mailbox=e101@default
users.conf
[e100]
username = e100
transfer = yes
mailbox = e100
call-limit = 100
fullname = e100
registersip = no
host = dynamic
callgroup = 1
context = Context-Extension
cid_number = e100
hasvoicemail = yes
vmsecret = mysecret
email =
threewaycalling = no
hasdirectory = no
callwaiting = no
hasmanager = no
hasagent = no
hassip = yes
hasiax = yes
secret = mysecret
nat = yes
canreinvite = yes
dtmfmode = rfc2833
insecure = no
pickupgroup = 1
autoprov = no
label =
macaddress =
linenumber = 1
videosupport=yes
disallow = all
allow = speex16,h263p
pjsip logs
Current call id=3 to sip:e100@98.87.98.25:5065 [CALLING]
16:01:19.176 pjsua_app.c !..Call 3 state changed to EARLY (180 Ringing)
16:01:21.109 pjsua_app.c …Call 3 state changed to CONNECTING
DEBUG speex_encoder_init
DEBUG speex_encoder_init
DEBUG nb_celp.c nb_encoder_init
16:01:21.127 pjsua_media.c …pjsua_vid_channel_update() failed for call_id 3 media 1: Invalid SDP fmtp attribute (PJMEDIA_SDP_EINFMTP)
16:01:21.129 pjsua_app.c …Call 3 state changed to CONFIRMED
DEBUG speex_encoder_init
DEBUG speex_encoder_init
DEBUG nb_celp.c nb_encoder_init
16:01:21.676 pjsua_media.c …pjsua_vid_channel_update() failed for call_id 3 media 1: Invalid SDP fmtp attribute (PJMEDIA_SDP_EINFMTP)
16:01:21.677 pjsua_app.c …Just rejected incoming video offer on call 3, use “vid call enable 1” or “vid call add” to enable video!
DEBUG speex_encoder_init
DEBUG speex_encoder_init
DEBUG nb_celp.c nb_encoder_init
16:01:38.216 pjsua_media.c …pjsua_vid_channel_update() failed for call_id 3 media 1: Invalid SDP fmtp attribute (PJMEDIA_SDP_EINFMTP)
16:01:38.216 pjsua_app.c …Just rejected incoming video offer on call 3, use “vid call enable 1” or “vid call add” to enable video!
16:01:38.892 pjsua_app.c …Call 3 is DISCONNECTED [reason=200 (Normal call clearing)]
16:01:38.893 pjsua_app.c …
[DISCONNCTD] To: sip:e100@98.87.98.25 ;tag=as48a6850a
Call time: 00h:00m:17s, 1st res in 11955 ms, conn in 13908ms
#0 audio speex @16kHz , sendrecv, peer=-
SRTP status: Not active Crypto-suite: (null)
RX pt=98, last update:never
total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%)
(msec) min avg max last dev
loss period: 0.000 0.000 0.000 0.000 0.000
jitter : 0.000 0.000 0.000 0.000 0.000
TX pt=98, ptime=20, last update:never
total 33pkt 2.3KB (3.6KB +IP hdr) @avg=27.1Kbps/42.6Kbps
pkt loss=0 (0.0%), dup=0 (0.0%), reorder=0 (0.0%)
(msec) min avg max last dev
loss period: 0.000 0.000 0.000 0.000 0.000
jitter : 0.000 0.000 0.000 0.000 0.000
RTT msec : 0.000 0.000 0.000 0.000 0.000
#1 video deactivated
16:01:39.894 pjsua_app.c .Turning sound device OFF
Thanks
1 Like
jcolp
August 29, 2016, 9:58am
2
You would need to figure out why the pjsua based application is rejecting the fmtp line for the video. Providing the SIP traffic itself could provide some insight.
INVITE sip:e101@192.168.7.128:49447;ob SIP/2.0
Via: SIP/2.0/UDP 98.87.98.25:5065;branch=z9hG4bK0c4c6114;rport
Max-Forwards: 70
From: <sip:e100@98.87.98.25>;tag=as5ceafcbd
To: "e101" <sip:e101@98.87.98.25>;tag=3f006861f11f48af9108347e65be33be
Contact: <sip:e100@98.87.98.25:5065>
Call-ID: 2c16b69f84644644a771d7c4e1d01c9d
CSeq: 124 INVITE
User-Agent: Asterisk PBX 13.10.0
Session-Expires: 1800;refresher=uac
Min-SE: 90
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 404
v=0
o=root 1039623279 1039623302 IN IP4 192.168.1.75
s=Asterisk PBX 13.10.0
c=IN IP4 192.168.1.75
b=CT:384
t=0 0
m=audio 4238 RTP/AVP 9 101
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
m=video 4284 RTP/AVP 98
a=rtpmap:98 h263-1998/90000
a=fmtp:98 SQCIF=0;QCIF=1;CIF=1;CIF4=0;CIF16=0;VGA=0;F=0;I=0;J=0;T=0;K=0;N=0;BPP=0;HRD=0
a=sendrecv
--end msg--
15:41:27.937 dlg02A3E1CC .Received Request msg INVITE/cseq=124 (rdata02AA2F5C)
15:41:27.937 tsx02A4C2AC ...Transaction created for Request msg INVITE/cseq=124 (rdata02AA2F5C)
15:41:27.937 tsx02A4C2AC ..Incoming Request msg INVITE/cseq=124 (rdata02AA2F5C) in state Null
15:41:27.937 tsx02A4C2AC ...State changed from Null to Trying, event=RX_MSG
15:41:27.937 dlg02A3E1CC ....Transaction tsx02A4C2AC state changed to Trying
15:41:27.937 inv02A3E1CC .....Got SDP offer in Request msg INVITE/cseq=124 (rdata02AA2F5C)
15:41:27.937 pjsua_call.c .....Call 0: received updated media offer
15:41:27.937 pjsua_media.c ......Call 0: re-initializing media..
15:41:27.945 pjsua_media.c .......RTP socket reachable at 192.168.7.128:4282
15:41:27.945 pjsua_media.c .......RTCP socket reachable at 192.168.7.128:4283
15:41:27.945 pjsua_media.c .......Media index 0 selected for audio call 0
15:41:27.945 endpoint .....Response msg 200/INVITE/cseq=124 (tdta091F3008) created
15:41:27.945 inv02A3E1CC .....SDP negotiation done, status=0
15:41:27.945 pjsua_call.c ......Call 0: remote NAT type is 0 (Unknown)
15:41:27.945 pjsua_media.c ......Call 0: updating media..
15:41:27.945 pjsua_media.c .......Call 0: stream #0 (audio) unchanged.
15:41:27.945 pjsua_media.c .......Audio updated, stream #0: G722 (sendrecv)
15:41:27.945 pjsua_media.c ........Media stream call00:1 is destroyed
15:41:27.945 pjsua_vid.c .......Video channel update..
15:41:27.945 pjsua_media.c .......pjsua_vid_channel_update() failed for call_id 0 media 1: Invalid SDP fmtp attribute (PJMEDIA_SDP_EINFMTP)
15:41:27.945 pjsua_media.c ........Media stream call00:1 is destroyed
15:41:27.946 pjsua_media.c .......Error updating media call00:1: Invalid SDP fmtp attribute (PJMEDIA_SDP_EINFMTP)
15:41:27.946 pjsua_aud.c ......Conf connect: 1 --> 0
15:41:27.946 pjsua_aud.c ......Conf connect: 0 --> 1
15:41:27.946 inv02A3E1CC ......Sending Response msg 200/INVITE/cseq=124 (tdta091F3008)
15:41:27.946 dlg02A3E1CC .......Sending Response msg 200/INVITE/cseq=124 (tdta091F3008)
15:41:27.946 tsx02A4C2AC .......Sending Response msg 200/INVITE/cseq=124 (tdta091F3008) in state Trying
15:41:27.946 pjsua_core.c ........TX 1043 bytes Response msg 200/INVITE/cseq=124 (tdta091F3008) to UDP 98.87.98.25:5065:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 98.87.98.25:5065;rport=5065;received=98.87.98.25;branch=z9hG4bK0c4c6114
Call-ID: 2c16b69f84644644a771d7c4e1d01c9d
From: <sip:e100@98.87.98.25>;tag=as5ceafcbd
To: "e101" <sip:e101@98.87.98.25>;tag=3f006861f11f48af9108347e65be33be
CSeq: 124 INVITE
Session-Expires: 1800;refresher=uac
Require: timer
Contact: "e101" <sip:e101@192.168.7.128:49447;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Content-Type: application/sdp
Content-Length: 441
jcolp
August 29, 2016, 10:28am
4
Asterisk is sending “SQCIF=0;QCIF=1;CIF=1;CIF4=0;CIF16=0;VGA=0;F=0;I=0;J=0;T=0;K=0;N=0;BPP=0;HRD=0” and pjsua does not like it for some reason. Why that is, I do not know. You’d need to investigate on the pjsua side.
Thanks.
But this is not happening when we made direct call between e100 and e101. It only happens when call is routed through Asterisk. The fmtp line is being added/moded by Asterisk. This is proven by the line “s=Asterisk PBX 13.10.0” in the SDP.
Is there a conf parameter to tell Asterisk to not do this?
jcolp
August 29, 2016, 11:01am
6
Asterisk is not a SIP proxy so it will always generate its own SDP. It’s not possible to tell Asterisk not to do this, and it will also generate its own fmtp line in it.
varma
August 29, 2016, 11:13am
7
Is it possible to configure Asterisk with what goes into the fmtp line? I mean, can we allow only CIF, QCIF or whichever resolutions work for this call.
jcolp
August 29, 2016, 11:15am
8
No, it is not configurable. It produces the line based on what it knows including unset stuff.
Well… it isn’t configurable, but if you don’t load res_format_attr_h263
, that line won’t be appended to the SDP.
Now, without that fmtp
line, the video call may still fail, but it would at least be for an entirely new reason
jcolp
August 29, 2016, 12:58pm
10
Ooh I forgot all of that stuff were in loadable modules, ha. Nice idea!
Almost 4 years later, I just stumbled across exactly this same problem using Asterisk 16.2.1~dfsg-1+deb10u2 (Debian Buster). In my setup, Asterisk sends
a=fmtp:96 SQCIF=0;QCIF=1;CIF=1;CIF4=0;CIF16=0;VGA=0;F=0;I=0;J=0;T=0;K=0;N=0;BPP=0;HRD=0
as part of an SDP. However, according to the IETF draft “SDP parameters for supporting H.263 and H.261 options” (draft-even-avt-h263-h261-options-00 ), expressions like “QCIF=0” or “CIF4=0” are not allowed. The number must be in the range from 1 to 32.
Apparently, the Asterisk module generates an illegal fmtp line, and PJSUA cannot be blamed for rejecting it.
Is there any other source of information on how to deal with it?