Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 PJSUA – A Command Line SIP User Agent Speaker: Li-Wen Chen Advisor: Quincy Wu Date: 2010/01/07.

Similar presentations


Presentation on theme: "1 PJSUA – A Command Line SIP User Agent Speaker: Li-Wen Chen Advisor: Quincy Wu Date: 2010/01/07."— Presentation transcript:

1 1 PJSUA – A Command Line SIP User Agent Speaker: Li-Wen Chen Advisor: Quincy Wu Date: 2010/01/07

2 2 Outline Install PJSUA Sample: Remote Streaming Options Function Calls Demo Reference

3 3 Install PJSUA Download Source Code  http://www.pjsip.org/release/1.5/pjproject- 1.5.tar.bz2 // newest version is 1.5 http://www.pjsip.org/release/1.5/pjproject- 1.5.tar.bz2 Install (Linux)  # tar –vxf pjproject-1.5.tar.bz2  # cd pjproject-1.5  #./configure  # make  # make install (need superuser privilege)

4 4 Sample: Remote Streaming This example mainly demonstrates how to stream media to remote peer using RTP. $cd pjproject-1.5/pjsip- apps/bin/samples/i686-pc-linux-gnu $./streamutil [option]

5 5 Options --remote=IP:PORT  Set the remote peer. If this option is set, the program will transmit RTP audio to the specified address. (default: recv only) --play-file=WAV  Send audio from the WAV file instead of from the sound device.

6 6 Function Calls pj_init ( void )  Initialize the PJ Library. pjmedia_stream_create ( pjmedia_endpt *endpt, pj_pool_t * pool, const pjmedia_stream_info * info, pjmedia_transport * tp, void * user_data, pjmedia_stream ** p_stream )  Create a media stream.

7 7 Function Calls (cont.) pjmedia_stream_get_port ( pjmedia_stream * stream, pjmedia_port ** p_port )  Get the media port interface of the stream. pjmedia_stream_start ( pjmedia_stream* stream )  Start the media stream.

8 8 Function Calls (cont.) pjmedia_stream_destroy ( pjmedia_stream* stream )  Destroy the media stream. pjmedia_port_destroy ( pjmedia_port * port )  Destroy port. pj_shutdown ( void )  Shutdown PJLIB.

9 9 Demo Receiver:./streamutil Sender:./streamutil --remote=10.10.59.91:4000 --play-file=t2.wav

10 10 Reference PJSIP  http://www.pjsip.org http://www.pjsip.org Source code of streamutil.c  http://www.pjsip.org/pjmedia/docs/html/page_pj media_samples_streamutil_c.htm http://www.pjsip.org/pjmedia/docs/html/page_pj media_samples_streamutil_c.htm


Download ppt "1 PJSUA – A Command Line SIP User Agent Speaker: Li-Wen Chen Advisor: Quincy Wu Date: 2010/01/07."

Similar presentations


Ads by Google