[pjsip] Query regarding Video Media attribute in SDP in PJSIP Code

Bill Gardner billg at wavearts.com
Tue Apr 12 09:50:48 EDT 2016


Sorry, I thought the camera was another pjsip-based client. You're 
right, it looks like it should work. If you can run the caller in a 
debugger, try stepping through the sdp_neg code to see exactly what is 
happening. It also occurs to me that the update sent to the camera is 
done to select a single audio codec. You might be able to avoid the 
update by disabling all the audio codecs except PCMU.

Bill

On 4/12/2016 1:34 AM, Vikas Sharma wrote:
> Hi Bill,
>
> Actually in our case we are making a call from a *PJSIP* endpoint *to* 
> the *Camera* i.e PJSIP will send the INVITE and Camera will send 200 
> OK and we are already getting sendonly for video in the 200 ok packet 
> sent by the camera.Below are the SDP details we are getting in the SDP.
>
> *INVITE SDP(sent from PJSIP): 200 ok SDP(sent from camera)
> *
> *m=audio m=audio
> *
> *a=sendrecv a=sendrecv
> *
> *m=video m=video
> *
> *a=recvonly a=sendonly
>
> *
> /But after receiving 200OK packet the PJSIP code changes the media 
> attribute for video to *inactive *and sends an UPDATE packet to the 
> Camera.Below are the logs from PJSIP endpoint:
>
>
> /
> /_*SDP in the INVITE packet  form PJSIP endpoint:*_
>
> /
> /*m=audio* 4000 RTP/AVP 98 97 99 104 3 0 8 9 96
> c=IN IP4 192.168.7.174
> b=TIAS:64000
> a=rtcp:4001 IN IP4 192.168.7.174
> *a=sendrecv *
> a=rtpmap:98 speex/16000
> a=rtpmap:97 speex/8000
> a=rtpmap:99 speex/32000
> a=rtpmap:104 iLBC/8000
> a=fmtp:104 mode=30
> a=rtpmap:3 GSM/8000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:9 G722/8000
> a=rtpmap:96 telephone-event/8000
> a=fmtp:96 0-16
> *m=video* 4002 RTP/AVP 97 97 96
> c=IN IP4 192.168.7.174
> b=TIAS:256000
> a=rtcp:4003 IN IP4 192.168.7.174
> *a=recvonly *
> a=rtpmap:97 H264/90000
> a=fmtp:97 profile-level-id=42e01e; packetization-mode=1
> a=rtpmap:97 H264/90000
> a=fmtp:97 profile-level-id=42e01e; packetization-mode=1
> a=rtpmap:96 H263-1998/90000
> a=fmtp:96 CIF=1;QCIF=1
>
>
> /
> /_*SDP of 200OK from camera:*_
> v=0
> o=vikas 2389 406 IN IP4 192.168.5.248
> s=Talk
> c=IN IP4 192.168.5.248
> t=0 0
> *m=audio* 7078 RTP/AVP 0 8 96
> a=rtpmap:96 telephone-event/8000
> *m=video* 0 RTP/AVP 96
> a=rtpmap:96 H263-1998/90000
> a=fmtp:96 CIF=1;QCIF=1
> *a=sendonly*
>
>
>
>  pjsua_app.c  .....Call 0 state changed to CONNECTING
>  pjsua_media.c  .....Call 0: updating media..
>  pjsua_aud.c  ......Audio channel update..
> strm0x7fc65800  .......VAD temporarily disabled
> strm0x7fc65800  .......Encoder stream started
> 7fc65800  .......Decoder stream started
> pjsua_media.c  ......*Audio updated, stream #0: PCMU (sendrecv)*
> pjsua_media.c  ......*Video updated, stream #1: (inactive) *
> pjsua_app.c  .....Call 0 media 0 *[type=audio], status is Active *
> pjsua_aud.c  .....Conf disconnect: 1 -x- 0
> conference.c  ......Port 1 (ringback) stop transmitting to port 0 (pulse)
>  pjsua_aud.c  .....Conf connect: 3 --> 0
> conference.c  ......Port 3 (sip:192.168.5.248) transmitting to port 0 
> (pulse)
>  pjsua_aud.c  .....Conf connect: 0 --> 3
> conference.c  ......Port 0 (pulse) transmitting to port 3 
> (sip:192.168.5.248)
>  pjsua_app.c  .....Call 0 media 1*[type=video], status is None *
>  pjsua_core.c  .....TX 360 bytes Request msg ACK/cseq=9412 
> (tdta0x7fc65800fa50) to TCP 192.168.5.248:5060 
> <http://192.168.5.248:5060>:
> ACK sip:vikas at 192.168.5.248 
> <mailto:sip%3Avikas at 192.168.5.248>;transport=tcp SIP/2.0
>
>
> *pjsua_call.c  .Call 0 sending UPDATE for updating media session to 
> use only one codec *
> *UPDATE sip:vikas at 192.168.5.248 
> <mailto:sip%3Avikas at 192.168.5.248>;transport=tcp SIP/2.0 *
> Via: SIP/2.0/TCP 
> 192.168.7.174:45829;rport;branch=z9hG4bKPj175aa12f-828b-40be-9f8a-61cbb553a47b;alias
> Max-Forwards: 70
> From: <sip:192.168.7.174>;tag=5f7a28e9-c01b-483a-b98c-c3d0583bdf67
> To: sip:192.168.5.248;tag=wIbmd0-
> Contact: <sip:192.168.7.174:5060;ob>
> Call-ID: a47fedc4-ae32-4911-80a7-1bdea5769b2f
> CSeq: 31719 UPDATE
> Supported: replaces, 100rel, timer, norefersub
> Session-Expires: 1800
> Min-SE: 90
> Content-Type: application/sdp
> Content-Length:   328
>
> v=0
> o=- 3669344348 3669344349 IN IP4 192.168.7.174
> s=pjmedia
> b=AS:84
> t=0 0
> a=X-nat:0
> *m=audio* 4000 RTP/AVP 0 96
> c=IN IP4 192.168.7.174
> b=TIAS:64000
> a=rtcp:4001 IN IP4 192.168.7.174
> a=rtpmap:0 PCMU/8000
> a=rtpmap:96 telephone-event/8000
> a=fmtp:96 0-16
> *a=sendrecv *
> *m=video *0 RTP/AVP 31
> c=IN IP4 127.0.0.1
> *a=inactive *
>
>
> /
> /Kindly share your views to solve this issue.
> /
>
> *
> *
>
> *With Warm Regards,*
> Vikas Sharma
> VVDN Technologies Pvt Ltd
> *Cel*l*: *9971507491 | *Skype :* vsvikas2013
>
> On Tue, Apr 12, 2016 at 12:56 AM, Bill Gardner <billg at wavearts.com 
> <mailto:billg at wavearts.com>> wrote:
>
>     Hi Vikas,
>
>     Take a look at update_media_direction() in sdp_neg. It appears the
>     camera client would have to be set to sendonly, if it is sendrecv
>     it responds to a remote recvonly by setting media to inactive.
>
>     Regards,
>
>     Bill
>
>
>
>     On 4/11/2016 1:23 PM, Vikas Sharma wrote:
>>     Hi,
>>
>>     I have attached a snapshot here for your reference.I want to
>>     hardcode below media attribute parameters in SDP in the PJSIP code.
>>     *m=audio
>>     *
>>     *a=sendrecv
>>     *
>>     *m=video
>>     *
>>     *a=recvonly*
>>
>>     I have made the changes in the *endpoint.c* file for above media
>>     details and i am able to see these media attributes in the
>>     INVITE-200 OK transmission in wireshark.*(starting call from
>>     PJSIP endpoint to linphone endpoint)*
>>
>>     But after getting the 200 OK packet at the PJSIP endpoint ,the
>>     PJSIP code modifies the attribute for video to *inactive* and
>>     sends an UPDATE packet to other end and i am not able to see the
>>     video at PJSIP endpoint.Now the SDP is like below.
>>     *m=audio
>>     **a=sendrecv
>>     **m=video
>>     **a=inactive
>>
>>
>>     *
>>     Kindly let me know the reason of this and How can i disable this
>>     update in SDP attributes to see the video at my end.
>>     *
>>     *
>>     *Thanks
>>     *
>>
>>
>>     _______________________________________________
>>     Visit our blog:http://blog.pjsip.org
>>
>>     pjsip mailing list
>>     pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>
>>     http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>     _______________________________________________
>     Visit our blog: http://blog.pjsip.org
>
>     pjsip mailing list
>     pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>
>     http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20160412/f54e8f28/attachment-0002.html>


More information about the pjsip mailing list