1 / 10

PJSUA – A Command Line SIP User Agent

PJSUA – A Command Line SIP User Agent. Speaker: Li-Wen Chen Advisor: Quincy Wu Date: 2010/01/07. Outline. Install PJSUA Sample: Remote Streaming Options Function Calls Demo Reference. Install PJSUA. Download Source Code

beulah
Download Presentation

PJSUA – A Command Line SIP User Agent

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

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

  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. 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. 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. 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. 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. Demo • Receiver:./streamutil • Sender:./streamutil --remote=10.10.59.91:4000 --play-file=t2.wav

  10. Reference • PJSIP • http://www.pjsip.org • Source code of streamutil.c • http://www.pjsip.org/pjmedia/docs/html/page_pjmedia_samples_streamutil_c.htm

More Related