Skip to content

Commit

Permalink
Update pjsip to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
chebur committed Aug 18, 2016
1 parent af16988 commit 5398753
Show file tree
Hide file tree
Showing 71 changed files with 4,591 additions and 1,753 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,15 @@ typedef struct pj_cli_telnet_cfg

/**
* Specify a password to be asked to the end user to access the
* application.
* application. Currently this is not implemented yet.
*
* Default: empty (no password)
*/
pj_str_t passwd;

/**
* Specify text message to be displayed to newly connected users.
* Currently this is not implemented yet.
*
* Default: empty
*/
Expand Down
18 changes: 17 additions & 1 deletion build/pjproject/src/pjlib-util/include/pjlib-util/dns.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: dns.h 3553 2011-05-05 06:14:19Z nanang $ */
/* $Id: dns.h 5350 2016-06-21 06:55:10Z riza $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <[email protected]>
Expand Down Expand Up @@ -426,6 +426,22 @@ PJ_DECL(void) pj_dns_init_a_rr(pj_dns_parsed_rr *rec,
unsigned ttl,
const pj_in_addr *ip_addr);

/**
* Initialize DNS record as DNS AAAA record.
*
* @param rec The DNS resource record to be initialized as DNS
* AAAA record.
* @param res_name Resource name.
* @param dnsclass DNS class.
* @param ttl Resource TTL value.
* @param ip_addr Host address.
*/
PJ_DECL(void) pj_dns_init_aaaa_rr(pj_dns_parsed_rr *rec,
const pj_str_t *res_name,
unsigned dnsclass,
unsigned ttl,
const pj_in6_addr *ip_addr);

/**
* Dump DNS packet to standard log.
*
Expand Down
58 changes: 57 additions & 1 deletion build/pjproject/src/pjlib-util/include/pjlib-util/resolver.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: resolver.h 3553 2011-05-05 06:14:19Z nanang $ */
/* $Id: resolver.h 5349 2016-06-20 10:10:42Z nanang $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <[email protected]>
Expand Down Expand Up @@ -225,6 +225,47 @@ typedef struct pj_dns_a_record
} pj_dns_a_record;


/**
* This structure represents DNS address record, i.e: DNS A and DNS AAAA
* records, as the result of parsing DNS response packet using
* #pj_dns_parse_addr_response().
*/
typedef struct pj_dns_addr_record
{
/** The target name being queried. */
pj_str_t name;

/** If target name corresponds to a CNAME entry, the alias contains
* the value of the CNAME entry, otherwise it will be empty.
*/
pj_str_t alias;

/** Number of IP addresses. */
unsigned addr_count;

/** IP addresses of the host found in the response */
struct {

/** IP address family */
int af;

/** IP address */
union {
/** IPv4 address */
pj_in_addr v4;

/** IPv6 address */
pj_in6_addr v6;
} ip;

} addr[PJ_DNS_MAX_IP_IN_A_REC];

/** Internal buffer for hostname and alias. */
char buf_[128];

} pj_dns_addr_record;


/**
* Set default values to the DNS settings.
*
Expand Down Expand Up @@ -407,6 +448,21 @@ PJ_DECL(pj_status_t) pj_dns_parse_a_response(const pj_dns_parsed_packet *pkt,
pj_dns_a_record *rec);


/**
* A utility function to parse a DNS response containing AAAA records into
* DNS AAAA record.
*
* @param pkt The DNS response packet.
* @param rec The structure to be initialized with the parsed
* DNS AAAA record from the packet.
*
* @return PJ_SUCCESS if response can be parsed successfully.
*/
PJ_DECL(pj_status_t) pj_dns_parse_addr_response(
const pj_dns_parsed_packet *pkt,
pj_dns_addr_record *rec);


/**
* Put the specified DNS packet into DNS cache. This function is mainly used
* for testing the resolver, however it can also be used to inject entries
Expand Down
29 changes: 18 additions & 11 deletions build/pjproject/src/pjlib-util/include/pjlib-util/srv_resolver.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: srv_resolver.h 3553 2011-05-05 06:14:19Z nanang $ */
/* $Id: srv_resolver.h 5349 2016-06-20 10:10:42Z nanang $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <[email protected]>
Expand Down Expand Up @@ -84,27 +84,34 @@ typedef enum pj_dns_srv_option
* Specify if the resolver should fallback with DNS A
* resolution when the SRV resolution fails. This option may
* be specified together with PJ_DNS_SRV_FALLBACK_AAAA to
* make the resolver fallback to AAAA if SRV resolution fails,
* and then to DNS A resolution if the AAAA resolution fails.
* make the resolver fallback to both DNS A and DNS AAAA
* resolutions if SRV resolution fails.
*/
PJ_DNS_SRV_FALLBACK_A = 1,

