Adding video to PJSIP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

???? I opened the video port in PJSIP.
i made a call from
A to B. SDP is negotiating fine, and call is established 200 ok with
session description. voice communication at both side.


This is A Side Invite packet

Session Description Protocol Version (v): 0
??????????? Owner/Creator, Session Id (o): - 3462892155 3462892155 IN IP4 192.168.7.49
??????????? Session Name (s): pjmedia
??????????? Connection Information (c): IN IP4 192.168.7.49
??????????? Time Description, active time (t): 0
 0
??????????? Session Attribute (a): X-nat:0
??????????? Media Description, name and address (m): audio 4002 RTP/AVP 103 102 104 117 3 0 8 9 101
??????????? Media Attribute (a): rtcp:4003 IN IP4 192.168.7.49
??????????? Media Attribute (a): rtpmap:103 speex/16000
??????????? Media Attribute (a): rtpmap:102 speex/8000
??????????? Media Attribute (a): rtpmap:104 speex/32000
??????????? Media Attribute (a): rtpmap:117 iLBC/8000
??????????? Media Attribute (a): fmtp:117
 mode=30
??????????? Media Attribute (a): rtpmap:3 GSM/8000
??????????? Media Attribute (a): rtpmap:0 PCMU/8000
??????????? Media Attribute (a): rtpmap:8 PCMA/8000
??????????? Media Attribute (a): rtpmap:9 G722/8000
??????????? Media Attribute (a): sendrecv
??????????? Media Attribute (a): rtpmap:101 telephone-event/8000
??????????? Media Attribute (a): fmtp:101 0-15
??????????? Media Description, name and address (m): video 4004 RTP/AVP
 34
??????????? Media Attribute (a): rtpmap:34 H263/90000
??????????? Media Attribute (a): sendrecv

This is A Side 200 ok with session Description

Session Description Protocol Version (v): 0
??????????? Owner/Creator, Session Id (o): Sippy 140117356 1 IN IP4 84.45.70.8
??????????? Session Name (s): pjmedia
??????????? Time Description, active time (t): 0 0
??????????? Session Attribute (a): X-nat:0
??????????? Media Description, name and address (e): audio 50488 RTP/AVP 103
 101
??????????? Connection Information (c): IN IP4 84.45.70.8
??????????? Media Attribute (a): rtcp:4001 IN IP4 192.168.7.214
??????????? Media Attribute (a): rtpmap:103 speex/16000
??????????? Media Attribute (a): sendrecv
??????????? Media Attribute (a): rtpmap:101 telephone-event/8000
??????????? Media Attribute (a): fmtp:101 0-15
??????????? Media Description, name and address (e): video 50490 RTP/AVP 34
??????????? Connection Information (c): IN IP4
 84.45.70.8
??????????? Media Attribute (a): rtpmap:34 H263/90000
??????????? Media Attribute (a): sendrecv
??????????? Media Attribute (a): direction:active

This is B Side Invite packet

Owner/Creator, Session Id (o): Sippy 146330028 0 IN IP4 84.45.70.8
??????????? Session Name (s): pjmedia
??????????? Time Description, active time (t): 0 0
??????????? Session Attribute (a): X-nat:0
??????????? Media Description, name and address (m): audio 50484 RTP/AVP 103 102
 104 117 3 0 8 9 101
??????????? Connection Information (c): IN IP4 84.45.70.8
??????????? Media Attribute (a): rtcp:4003 IN IP4 192.168.7.49
??????????? Media Attribute (a): rtpmap:103 speex/16000
??????????? Media Attribute (a): rtpmap:102 speex/8000
??????????? Media Attribute (a): rtpmap:104 speex/32000
??????????? Media Attribute (a): rtpmap:117 iLBC/8000
??????????? Media Attribute (a): fmtp:117 mode=30
??????????? Media Attribute (a): rtpmap:3
 GSM/8000
??????????? Media Attribute (a): rtpmap:0 PCMU/8000
??????????? Media Attribute (a): rtpmap:8 PCMA/8000
??????????? Media Attribute (a): rtpmap:9 G722/8000
??????????? Media Attribute (a): sendrecv
??????????? Media Attribute (a): rtpmap:101 telephone-event/8000
??????????? Media Attribute (a): fmtp:101 0-15
??????????? Media Description, name and address (m): video 50486 RTP/AVP 34
??????????? Connection Information (c): IN IP4
 84.45.70.8
??????????? Media Attribute (a): rtpmap:34 H263/90000
??????????? Media Attribute (a): sendrecv
??????????? Media Attribute (a): direction:active

This is B Side 200 ok session description packet

????? Session Description Protocol Version (v): 0
??????????? Owner/Creator, Session Id (o): - 3462891200 3462891201 IN IP4 192.168.7.214
??????????? Session Name (s): pjmedia
??????????? Connection Information (c): IN IP4 192.168.7.214
??????????? Time Description, active
 time (t): 0 0
??????????? Session Attribute (a): X-nat:0
??????????? Media Description, name and address (m): audio 4000 RTP/AVP 103 101
??????????? Media Attribute (a): rtcp:4001 IN IP4 192.168.7.214
??????????? Media Attribute (a): rtpmap:103 speex/16000
??????????? Media Attribute (a): sendrecv
??????????? Media Attribute (a): rtpmap:101 telephone-event/8000
??????????? Media Attribute (a): fmtp:101 0-15
??????????? Media Description, name and address (m): video 4002 RTP/AVP
 34
??????????? Media Attribute (a): rtpmap:34 H263/90000
??????????? Media Attribute (a): sendrecv

Iam running the JMF client at B Side

If i send the video packets from JMF client using Audio port(50484).

from B side its transmitting? and its receiving at A side.



i need to check video port is opened or not at server side.

So iam sending the video packets from JMF client? using video port (50486).
from B side its transmitting, but from A side its not receiving.

For opening video port i followed the code in endpoint.c

sdp->media_count = 2;
??? mVideo = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_media);
??? sdp->media[1] = mVideo;

??? /* Standard media info: */
??? pj_strdup(pool, &mVideo->desc.media, &STR_VIDEO);
??? mVideo->desc.port = pj_sockaddr_get_port(addr0)+2;
??? mVideo->desc.port_count = 1;
??? pj_strdup (pool, &mVideo->desc.transport, &STR_RTP_AVP);

??? /* Init media line and attribute list. */
??? mVideo->desc.fmt_count = 0;
??? mVideo->attr_count = 0;

??? {
??? ??? pjmedia_sdp_rtpmap rtpmap;
??? ??? pjmedia_sdp_attr *attr;
??? ??? pj_str_t *fmt;

??? ??? ??? 
???
 ??? fmt = &mVideo->desc.fmt[mVideo->desc.fmt_count++];
??? ??? fmt->ptr = (char*) pj_pool_alloc(pool, 8);
??? ??? fmt->slen = pj_utoa(34, fmt->ptr);

??? ??? rtpmap.pt = *fmt;
??? ??? rtpmap.enc_name = pj_str("H263");
??? ??? rtpmap.clock_rate = 90000;
??? ???
 rtpmap.param.slen = 0;
??? ??? 
??? ??? pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr);
??? ??? mVideo->attr[mVideo->attr_count++] = attr;
??? }

??? /* Add send receive attribute. */
??? attr = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_attr);
???
 attr->name = STR_SENDRECV;
??? mVideo->attr[mVideo->attr_count++] = attr;

please help me,and guide me where i made mistake.



regards
Rams


      Add whatever you love to the Yahoo! India homepage. Try now! http://in.yahoo.com/trynew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090929/3f4d1efd/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux