summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_media.c
AgeCommit message (Collapse)Author
2013-03-07Fixed #1635: Fixed the backport of ticket #1568 (smarter media update) to ↵Liong Sauw Ming
version 1.x git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4428 74dad513-b988-da41-8d7b-12977e46ad98
2013-03-07Misc (re #1634): fixed compile errors/warnings on MSVCRiza Sulistyo
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4426 74dad513-b988-da41-8d7b-12977e46ad98
2013-02-13Re #1568: (PJSIP 1.x) No need to restart media when remote RTP address ↵Nanang Izzuddin
changed but ICE transport is running. git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4346 74dad513-b988-da41-8d7b-12977e46ad98
2013-01-30Re #1568: (only for 1.x) media transport should be (re)started even when ↵Nanang Izzuddin
media is unchanged. git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4338 74dad513-b988-da41-8d7b-12977e46ad98
2013-01-29Re #1568: (PJSIP 1.x) Apply pjsua_media_config before detecting media changeLiong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4337 74dad513-b988-da41-8d7b-12977e46ad98
2013-01-25Re #1568: Fixed is_media_changed() detection when pjsua_media_cfg.no_vad is ↵Liong Sauw Ming
set to PJ_TRUE and fixed the string duplication of encoding name Thanks to Hideo and Fredrik for the reports. git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4334 74dad513-b988-da41-8d7b-12977e46ad98
2013-01-23Re #1568: backported to 1.x branch.Nanang Izzuddin
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4329 74dad513-b988-da41-8d7b-12977e46ad98
2012-09-18Fixed #1584: Custom media transport creation callback is not always called Liong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4261 74dad513-b988-da41-8d7b-12977e46ad98
2012-04-21Fixed #1492: The echo options field in the media config and pjsua_set_ec() ↵Benny Prijono
argument are ignored git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4065 74dad513-b988-da41-8d7b-12977e46ad98
2012-03-22Close #1466 (using PJLIB outside PJSUA-LIB context):Nanang Izzuddin
- static reference counter for PJLIB init/shutdown. - implemented atexit() in PJMEDIA and PJSIP level: pjmedia_endpt_atexit() & pjsip_endpt_atexit(). - updated pjmedia/transport_srtp.c, pjsip/sip_timer.c, and pjsip/sip_replaces.c to use the new atexit() functions. - API change: pjmedia_srtp_init_lib() now requires 'pjmedia_endpt' param. git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3986 74dad513-b988-da41-8d7b-12977e46ad98
2012-03-06Fix #1457: removed check for remote SDP media count before calling ↵Nanang Izzuddin
find_audio_index() in pjsua_media_channel_create_sdp(), so find_audio_index() will also verify the media count in the remote SDP. git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3962 74dad513-b988-da41-8d7b-12977e46ad98
2011-12-19Fixed #1426: Race condition in auto-closing and/or auto-opening of the sound ↵Benny Prijono
device git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3913 74dad513-b988-da41-8d7b-12977e46ad98
2011-10-19Fixed #1216: New pjsua_destroy2() API to allow shutting down the library ↵Benny Prijono
without sending any outgoing messages git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3829 74dad513-b988-da41-8d7b-12977e46ad98
2011-10-14Committing re #1388: Support for OpenCORE AMR-NB codec (thank you Dan ↵Benny Prijono
Arrhenius for the contribution!) git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3816 74dad513-b988-da41-8d7b-12977e46ad98
2011-06-16Closed #1173: PJSUA callback to allow creation of custom media transports by ↵Liong Sauw Ming
application git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3585 74dad513-b988-da41-8d7b-12977e46ad98
2011-05-19Fixed #1268: Option for automatic/manual sending of RTCP SDES/BYE for the ↵Liong Sauw Ming
stream. git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3571 74dad513-b988-da41-8d7b-12977e46ad98
2011-05-05Re #1250: Updated the year in all copyright texts with 2011!Nanang Izzuddin
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3553 74dad513-b988-da41-8d7b-12977e46ad98
2011-03-11Fixed #1204: Support for refreshing audio device list.Liong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3438 74dad513-b988-da41-8d7b-12977e46ad98
2010-12-02Fixed #1170 (Assertion when receiving updated SDP offer with all media lines ↵Benny Prijono
removed): - pjsua_media.c checks if audio media is present in the offer; if not, do not set any answer - sip_inv.c checks if app has supplied an answer after on_rx_offer() callback is called, and returnd 488 (Not Acceptable) if not (previously, it will return 200/OK without SDP!) - added a SIPp scenario file to reproduce this git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3383 74dad513-b988-da41-8d7b-12977e46ad98
2010-12-01Fix #1165:Nanang Izzuddin
- Fixed pjsua_media_channel_create_sdp() to re-calculate audio index of the remote offer, instead of using existing audio index calculated by pjsua_media_channel_init(), as for subsequent SDP offer/answer, pjsua_media_channel_init() may not be called. - Fixed SRTP transport to be able to switch SRTP status from active to inactive/by-passed and vice versa. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3376 74dad513-b988-da41-8d7b-12977e46ad98
2010-10-05Fix #1143:Nanang Izzuddin
- Fixed no audio bug when pjsua with SRTP optional-with-duplicated-offer calls pjsua with SRTP disabled, by updating active media index after SDP negotiation done. - Fixed bug in generating SDP, pjsua_media_channel_create_sdp(), by making sure all media in the SDP candidate are aligned with current active SDP before calling pjmedia_transport_encode_sdp(). - Fixed bug in modifying SDP for call hold, the media index to be modified was hardcoded to 0, should be active media index. - Added python tests for calls with SRTP optional-with-duplicated-offer. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3334 74dad513-b988-da41-8d7b-12977e46ad98
2010-09-20Closed #1129:Nanang Izzuddin
- 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: http://svn.pjsip.org/repos/pjproject/trunk@3313 74dad513-b988-da41-8d7b-12977e46ad98
2010-06-23Fixed #1079 (Media transport should be kept alive during double-hold ↵Benny Prijono
scenario). Details: - 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: http://svn.pjsip.org/repos/pjproject/trunk@3219 74dad513-b988-da41-8d7b-12977e46ad98
2010-06-21Fixes #1047 (Don't send UPDATE if remote doesn't support it (thanks Bogdan ↵Benny Prijono
Krakowski for the report)) and fixes #1097 (Support sending UPDATE without SDP). Details: - 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: http://svn.pjsip.org/repos/pjproject/trunk@3215 74dad513-b988-da41-8d7b-12977e46ad98
2010-06-19Fixed #1077: In ICE stream transport (ice_strans.c), automaticaly retry ↵Benny Prijono
allocation once if TURN allocation fails. If this allocation retry also fails, notify the TURN user via on_ice_complete() callback. Details: - 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: http://svn.pjsip.org/repos/pjproject/trunk@3212 74dad513-b988-da41-8d7b-12977e46ad98
2010-06-04Re #668:Nanang Izzuddin
- 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: http://svn.pjsip.org/repos/pjproject/trunk@3198 74dad513-b988-da41-8d7b-12977e46ad98
2010-05-13Re #1069:Nanang Izzuddin
- 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: http://svn.pjsip.org/repos/pjproject/trunk@3172 74dad513-b988-da41-8d7b-12977e46ad98
2010-04-29Fixed #1062 (Assertion if 200/OK INVITE response is received during ↵Benny Prijono
PJSUA-LIB destroy sequence) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3153 74dad513-b988-da41-8d7b-12977e46ad98
2010-01-27Ticket #1028: Recommit r3074 with updated codec.h.Nanang Izzuddin
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3078 74dad513-b988-da41-8d7b-12977e46ad98
2010-01-26Undo r3074 for ticket #1028 as it is missing updated codec.h hence causing ↵Benny Prijono
build errors (thanks Michael Bradley Jr for the report) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3075 74dad513-b988-da41-8d7b-12977e46ad98
2010-01-26Ticket #1028:Nanang Izzuddin
- 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: http://svn.pjsip.org/repos/pjproject/trunk@3074 74dad513-b988-da41-8d7b-12977e46ad98
2010-01-04Misc fix (#1003): resolve NAT type after mapped addresses for SIP/RTP/RTCP ↵Benny Prijono
sockets have been resolved, so reduce chattiness during initialization and simplify debugging related to STUN problems git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3041 74dad513-b988-da41-8d7b-12977e46ad98
2009-11-09Misc fix (#951): Fixed pjsua bug RTP timestamp & sequence resetted after ↵Nanang Izzuddin
hold-resume (thanks Nikolay Popok for the report). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2996 74dad513-b988-da41-8d7b-12977e46ad98
2009-10-25Initial commit for ticket #950: QoS support:Benny Prijono
- implementation: - PJLIB (sock_qos*.*) - added QoS support in: - SIP UDP transport, - SIP TCP transport, - media UDP transport (done in pjsua-lib), - pjnath ICE stream transport, - pjnath STUN socket, - pjnath TURN client - added QoS options in pjsua-lib: - QoS fields in pjsua_transport_config - added "--set-qos" parameter in pjsua Notes: - QoS in TLS transport is not yet implemented, waiting for #957 - build ok on VS6, VS2005 (multiple targets), Carbide, and Mingw - no run-time testing yet git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2966 74dad513-b988-da41-8d7b-12977e46ad98
2009-10-14Ticket #881: send UPDATE or re-INVITE after ICE negotiation, if the default ↵Benny Prijono
candidate has changed - done - added pj_ice_strans_state (to be used for informational purposes for now) - added pjmedia ICE transport specific info, and display it in call dump output - misc fixes (changed pjmedia_transport_info.spec_info_cnt from int to unsigned) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2945 74dad513-b988-da41-8d7b-12977e46ad98
2009-10-14Ticket #970: More gracefull PJSUA-LIB shutdown sequence. Enhancements:Benny Prijono
- wait for unregistration to complete (or a preconfigured delay expires) - new account config field to set the maximum delay to wait for unregistration - rejects incoming requests (INVITE, SUBSCRIBE, and OPTIONS) when shutdown is in progress git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2943 74dad513-b988-da41-8d7b-12977e46ad98
2009-08-12Ticket #877: Memory consumption of the invite session grows indefinitely if ↵Benny Prijono
call is running for long period of time and with many re-INVITES - introducing flip-flop pools in the pjsip_inv_session. There are two additional pools created, and one of them will be reset everytime SDP negotiation is done to release memory back to the OS git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2869 74dad513-b988-da41-8d7b-12977e46ad98
2009-08-12Ticket #866: Allow application to specify more than one STUN servers for ↵Benny Prijono
more robustness, and continue application startup if STUN resolution fails PJSUA-LIB: - New fields in pjsua_config to specify more than one STUN servers (the stun_srv_cnt and stun_srv array) - The existing stun_host and stun_domain fields are deprecated, but backward compatibility is maintained. If stun_srv_cnt is zero, the library will import the entries from stun_host and stun_domain - The library will now resolve the STUN server entries one by one and test it before using it - New auxiliary API pjsua_resolve_stun_servers() to perform resolution and test against array of STUN servers pjsua application: - The "stun-srv" command line options can now be specified more than once git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2864 74dad513-b988-da41-8d7b-12977e46ad98
2009-07-16Sound device is not automatically started after pjsua_set_no_snd_dev() is ↵Benny Prijono
called, even after pjsua_set_snd_dev() is called git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2837 74dad513-b988-da41-8d7b-12977e46ad98
2009-07-15Ticket #919:Nanang Izzuddin
- Added default ilbc mode into codec passthrough setting. - Added iLBC mode 'negotiation' in iLBC codec_open(). - Updated stream_create() to prioritize codec_open(), that may update the codec params, over stream initializations involving codec params. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2834 74dad513-b988-da41-8d7b-12977e46ad98
2009-06-30Ticket #910:Nanang Izzuddin
- Added a new API pjmedia_codec_passthrough_init2(). - Updated the initialization steps of passthrough codec in pjsua_media.c, to configure the codecs (of passthrough codec) to be enabled based on audio device extended/encoded formats. - Minor update: added passthrough.h into pjmedia_codec.vcproj. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2825 74dad513-b988-da41-8d7b-12977e46ad98
2009-06-12Ticket #882: Added check of active call count before auto-close sound device.Nanang Izzuddin
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2758 74dad513-b988-da41-8d7b-12977e46ad98
2009-06-03More ticket #876:Benny Prijono
- fixed crash when null-audio is used with switchboard git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2742 74dad513-b988-da41-8d7b-12977e46ad98
2009-06-03Ticket #876: Second call fails to open the sound device event when ↵Benny Prijono
--null-audio is set git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2741 74dad513-b988-da41-8d7b-12977e46ad98
2009-05-29Integration of Sipit24 branch, many tickets involved:Benny Prijono
- #793: AMR encoder should regard 'mode-set' param specified by remote decoder. - #831: Automatically switch to TCP transport when sending large request - #832: Support for outbound proxy setting without using Route header - #849: Modify conference audio switch behavior in connecting ports. - #850: Remove 'Require=replaces' param in 'Refer-To' header (in call transfer with replaces). - #851: Support for regular nomination in ICE - #852: --ip-addr support for IPv6 for media transport in pjsua - #854: Adding SOFTWARE attribute in all outgoing requests may cause compatibility problem with older STUN server (thanks Alexei Kuznetsov for the report) - #855: Bug in digit map frequencies for DTMF digits (thanks FCCH for the report) - #856: Put back the ICE candidate priority values according to the default values in the draft-mmusic-ice - #857: Support for ICE keep-alive with Binding indication - #858: Do not authenticate STUN 438 response - #859: AMR-WB format param in the SDP is not negotiated correctly. - #867: Return error instead of asserting when PJSUA-LIB fails to open log file git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2724 74dad513-b988-da41-8d7b-12977e46ad98
2009-05-06Ticket #824: Race condition in sound auto-close feature may cause sound ↵Benny Prijono
device to not be opened git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2679 74dad513-b988-da41-8d7b-12977e46ad98
2009-04-14Ticket #788: Updated pjsua_media_subsys_init() to perform SRTP library ↵Nanang Izzuddin
initialization. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2597 74dad513-b988-da41-8d7b-12977e46ad98
2009-04-01Ticket #774:Nanang Izzuddin
- Initial source of G.722.1/Annex C integration. - Disabled some "odd" modes of L16 codec (11kHz & 22kHz mono & stereo) while releasing some payload types. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2563 74dad513-b988-da41-8d7b-12977e46ad98
2009-03-12(Major) Task #737 and #738: integration of APS-Direct and Audiodev from ↵Benny Prijono
aps-direct branch to trunk. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2506 74dad513-b988-da41-8d7b-12977e46ad98
2009-01-20Ticket #699: Added sound device idle checking in media_channel_deinit(), ↵Nanang Izzuddin
which is called each time a call being disconnected (for any reason). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2425 74dad513-b988-da41-8d7b-12977e46ad98