/**
* Specify if the resolver should fallback with DNS AAAA
* resolution when the SRV resolution fails. This option may
* be specified together with PJ_DNS_SRV_FALLBACK_A to
* make the resolver fallback to AAAA if SRV resolution fails,
* and then to DNS A resolution if the AAAA resolution fails.
* be specified together with PJ_DNS_SRV_FALLBACK_AAAA to
* make the resolver fallback to both DNS A and DNS AAAA
* resolutions if SRV resolution fails.
*/
PJ_DNS_SRV_FALLBACK_AAAA = 2,

/**
* Specify if the resolver should try to resolve with DNS AAAA
* resolution first of each targets in the DNS SRV record. If
* this option is not specified, the SRV resolver will query
* the DNS A record for the target instead.
* resolution of each targets in the DNS SRV record. If this
* option is not specified, the SRV resolver will query the
* DNS A record for the target instead.
*/
PJ_DNS_SRV_RESOLVE_AAAA = 4,

/**
* Specify if the resolver should try to resolve with DNS AAAA
* resolution only (i.e: without DNS A resolution) for each targets
* in the DNS SRV record.
*/
PJ_DNS_SRV_RESOLVE_AAAA = 4
PJ_DNS_SRV_RESOLVE_AAAA_ONLY = 8

} pj_dns_srv_option;

Expand All @@ -131,7 +138,7 @@ typedef struct pj_dns_srv_record
pj_uint16_t port;

/** The host address. */
pj_dns_a_record server;
pj_dns_addr_record server;

} entry[PJ_DNS_SRV_MAX_ADDR];

Expand Down
2 changes: 1 addition & 1 deletion build/pjproject/src/pjlib/include/pj/compat/m_auto.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/

/* Machine name, filled in by autoconf script */
#define PJ_M_NAME "arm"
#define PJ_M_NAME "x86_64"

/* Endianness. It's reported on pjsip list on 09/02/13 that autoconf
* endianness detection failed for universal build, so special case
Expand Down
9 changes: 6 additions & 3 deletions build/pjproject/src/pjlib/include/pj/compat/os_auto.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* pjlib/include/pj/compat/os_auto.h. Generated from os_auto.h.in by configure. */
/* $Id: os_auto.h.in 3841 2011-10-24 09:28:13Z ming $ */
/* $Id: os_auto.h.in 5247 2016-02-25 04:54:17Z nanang $ */
/*
* Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <[email protected]>
Expand Down Expand Up @@ -28,7 +28,7 @@
*/

/* Canonical OS name */
#define PJ_OS_NAME "arm-apple-darwin9"
#define PJ_OS_NAME "x86_64-apple-darwin_ios"

/* Legacy macros */
/* #undef PJ_WIN32 */
Expand Down Expand Up @@ -129,6 +129,9 @@
*/
#define PJ_SELECT_NEEDS_NFDS 0

/* Was Linux epoll support enabled */
/* #undef PJ_HAS_LINUX_EPOLL */

/* Is errno a good way to retrieve OS errors?
*/
#define PJ_HAS_ERRNO_VAR 1
Expand Down Expand Up @@ -167,7 +170,7 @@
#define PJ_NATIVE_STRING_IS_UNICODE 0

/* Pool alignment in bytes */
#define PJ_POOL_ALIGNMENT 4
#define PJ_POOL_ALIGNMENT 8

/* The type of atomic variable value: */
#define PJ_ATOMIC_VALUE_TYPE long
Expand Down
5 changes: 4 additions & 1 deletion build/pjproject/src/pjlib/include/pj/compat/os_auto.h.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: os_auto.h.in 3841 2011-10-24 09:28:13Z ming $ */
/* $Id: os_auto.h.in 5247 2016-02-25 04:54:17Z nanang $ */
/*
* Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <[email protected]>
Expand Down Expand Up @@ -128,6 +128,9 @@
*/
#undef PJ_SELECT_NEEDS_NFDS

/* Was Linux epoll support enabled */
#undef PJ_HAS_LINUX_EPOLL

