iphone Live call Open source Framework Pjsip compile-pjsua run test

Source: Internet
Author: User
Tags domain name server

iphone real-time call in the open source framework, PJSIP is a relatively streamlined framework, more than Linphone good compile. The following steps are described in compiling the run.

First, compile the operating environment:

iphone:5.1.1, System: 10.7.3, xcode:4.5.2

Ii. Preparatory work:

1, from the PJSIP official website download tar source code, decompression to the local;

2, in the directory/pjsip/pjlib/include/pj/new config_site.h, paste the following code in:

#define Pj_config_iphone 1#include <pj/config_site_sample.h>

Third, compile Pjsip:

Run the following command in the terminal:

$ cd/path/to/your/pjsip/$./configure-iphone$ make dep && do clean && make

Iv. Compiling PJSUA Demo Project:

Open the item in the directory Pjproject/pjsip-apps/src/ipjsua, connect your iphone to compile and run it on the line.

Five, Test call:

1. VoIP Server:

You can use the Minisipserver free version, the installation is simple, after installation do not forget to create a new account (here are 100 and 101 for example).

2. VoIP Client:

Personal feeling x-lite is better, whether it's a Mac version or a Windows version. Successful login will show successful registration.

3. Login to account in the iphone's PJSIP Interface 101:

+ayour SIP URL: (Empty to cancel): Sip:[email Protected]url of the Registrar: (Empty to cancel): Sip:192.168.1.1auth Realm : (Empty to cancel): *auth Username: (Empty to cancel): 101Auth Password: (Empty to cancel): 123456

and 100 Call:

+benter Buddy ' s URI: (Empty to cancel): Sip:[email protected]mmake call:1

The phone operation can also be simplified:

Mmake Call:sip:[email protected]
You can also add related information to the configuration article:

Add content at (ALICE.CFG):

# This was a comment in the config file.--id sip:[email protected]--registrar sip:example.com--realm *--username Alice--pas Sword Secret

=================================

Introduction to other configuration file usage:

Usage: pjsua [options] [SIP URL Call] General options:--config-file=file read Configuration/parameters from file;--help display this help screen;--version display version information; logging options:--log-file= fname log file name (default is stderr),--log-level=n set log maximum level is N (0 (None) 6 (Tracking)) (default = 5);--app-log-level=n set log maximum level is stdout display (default = 4) --color use a variety of logs (default on Win32);--no-color disables colorful logs;--LIGHT-BG uses the color of black text on white (default is dark background); SIP account options:--use-ims Open the 3gpp/ims settings associated with this account,--use-srtp=n use SRTP? 0: Not used, 1: optional, 2: Forced use (default: 0);--srtp-secure=n SRTP need secure sip? 0: Not required, 1:tls mode, 2:sips (default: 1);--registrar=url set the Url;--id=url of the registration server set the local account Url--contact=url Optionally overwrite contact information--contact-params=s add S parameter to the specified contact URI--proxy=url optional Access Proxy URL--reg-timeout=sec registration interval (default)--realm =string Setting the domain--username=string setting the user name--password=string setting the password--publish sending Publish--use-100rel requires a reliable temporary response (100rel)-- Auto-update-nat=n N is 0 or either enable/disable SIP traversal behind symmetric nat (default 1)--next-cred add additional credentials SIP Account Control:--next-account add more account transfer options:--ipv6 Use ipv6--local-port=port port--ip-addr=ip IP address--bound-addr=ip bind port--no-tcp Disable TCP Transport--NO-UDP disable UDP transport--nameserver=ns Domain Name server--outbound=url set the URL of the global proxy server, you can specify multiple times--Stun-srv=name Set stun server host or domain name TLS option:--use-tls Enable TLS transport (default is not on)--tls-ca-file Specify TLS CA file (default = None)--tls-cert-file Specify the TLS certificate file (default = None)--tls-privkey-file Specify the TLS private key file (default = None)--tls-password Specify the TLS private key file password (default is None)--tls-verify-server Verify the server's certificate (default = no)--tls-verify-client verifies the client's certificate (default = not)--tls-neg-timeout Specifies a timeout (default value none)--tls-srv-name Specify the TLS server name as a multihomed server (optional) media options:--add-codec=name manually add codecs (all by default)--dis-codec=name Disable a codec--clock-rate=n Overlay meeting Bridge clock frequency--snd-clock-rate=n overlay audio device clock frequency--stereo audio device and conference bridge turn on stereo mode--null-audio use a null audio device--play-file=file Registering a WAV file in a meeting bridge--play-tone=format registers a tone with the conference bridge, the format is ' F1,f2,on,off ', where f1,f2 is frequency, on,off=on/off, and can be specified multiple times. --auto-play Auto Play file (call only)--auto-loop automatically loops incoming RTP to outgoing rtp--auto-conf automatically joins the meeting--rec-file=file audio file (the extension can make. wav or. MP3)--auto-rec automatic recording of calls--quality=n specified media quality (0-10, default 6)--ptime=msec Overwrite codec ptime in milliseconds--no-vad deactivate VAD scheme/ Silent Detector (VAD enabled by default)--ec-tail=msec set echo offset tail length (default.--ec-opt=opt) Select the Echo cancellation algorithm (0 = default, 1 = speex,2 = suppressed)--ilbc-mode=mode Set ILBC Speech codec mode (20 or 30, default is)--capture-dev=id audio capture Device ID (default =-1)--playback-dev=id audio playback Device ID (default =-1)--capture-lat=n Audio Capture Delay (MS, default = +)--playback-lat=n Audio playback delay (MS, default = 1)--snd-auto-close=n idle n seconds after automatically turning off the audio device specify n =-A (default) disable this feature. Specifies that instant off is not used when N = 0. --no-tones Disable hear sound--jb-max-size specify maximum jitter buffer (frame, default = 1) Media transfer option:--use-ice use ICE (default: Not used)--ice-no-host disable the Ice host candidate (default: NO)--ice-no-rtcp disable RTCP component (default: NO)--rtp-port=n RTP attempt port cardinality (default 4000)--rx-drop-pct=pct drop pct percent of Rx RTP (for PKT lost s IM, default:0)--tx-drop-pct=pct drop pct percent of TX RTP (for PKT lost Sim, default:0)--use-turn Enable turn relay Wit H ICE (default:no)--turn-srv turn server domain or host name--turn-tcp use TCP to connect to turn server (default: NO)--turn-user turn user name--turn-passwd Turn password Friend list (can be multiple):--add-buddy URL adds the specified URL to the user agent option in the Friends list:--auto-answer=code answer code (such as $) that automatically answers incoming calls--max-calls=n Maximum number of concurrent calls (default: 4, Max: 255)--thread-cnt=n Number of worker threads (default: 1)--duration=sec set maximum talk time (default: No Limit)--norefersub Disable event Subscription--use-compact-form minimum SIP message size--NO-FORCE-LR allows strict routing--accept-redirect=n to be used to specify how to handle call redirection responses (3XX) when transferring calls. 0: Reject, 1: auto (default), 2: Ask

Iphone Live call Open source Framework Pjsip compile-pjsua run test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.