PJSUA – A command line SIP user agent

14
PJSUA – PJSUA – A command line SIP A command line SIP user agent user agent Advisor: Quincy Wu Reporter: Ni-Ya Li

description

PJSUA – A command line SIP user agent. Advisor: Quincy Wu Reporter: Ni-Ya Li. Outline. Getting Started PJSUA Option Application Menu (User Interface) Samples of PJSIP and PJMEDIA Demo Reference. Getting Started. Download Source Code - PowerPoint PPT Presentation

Transcript of PJSUA – A command line SIP user agent

Page 1: PJSUA –  A command line SIP user agent

PJSUA – PJSUA – A command line SIP user A command line SIP user agentagent

Advisor: Quincy WuReporter: Ni-Ya Li

Page 2: PJSUA –  A command line SIP user agent

OutlineOutlineGetting Started PJSUA

◦Option ◦Application Menu (User Interface)

Samples of PJSIP and PJMEDIADemoReference

2

Page 3: PJSUA –  A command line SIP user agent

Getting Started Getting Started

3

Download Source Code◦http://www.pjsip.org/release/1.5/

pjproject-1.5.tar.bz2 // newest version is 1.5

Install (Linux)◦# tar [-z] –vxf pjproject-1.5.tar.bz2◦# cd pjproject-1.5◦# ./configure◦# make ◦# make install (need superuser

privilege)

IPv6 support must be enabled during build process by declaring “ #define PJ_HAS_IPV6 1”in your config_site.h (/pjlib/include/pj/config_site.h)

Page 4: PJSUA –  A command line SIP user agent

PJSUA – RUN PJSUA – RUN # cd

/pjproject-1.5/pjsip-apps/bin/# ./pjsua [option] [SIP URL to

call]

4

Page 5: PJSUA –  A command line SIP user agent

PJSUA – OptionsPJSUA – OptionsGeneral Options:

◦--help, show the command line help◦--version, display version

Account Options:◦--id=URL, ex: --id sip:[email protected]◦--registrar=URL, ex: --registrar sip:test.com

Authentication Options:◦--username=STRING, ex: --username linear◦--password=STRING, ex: --password secret

5

Page 6: PJSUA –  A command line SIP user agent

PJSUA – Options (cont.)PJSUA – Options (cont.)Transport Options:

◦--ipv6, added in v1.2◦--local-port=PORT, default is 5060 for

UDP and TCPMedia Options:

◦--add-codec=NAME, pcma, pcmu, speex/8000, speex/16000, speex/32000, ilbc, gsm, l16/44100/2, etc.

◦ --play-file=WAVFILE, play the WAV file to incoming call

◦ --auto-loop, loop-back call to itself6

Page 7: PJSUA –  A command line SIP user agent

PJSUA – Options (cont.)PJSUA – Options (cont.)Media Transport Options

◦--rtp-port=N, default is 4000◦--use-ice, enable ICE

(Interactive Connectivity Establishment)

◦--use-turn, enable TURN(Traversal Using Relay NAT)

Buddy List◦--add-buddy=URL, like yellow pages

7

Page 8: PJSUA –  A command line SIP user agent

PJSUA – Options (cont.)PJSUA – Options (cont.)User Agent Options:

◦--auto-answer=CODE, answer incoming call with specific code, default is 100(Trying)

◦--max-calls=N, Maximum number of incoming calls, default is 4

8

Page 9: PJSUA –  A command line SIP user agent

Application Menu(User Application Menu(User Interface)Interface)

9

Page 10: PJSUA –  A command line SIP user agent

ArchitectureArchitecture

10

Page 11: PJSUA –  A command line SIP user agent

Samples of PJSIP and Samples of PJSIP and PJMEDIAPJMEDIAPJSIP

◦simpleua – simple UA application, be able receive a call

◦simple_pjsua – with registration, more advanced than simpleua

PJMEDIA ◦playfile – playing wav file to sound device◦ recfile – capture audio to wav file◦streamutil – stream media file to remote

peer using RTP◦siprtp – measure the network quality

11

Page 12: PJSUA –  A command line SIP user agent

Demo – IPv4Demo – IPv4

12

<SIP server> 10.10.59.91

UA1(PJSUA) UA2(X-Lite)

IPv4 SIP signaling IPv4 SIP signaling

IPv4 RTP transmitting

Page 13: PJSUA –  A command line SIP user agent

13

Demo – IPv6Demo – IPv6

13

<SIP server> 2001:e10:6840:21:21e:90ff:fe18:4cc

UA1(PJSUA) UA2(PJSUA)

IPv6 SIP signaling IPv6 SIP signaling

IPv6 RTP transmitting

Page 14: PJSUA –  A command line SIP user agent

ReferenceReferencehttp://www.pjsip.org/

- PJSIP Home Pagehttp://www.pjsip.org/pjsua.htm

- PJSUA Manual Pagehttp://www.pjsip.org/pjmedia/

docs/html/page_pjmedia_samples.htm- PJMEDIA and PJMEDIA-CODEC Examples

14