Create conf port with incoming RTP stream

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

 



Thank you so much Nanang,

I tried it your way and everything looks clearer now... and it works
too... I am getting the RTP stream on port 4002. I had to disable RTCP
because my audio device only supports RTP.

So far I have just one problem left. I can't change the volume of the
conf port associated with that RTP stream. The stream does get muted
if i put the speaker level to 0 but that's about it. I can change the
volume from 1 to 10 with no noticeable difference at all to the actual
voice. The only thing that seems to change is I pick up much more
background noise. But the volume of the voice does not change.

Not sure where the problem lies but I'll keep working at it. I did
specify the codec and clock-rate to match the incoming RTP stream.

Anyway thank you again for your help, I really appreciate it.

Best Regards,

Hubert Langevin

On Tue, Apr 29, 2008 at 4:35 AM, Nanang Izzuddin <nanang at pjsip.org> wrote:
> Hi Hubert,
>
>  It seems you are using PJSUA and you need to receive an RTP stream on
>  port 4002, then pass the stream to conference bridge without call
>  signaling at the first place.
>
>  Since there is no call signaling, I think you better use your own
>  media transport and don't need to deal with pjmedia session. So the
>  steps should be around:
>
>  1. create a UDP pjmedia transport listening on port 4002.
>  2. create stream port with the above pjmedia transport.
>  3. add the stream port to conference bridge (use
>  pjsua_conf_add_port(), instead of pjmedia_conf_add_port(), since you
>  are using pjsua)
>  4. connect the stream port to other port(s), e.g: sound device, or
>  other stream ports.
>
>  You should only use the API and not modifying any parts of the
>  library, something rather strange/'illegal' in your code snippet
>  (well, actually not directly related to the problem):
>  - accessing member of pjmedia_session while this struct is opaque.
>  - calling create_conf_port(), not API.
>  - manage the pjsua's conference manually instead of using PJSUA API
>  pjsua_conf_add_port().
>
>
>  Regards,
>  nanang
>
>
>
>
>  On 27/04/2008, Hubert Langevin <hubertlangevin at gmail.com> wrote:
>  > Hi everyone,
>  >
>  >  I just had an enquiry. I have a separate audio device that transmits
>  >  an RTP stream (with no RTCP) to my PC running PJSIP on port 4002. I
>  >  would like to convert that incoming RTP stream into a conference port
>  >  in PJSIP so I can use it for conferencing purposes.
>  >
>  >  Here is a little bit of what i did so far:
>  >
>  >  =================================================
>  >
>  >  pj_str_t port_name = pj_str("Stream from Radio 1");
>  >  pj_str_t codec = pj_str("PCMU/8000/1");
>  >
>  >  pool = pjmedia_endpt_create_pool( pjsua_var.med_endpt, "session",
>  >  PJMEDIA_SESSION_SIZE, PJMEDIA_SESSION_INC);
>  >
>  >  session = PJ_POOL_ZALLOC_T(pool, pjmedia_session);
>  >  session->pool = pool;
>  >  session->endpt = pjsua_var.med_endpt;
>  >  session->stream_cnt = 1;
>  >  session->user_data = call;
>  >
>  >  session->stream_info[0].dir = PJMEDIA_DIR_ENCODING_DECODING;
>  >  session->stream_info[0].type = PJMEDIA_TYPE_AUDIO;
>  >  session->stream_info[0].fmt.clock_rate = 8000;
>  >  session->stream_info[0].fmt.type = PJMEDIA_TYPE_AUDIO;
>  >  session->stream_info[0].fmt.channel_cnt = 2;
>  >  session->stream_info[0].fmt.encoding_name = codec;
>  >  session->stream_info[0].rem_addr = addr_RTP;
>  >
>  >  pjmedia_stream_create(pjsua_var.med_endpt,
>  >  session->pool,&session->stream_info[0],
>  >  call->med_tp, session, &session->stream[0]);
>  >
>  >  pjmedia_stream_start(session->stream[0]);
>  >
>  >  pjmedia_session_get_port(session, 0, &media_port);
>  >
>  >  create_conf_port(pjsua_var.pool, pjsua_var.mconf,
>  >  media_port, &port_name, &conf_port);
>  >
>  >  pjsua_var.mconf->ports[1] = conf_port;
>  >  pjsua_var.mconf->port_cnt++;
>  >
>  >  =================================================
>  >
>  >  I do receive the stream on the right port, but I can't seem to get the
>  >  audio out of the conf port.
>  >
>  >  Any ideas of what i might be doing wrong?
>  >
>  >  Thank you so much in advance,
>  >
>  >  Best Regards,
>  >
>  >  Hubert Langevin.
>  >
>  >  _______________________________________________
>  >  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
>  >
>
>  _______________________________________________
>  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
>



[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