/* Is errno a good way to retrieve OS errors?
*/
#undef PJ_HAS_ERRNO_VAR
Expand Down
4 changes: 2 additions & 2 deletions build/pjproject/src/pjlib/include/pj/compat/socket.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: socket.h 4537 2013-06-19 06:47:43Z riza $ */
/* $Id: socket.h 5312 2016-05-20 07:19:26Z riza $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <[email protected]>
Expand Down Expand Up @@ -64,7 +64,7 @@
# define s_addr S_un.S_addr
# endif

# if !defined(IPPROTO_IPV6)
# if !defined(IPPROTO_IPV6) && (_WIN32_WINNT == 0x0500)
/* Need to download and install IPv6Kit for this platform.
* Please see the comments above about Visual Studio 6.
*/
Expand Down
37 changes: 33 additions & 4 deletions build/pjproject/src/pjlib/include/pj/config.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: config.h 4913 2014-09-03 08:39:58Z nanang $ */
/* $Id: config.h 5394 2016-07-21 03:28:11Z ming $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <[email protected]>
Expand Down Expand Up @@ -161,7 +161,8 @@


#elif defined (PJ_M_X86_64) || defined(__amd64__) || defined(__amd64) || \
defined(__x86_64__) || defined(__x86_64)
defined(__x86_64__) || defined(__x86_64) || \
defined(_M_X64) || defined(_M_AMD64)
/*
* AMD 64bit processor, little endian
*/
Expand Down Expand Up @@ -674,12 +675,18 @@
#else
/* When FD_SETSIZE is not changeable, check if PJ_IOQUEUE_MAX_HANDLES
* is lower than FD_SETSIZE value.
*
* Update: Not all ioqueue backends require this (such as epoll), so
* this check will be done on the ioqueue implementation itself, such as
* ioqueue select.
*/
/*
# ifdef FD_SETSIZE
# if PJ_IOQUEUE_MAX_HANDLES > FD_SETSIZE
# error "PJ_IOQUEUE_MAX_HANDLES is greater than FD_SETSIZE"
# endif
# endif
*/
#endif


Expand Down Expand Up @@ -858,6 +865,28 @@
#endif


/**
* Define the maximum number of ciphers supported by the secure socket.
*
* Default: 256
*/
#ifndef PJ_SSL_SOCK_MAX_CIPHERS
# define PJ_SSL_SOCK_MAX_CIPHERS 256
#endif


/**
* Specify what should be set as the available list of SSL_CIPHERs. For
* example, set this as "DEFAULT" to use the default cipher list (Note:
* PJSIP release 2.4 and before used this "DEFAULT" setting).
*
* Default: "HIGH:-COMPLEMENTOFDEFAULT"
*/
#ifndef PJ_SSL_SOCK_OSSL_CIPHERS
# define PJ_SSL_SOCK_OSSL_CIPHERS "HIGH:-COMPLEMENTOFDEFAULT"
#endif


/**
* Disable WSAECONNRESET error for UDP sockets on Win32 platforms. See
* https://trac.pjsip.org/repos/ticket/1197.
Expand Down Expand Up @@ -1188,10 +1217,10 @@ PJ_BEGIN_DECL
#define PJ_VERSION_NUM_MAJOR 2

/** PJLIB version minor number. */
#define PJ_VERSION_NUM_MINOR 3
#define PJ_VERSION_NUM_MINOR 5

/** PJLIB version revision number. */
#define PJ_VERSION_NUM_REV 0
#define PJ_VERSION_NUM_REV 5

/**
* Extra suffix for the version (e.g. "-trunk"), or empty for
Expand Down
1 change: 1 addition & 0 deletions build/pjproject/src/pjlib/include/pj/config_site.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#define PJ_CONFIG_IPHONE 1
#define PJ_HAS_IPV6 1
#define PJMEDIA_HAS_OPENH264_CODEC 1
#define PJMEDIA_HAS_VIDEO 1
#define PJMEDIA_VIDEO_DEV_HAS_OPENGL 1
Expand Down
9 changes: 7 additions & 2 deletions build/pjproject/src/pjlib/include/pj/config_site_sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@

/* Disable some codecs */
#define PJMEDIA_HAS_L16_CODEC 0
#define PJMEDIA_HAS_G722_CODEC 0
//#define PJMEDIA_HAS_G722_CODEC 0

/* Use the built-in CoreAudio's iLBC codec (yay!) */
#define PJMEDIA_HAS_ILBC_CODEC 1
Expand Down Expand Up @@ -387,10 +387,13 @@

/* Disable some codecs */
#define PJMEDIA_HAS_L16_CODEC 0
#define PJMEDIA_HAS_G722_CODEC 0
//#define PJMEDIA_HAS_G722_CODEC 0

/* Fine tune Speex's default settings for best performance/quality */
#define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY 5

/* Increase number of video device's supported formats */
#define PJMEDIA_VID_DEV_INFO_FMT_CNT 128

/*
* PJSIP settings.
Expand Down Expand Up @@ -433,6 +436,8 @@
#define PJMEDIA_HAS_SPEEX_AEC 0
#undef PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO
#define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0
#undef PJMEDIA_AUDIO_DEV_HAS_ALSA
#define PJMEDIA_AUDIO_DEV_HAS_ALSA 0
#endif


Expand Down
Loading

0 comments on commit 5398753

Please sign in to comment.