- added new PJSUA API: pjsua_verify_url() which can be used for tel: URI
- modified and tested according to spec
- added new PJSIP error code, PJSIP_ENOROUTESET, to indicate that route set is needed to send to tel: URI
- added couple of unit tests (we can't cover the whole tel: URI scenario yet)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3323 74dad513-b988-da41-8d7b-12977e46ad98
- Added new pjsua registration status callback on_reg_state2(), it includes the whole info from the lower layer registration callback pjsip_regc_cb().
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3322 74dad513-b988-da41-8d7b-12977e46ad98
- Added run-time configuration for activating/deactivating stream keep-alive (non-codec-VAD mechanism), also added this config to account settings.
- Fixed bug wrong session info pointer "si" in pjsua_media_channel_update() when call audio index is not zero.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3313 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed the printing part of Via "branch" parameter and To/From "tag" parameter, since these parameters are important for transaction/dialog identification
- Note that if the escaping sequence describes a character that otherwise is a valid token, that token would still be printed unescaped, hence the problem would still persist. But sender really shouldn't send this kind of escaped sequence as it really is asking for trouble.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3301 74dad513-b988-da41-8d7b-12977e46ad98
- incoming multipart message will be handled automatically
- for testing, enable HAVE_MULTIPART_TEST in pjsua_app.c
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3243 74dad513-b988-da41-8d7b-12977e46ad98
- Added (back) raw jitter statistics into RTCP statistics, with the new name "rx_raw_jitter".
- Added IPDV statistics into RTCP statistics.
- Added new compile-time settings to enable/disable raw jitter and IPDV statistics.
- Updated call dump in pjsua-lib.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3239 74dad513-b988-da41-8d7b-12977e46ad98
- now the stream will be destroyed but the media transport will be kept alive during doublehold scenario
- small fix in SRTP to also negotiate crypto even when the media is marked as inactive, otherwise it's possible that an "optional" endpoint would create RTP/AVP offer and send it to "mandatory" endpoint, which would be rejected and cause the media port to be set to zero
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3219 74dad513-b988-da41-8d7b-12977e46ad98
- fixed unterminated negotiation if our media transport rejects incoming offer (e.g. due to mismatch SRTP transport) with 488.
- to fix the above, modified the SDP negotiator (sdp_neg.[hc])'s pjmedia_sdp_neg_cancel_offer() to also be able to cancel in remote offer state
- also fixed the bug introduced previous Session Timer fix (Re: #1047), which cause SDP negotiator's state to be cleared after failed UAC UPDATE transaction is terminated, which means UPDATE can only be sent 5 seconds after the last UPDATE if the last UPDATE failed.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3217 74dad513-b988-da41-8d7b-12977e46ad98
- added new account config setting: reg_use_proxy. This contains bitmask values to indicate whether outbound proxies and account proxies are to be added in the REGISTER request. Default value is to add both.
- added new pjsua cmdline option to control this: --reg-use-proxy
- miscellaneous minor fixes in other pjsua cmdline arguments
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3216 74dad513-b988-da41-8d7b-12977e46ad98
- Session timer fixes:
- will look at remote capability in Allow header
- if UPDATE is supported, will send UPDATE without SDP first.
If this fails, will send UPDATE with SDP
- otherwise will send re-INVITE
- PJSUA-LIB will look at dialog's remote capability to determine
whether re-INVITE or UPDATE should be sent to change default
addresses after ICE negotiation.
- pjsip_inv_update() now allows NULL offer, in which case the
UPDATE will be sent without SDP.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3215 74dad513-b988-da41-8d7b-12977e46ad98
- added new PJ_ICE_STRANS_OP_KEEP_ALIVE operation
- also added new on_ice_transport_error() pjsua callback to allow application to react to the failure.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3212 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed invite module to reset SDP negotiator state after incomplete SDP offer-answer in re-INVITE/UPDATE.
- Added some SIPp test scenarios.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3208 74dad513-b988-da41-8d7b-12977e46ad98
- Added lock codec feature to make sure that only one codec is active, by updating media session using UPDATE (if remote supports it) or re-INVITE.
- Added few SIPp test scenarios.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3206 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed compile error (on Symbian) incompatible types between int and pjsip_dialog_cap_status.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3200 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed process_answer() of SDP negotiation, when no common format in a media, instead of returning error, it should just deactivate the media (offer & answer) and continue negotiating next media.
- Generalized the way of deactivating media: set port to 0 and remove all attributes.
- Added new API pjmedia_sdp_media_clone_deactivate() to clone media and deactivate the newly cloned media.
- Updated PJMEDIA SDP negotiation test.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3198 74dad513-b988-da41-8d7b-12977e46ad98
- Added a feature in dialog to store and retrieve remote capabilities dug from the remote messages.
- Added few APIs in dialog to query and update remote capabilities, also added an API in pjsua_call to query whether a capability is supported by remote.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3196 74dad513-b988-da41-8d7b-12977e46ad98
- Moved auto reregistration scheduling to be before the registration callback.
- Updated validations in auto_rereg_timer_cb() & schedule_reregistration().
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3185 74dad513-b988-da41-8d7b-12977e46ad98
- Added new approach of SRTP optional mode in pjsua-lib by duplicating SDP media line for secured and unsecured version of media transport.
- Integrated this feature into pjsua app, it is activated via --use-srtp=3 param.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3172 74dad513-b988-da41-8d7b-12977e46ad98
- removed the assertion (allow responding to empty realm)
- slight modification in Authenticate/WWW-Authenticate headers to allow printing challenge with empty realm, otherwise a malformed header will be printed if empty realm is given
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3149 74dad513-b988-da41-8d7b-12977e46ad98
- link error undefined reference to `.L23' in function pjsip_cred_info_cmp() (thanks Ken Fish for the report).
- compile error unable to convert pj_uint32_t to pjsip_transport_state.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3148 74dad513-b988-da41-8d7b-12977e46ad98
- Moved the code of disconnecting calls (after first re-reg attempt failure) to schedule_reregistration(), so it will be executed earlier (right after the failure of re-reg attempt).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3139 74dad513-b988-da41-8d7b-12977e46ad98
- Added functions to set/unset transport state notification callback on specific transport.
- Updated transaction to immediately terminate the transactions when their transport gets disconnected.
- Minor update: renamed function pjsip_tpmgr_set/get_status_cb() to pjsip_tpmgr_set/get_state_cb().
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3138 74dad513-b988-da41-8d7b-12977e46ad98
- Added initial version of automatic re-registration after registration failure and automatic call disconnection after re-registration attempt fails.
- Published auto re-registration setting to pjsua app.
- Updated pjsip_regc_send() to retrieve the transport earlier (was only in tsx_callback()).
- Fixed TCP and TLS transport to prevent transport deletion in transport disconnection callback.
- Fixed wrong keep-alive settings used by TLS transport (was using TCP keep-alive settings).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3128 74dad513-b988-da41-8d7b-12977e46ad98
- PJSUA-LIB transport callback, if installed, will call the previously registered callback, to allow multiple transport callbacks to be installed
- there seem to be a bug with the use of "pjsip_tp_state_callback" everywhere (the "pjsip_tp_state_callback" type is pointer, but most variables of this type are declared to pointer too)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3119 74dad513-b988-da41-8d7b-12977e46ad98
- Updated transport state notification callback to return void.
- Updated transport state enum to only contain connected and disconnected, no more bitmask value.
- Added direction field to SIP transport.
- Removed remote hostname hash from transport key.
- Updated cert info dump to return -1 when buffer is insufficient.
- Added new error code PJSIP_TLS_ECERTVERIF.
- Updated get_cert_name() in ssl_sock_symbian.c to use heap buffer instead of stack.
- Minors, e.g: added prefix PJ in cipher types, docs.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3110 74dad513-b988-da41-8d7b-12977e46ad98
- Initial version of server domain name verification:
- Updated SSL certificate info, especially identities info
- Updated verification mechanism as in the specifications in ticket desc.
- Added server domain name info in pjsip_tx_data.
- Added alternative API for acquiring transport and creating transport of transport factory to include pjsip_tx_data param.
- Server identity match criteria:
- full host name match
- wild card not accepted
- if identity is URI, it must be SIP/SIPS URI
- Initial version of transport state notifications:
- Added new API to set transport state callback in PJSIP and PJSUA.
- Defined states: connected/disconnected, accepted/rejected, verification errors.
- Minors:
- Updated SSL socket test: dump verification result, test of requiring client cert, and few minors.
- Updated test cert to include subjectAltName extensions.
- Added SSL certificate dump function.
- Updated max number of socket async operations in Symbian sample apps (RSocketServ::Connect()) to 32 (was default 8).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3106 74dad513-b988-da41-8d7b-12977e46ad98
- implemented in sip_reg.c instead of in PJSUA-LIB, so that the functionality can be reused by non-PJSUA-LIB applications
- also added several Python test scripts
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3105 74dad513-b988-da41-8d7b-12977e46ad98
- in this implementation, when pjsua_acc_set_registration(FALSE) is called, the un-REGISTER request will be sent immediately after un-PUBLISH, unlike the process during shutdown where the un-REGISTER request will be sent only after un-PUBLISH transaction is complete
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3096 74dad513-b988-da41-8d7b-12977e46ad98
- fixed the problem that caused ACK not to be sent. This happened when TCP switching is used, and the TCP fails to send the request.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3090 74dad513-b988-da41-8d7b-12977e46ad98
- fix for r3071: added protection for case when TSX_HAS_PENDING_TRANSPORT flag is set to the transaction but pending_tx is NULL, causing crash
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3084 74dad513-b988-da41-8d7b-12977e46ad98
- Added new API pjmedia_codec_mgr_set_default_param() to set/update default codec parameter and implemented pjsua_codec_set_param() based on it.
- Added mutex in codec manager to protect states manipulations.
- Modified API pjmedia_codec_mgr_init() to add pool factory param.
- Added new API pjmedia_codec_mgr_destroy().
- Updated passthrough codec AMR to regard peer's mode-set setting.
- Fixed VAS audio device to apply AMR encoding bitrate setting.
- Fixed IPP codec codec_open() to update AMR bitrate info (for stream) when AMR encoding bitrate is not using the default, e.g: requested by peer via format param 'mode-set' in SDP.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3074 74dad513-b988-da41-8d7b-12977e46ad98
- adhere to --prefix
- header and lib files installation
- pkgconfig creation
- also added version.mak to fill in with the correct version
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3063 74dad513-b988-da41-8d7b-12977e46ad98
- fixed bug with IPv6
- also fixed bug with not fully initializing socket address, causing assertion on pjsip-test and also potentially will cause error on MacOS X due to sin_zero_len not being zeroed
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3053 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed bug in pjsip_tls_transport_start(): specified ca_list_file must be applied even when cert_file is not set.
- Fixed bug in lis_create_transport(): new transport should inherit cert settings (from listener).
- Fixed pjsua app, missing TLS transport setting 'require_client_cert' for '--tls-verify-client' option.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3039 74dad513-b988-da41-8d7b-12977e46ad98
- added missing transport selection information in pjsua_acc_create_request(), when the account has been locked to use a specific transport/listener.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3032 74dad513-b988-da41-8d7b-12977e46ad98
- the timer associated with a buddy is not removed when buddy is deleted, causing crash later on in timer heap. Fixed.
- when fails to send the initial SUBSCRIBE request, the dialog associated with buddy subscription will have been destroyed in the callback, causing any subsequent "pjsip_dlg_dec_lock(buddy->dlg)" call to crash. Fixed by protecting the call with "if (buddy->dlg)".
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3031 74dad513-b988-da41-8d7b-12977e46ad98
- undo r3019 which put unsolicited MWI support in pjsua app only
- put the unsolicited MWI support in PJSUA-LIB instead
- unsolicited MWI is by default enabled
- on_mwi_info() callback will be called just as the solicited MWI version
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3021 74dad513-b988-da41-8d7b-12977e46ad98
- Fixed compile error of incompatible param type (or bad type conversion) on Symbian 5th ed (and perhaps also on some GCC versions).
- Fixed on_connect_complete() to reset SSL sock state before callback when connection fails (OpenSSL impl).
- Fixed saving remote address before start connecting, so it won't miss remote address info when socket connection establishes immediately (OpenSSL impl).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3020 74dad513-b988-da41-8d7b-12977e46ad98
- handle the case when context doesn't have rdata (such as when parsing individual header or in pjsip-test), which crashed the app
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3003 74dad513-b988-da41-8d7b-12977e46ad98
- don't switch if only port number is different and the Via received address is private
- always update the transport (i.e. Via) address as well
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3001 74dad513-b988-da41-8d7b-12977e46ad98
- Added features in secure socket: handshake timeout timer, certificate info, renegotiation API.
- Added unit test for secure socket, along with testing purpose certificate & private key.
- Updated build configs for secure socket.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2970 74dad513-b988-da41-8d7b-12977e46ad98