Commit Graph

2352 Commits

Author SHA1 Message Date
Bastian Triller 3c2d4b3ae2
fix typos (#3096) 2022-05-05 13:46:43 +08:00
Riza Sulistyo fa7087461e
Don't schedule re-Registration on IP change case (#3027) 2022-05-04 09:34:36 +08:00
sauwming 0297a3bf57
Add account id parameter checking in pjsua im APIs (#3035) 2022-05-04 09:32:36 +08:00
sauwming f1c0e284a3
Added conference port id checking in pjsua (#3038) 2022-05-04 09:15:34 +08:00
Riza Sulistyo 0fd9cb0d0f
Fix missing argument due to changes on #2979 (#3076) 2022-05-04 09:14:30 +08:00
liviu-rolo 7a7c17d364
wrong documentation about default jbInit (#3006) 2022-05-04 09:13:02 +08:00
liviu-rolo 712225bd48
Wrong default values for JB prefetch (#3007) 2022-05-04 09:12:40 +08:00
Nanang Izzuddin 41023dad10
Some callbacks not invoked in call replace in PJSUA2 (#3059)
Warning: potential backward incompatibility issue, previously the replacing call can use any account (selected using pjsua_acc_find_for_incoming() and app may override via callback), now it is forced to use the same account.
2022-04-26 13:30:41 +07:00
sauwming 189e6c0330 Fix bug when hanging up call (#3026) 2022-04-06 17:21:12 +08:00
sauwming 38c13afa1c
Fixed missing field in CodecParam (#3037) 2022-03-25 17:30:46 +08:00
mscdex 4d422dbf17
Only generate call stats if logging is enabled (#3020) 2022-03-25 09:16:42 +08:00
Emre TUFEKCI 2fd5e76d8e
third party media build error fix (#3019) 2022-03-25 09:14:37 +08:00
Riza Sulistyo 8e95490e37
Add compile time option to allow multiple Authorization header (#3010) 2022-03-24 13:53:03 +08:00
sauwming 601f0c7af1
Update registration transport upon account's modification or transport setting (#3004) 2022-03-11 14:29:42 +08:00
Riza Sulistyo d27f79da11
Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009)
* Use PJ_ASSERT_RETURN on pjsip_auth_create_digest

* Use PJ_ASSERT_RETURN on pjsua_init_tpselector()

* Fix incorrect check.

* Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256()

* Modification based on comments.
2022-03-08 22:20:39 +07:00
liviu-rolo 5102096ab1
wrong default value for jitter buffer max (#3001) 2022-03-03 12:44:43 +08:00
sauwming 18281d8a7d
Add option to randomize RTP starting port (#3000) 2022-03-03 12:43:44 +08:00
sauwming 6f197385c7
Miscellaneous fixes (#2969)
* Suppressed various compilation warnings
* Fixed CodeQL warning
* Fixed build warning on Android and Linux
* Fix build warning on Visual Studio
* Update target Android SDK version to 29 (for pjsua2 & app), to avoid gradle error: 'Google Play requires that apps target API level 29 or higher'.
* Add support for Camera2 API to ipjsua android app.
* Fix assertion on Win32 app (MSVC2005) because ICE transport info size is 160 bytes while the allocated buffer is just 144 bytes.
* Enable python unit test on windows for github actions.
* Avoid assertion in pjsua test caused by double calling of pjsua_conf_remove_port()
2022-02-24 14:46:01 +07:00
Nanang Izzuddin 062204bd5d
Fix cseq generation in pjsip_dlg_create_request(). (#2996) 2022-02-24 13:17:06 +07:00
sauwming c4531e0ddc
Hangup call in crossover scenario between CANCEL and 200 response (#2994) 2022-02-23 12:39:45 +08:00
sauwming 088690b607
Fixed failed pjsua test due to incorrect SRTP ROC check (#2993) 2022-02-23 12:10:44 +08:00
sauwming b5af6819a0
Fixed failure to resume video when unholding the call (#2988) 2022-02-22 11:40:10 +08:00
Nanang Izzuddin db3235953b
Merge pull request from GHSA-ffff-m5fm-qm62
* Update pjsip_ua_unregister_dlg():
- update the hash key if the dialog being unregistered is used as hash key.
- add an assertion check to make sure that the dlg_set to be removed is valid (can be found in the hash table).

* Change hash key string comparison method.
2022-02-21 07:24:52 +08:00
sauwming 9b37e587bc
Add feature to init SRTP ROC and check if SRTP ROC needs to be reset/maintained (#2846) 2022-02-18 10:06:29 +08:00
sauwming b1d29fd4e7
Fixed call hangup crash when ending session fails (#2980) 2022-02-16 11:27:35 +08:00
Riza Sulistyo d5477c1eed
Release wav player and recorder pool to clean up when calling pjsua_destroy() (#2979)
* Release wav player and recorder pool on pjsua_destroy2()

* Modification based on comments

* Modification based on comments

* modification based on comments
2022-02-15 13:21:38 +07:00
Florian Xaver 4cc86a6a3c
Fix documentation and usage of txdata ref counter (#2957) 2022-02-15 13:53:47 +08:00
sauwming 691c687f66
Fixed assertion in multipart test (#2972) 2022-02-15 11:19:13 +08:00
Grazhdan Oleg 14b0ef44df
Fix incorrect pjmedia_sdp_neg_state in case of SDP parsing error (#2908) 2022-02-14 17:27:11 +08:00
Krzysztof Marciniak f5249ca70e
Added pjsip_tsx_set_timers to change timers at runtime (#2781)
* Added pjsip_tsx_set_timers to change timers at runtime

Added new function pjsip_tsx_set_timers in sip_transaction.c
which allows to change session timers during runtime.
It also allows to change timer values independently,
currently all timers are set at various ratios from
t1 during init. This was required for server which could
change timeout configuration on runtime, but could be
usable in other projects.

* Add synchronization of timer values in pjsip_cfg().

Add synchronization of timer values to pjsip_cfg() and another
function to (re)synchronize timer values from pjsip_cfg(),
`pjsip_tsx_initialize_timer_values()`.

`pjsip_tsx_set_timers` now accepts zeroed arguments to mean
that it should not change that timer value.
2022-02-14 12:49:29 +08:00
George Joseph 668a828631
Add additional unit test options (#2961) 2022-02-11 12:28:03 +08:00
sauwming 2caced6fcf
Fix failure to manually reply re-INVITE (#2968) 2022-02-09 14:27:12 +08:00
sauwming 119623b633
Misleading log when answering a call in CONFIRMED state (#2950) 2022-02-08 12:02:37 +08:00
Nanang Izzuddin e0056814a9
Avoid double BYE when pjsua_call_hangup() is called multiple times (#2859) 2022-02-08 11:28:44 +08:00
Nanang Izzuddin c7c4ebc7b0
Add check if module has been unregistered in mod_ua module (in sip_ua_layer.c). (#2840) 2022-02-08 11:28:17 +08:00
Nanang Izzuddin c12d12cab7
Fix deadlock after immediate hangup on video call (#2837) 2022-02-08 11:27:42 +08:00
Riza Sulistyo 4fa7528c9d
Allow registration refresh to continue when REGISTER response contains expires parameter set to 0 (#2809) 2022-02-08 11:24:48 +08:00
Riza Sulistyo 313d536c28
Implement verify callback to TLS connection (#2962) 2022-02-08 11:15:38 +08:00
sauwming d979253c92
Merge pull request from GHSA-qcvw-h34v-c7r9
* Perform buffer length checks

* Add asssertion sanity checks
2022-02-08 08:15:07 +08:00
George Joseph 551273f639
Additional multipart improvements (#2953)
Added the following APIs:
pjsip_multipart_find_part_by_header()
pjsip_multipart_find_part_by_header_str()
pjsip_multipart_find_part_by_cid_str()
pjsip_multipart_find_part_by_cid_uri()
2022-02-02 09:30:14 +07:00
sauwming c9a75bed34
Add parameter assertion check in pjsip_uri_get_uri() (#2893) 2022-01-19 19:22:06 +08:00
Nanang Izzuddin ecd18ee4d4
Fix issue of not rescheduled keep-alive timer for Flow-Timer when ka_interval (UDP keep-alive interval setting) is zero/disabled. (#2943) 2022-01-18 13:41:57 +08:00
sauwming 3cdea084b2
Check for tdata when ending inv session (#2938) 2022-01-18 13:38:55 +08:00
Florian Xaver e84b3318d7
Support Digest AKA authentication in PJSUA2 (#2785) 2022-01-17 10:18:00 +08:00
Florian Xaver ff7cd11630
Support loop media transport in PJSUA2 (#2900) 2022-01-13 13:20:50 +07:00
George Joseph 80c48e9a57
Create generic pjsip_hdr_find functions (#2941) 2022-01-13 13:10:04 +07:00
Riza Sulistyo d3d4d2200c
Support Flow-Timer on rfc5626 (#2921)
* Support Flow-Timer

* randomize keep-alive timer each time it is scheduled.

* Modify random delay calculation.

* Simplify random delay calculation.
2022-01-10 22:31:53 +07:00
sauwming b771df4663
Fix missing event unsubscription in pjsua video (#2932) 2022-01-06 15:39:15 +08:00
sauwming 3faf1d2b4d
Fix incorrect unescaping of tokens during parsing (#2933) 2022-01-04 15:28:49 +08:00
sauwming 833c983029
Get note from root if not found in tuple (#2909) 2021-12-23 11:00:33 +08:00
sauwming fc91812dd1
Fix crash when dumping call data during media deinit (#2918) 2021-12-23 10:59:51 +08:00
sauwming 41b7bde0f0
Check for decoding delay in video stream (#2886) 2021-12-23 10:09:48 +08:00
George Joseph 69a89a26dd
sip_inv: Additional multipart support (#2919) (#2920) 2021-12-22 09:32:22 +07:00
George Joseph 57416c5cf8
Fix declaration of pjsip_auth_deinit_parser() (#2914) 2021-12-22 09:27:46 +07:00
Nanang Izzuddin 7dcf16dca5
Fix issues in updating media dir to "none" in the middle of a call (#2906)
* Fix issues in updating media dir to NONE in the middle of a call

* Update PJSUA2 CallSetting::mediaDir declaration for SWIG. Note: adding SWIG template for MediaDirVector as vector of pjmedia_dir enum causes some error: SWIG treats enum as int, so vector of pjmedia_dir will be wrapped as vector of int, as there is already IntVector, SWIG rejects duplicated vector of int.
2021-12-06 14:38:33 +07:00
Riza Sulistyo 073e992767
Add documentation on how port_range is used (#2904)
* Add documentation on how port_range is used.

* Add pjsua2 documentation

* Move example of media transport settings
2021-12-03 07:58:22 +07:00
Riza Sulistyo ef0ed65808
Disable assertion when checking for an invalid transport (#2891)
* Disable assertion for an invalid transport

* Modification based on comments.
2021-11-19 11:29:26 +07:00
Riza Sulistyo cc680d21e6
Change "md5" algorithm name to uppercase to comply with the standard (#2889) 2021-11-18 13:15:07 +07:00
Nanang Izzuddin ab86ec3dc0
Only add the top most supported auth header in auth reinit request. (#2887) 2021-11-16 15:34:52 +07:00
Nanang Izzuddin 532e64ef6e
Disable auto restart socket in PJMEDIA and PJSIP transports (#2881) 2021-11-11 09:25:45 +07:00
Riza Sulistyo 6ca06f63ec
Fix some doc warning (#2879) 2021-11-10 09:57:40 +07:00
Nanang Izzuddin 407009c0a8
Fix bug in REGISTER Contact length calculation (#2857) 2021-10-21 10:22:45 +07:00
Nanang Izzuddin c87056e178
Add call dump to pjsua_media_channel_deinit() (#2855) 2021-10-20 12:45:20 +07:00
Nanang Izzuddin 6b1821c0c7
Add compile-time setting to disable automatic video device subsystem initialization (#2777) 2021-10-19 15:26:38 +07:00
Nanang Izzuddin 8fc67a51ee
Miscelaneous changes on PJSUA2 audio device APIs (#2822) 2021-09-27 15:24:59 +07:00
Nanang Izzuddin e48ec1dc0d
Add support to specify Contact URI params specific to REGISTER requests (#2819) 2021-09-23 09:08:07 +07:00
Nanang Izzuddin ae5ce4ca72
Handle unknown cipher name in PJSUA2 (#2821) 2021-09-10 16:45:39 +07:00
Riza Sulistyo 661a8cef67
Add support to windows on ARM build (#2807)
* Add support to ARM64 configuration for win32 build

* Add changes notes to webrtc and webrtc_aec3 third party sources

* Remove reference to libwebrtc_aec3 from libpjproject. Add reference it manually if libwebrtc_aec3 is needed.

* Fix build error on Release configuration.
2021-08-30 10:39:48 +07:00
Nanang Izzuddin 37136a4ee6
High video latency when decoder frame rate is initialized lower than actually received (#2798)
- Add new APIs to update/refresh video conference bridge port: `pjmedia_vid_conf_update_port(), pjsua_vid_conf_update_port(), VideoMedia::update()`.
- Use the new API in PJSUA-LIB to update renderer & stream decoder in format changed event.
2021-08-18 10:47:13 +07:00
Riza Sulistyo 43d1bc90d7
Avoid deadlock on unsubscribe event (#2771) 2021-07-27 11:29:38 +07:00
Nanang Izzuddin d5f95aa066
Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.

* - Fix silly mistake: accepted active socket created without group lock in SSL socket.
- Replace assertion with normal validation check of SSL socket instance in OpenSSL verification callback (verify_cb()) to avoid crash, e.g: if somehow race condition with SSL socket destroy happens or OpenSSL application data index somehow gets corrupted.
2021-07-23 11:49:21 +08:00
Nanang Izzuddin c80f59eb90
SDL full-screen mode fixes and enhancement (#2759)
- Add fullscreen mode PJMEDIA_VID_DEV_FULLSCREEN_DESKTOP (no video mode change), which is mapped to SDL_WINDOW_FULLSCREEN_DESKTOP.
- Fix resizing while in full-screen.
- Update PJSUA, PJSUA2 & pjsua app, e.g: fullscreen setting was boolean (fullscreen enabled/disabled), now it is enum: disabled, fullscreen, or fullscreen desktop.
2021-07-21 11:47:07 +07:00
Dan Oprescu 0966d4c6dd
Fix 's default constructor to do what the documentation says. (#2762) 2021-07-12 08:54:22 +07:00
Riza Sulistyo 70074ede91 Linker error when building pjmedia_test, pjsip_test and sample project when using Visual Studio, some of them caused by #2753. 2021-07-07 16:47:05 +07:00
Nanang Izzuddin 8ef2a3c0d0 Re #2753: Compile error when PJSIP_AUTH_HAS_DIGEST_SHA256 is disabled (or without OpenSSL). 2021-07-06 14:46:09 +07:00
SebaLedesma abf2b4c54f
Support for SHA-256 algorithm in SIP Digest Authentication (#2753) 2021-07-06 11:17:11 +07:00
Nanang Izzuddin bc6f0ee6e3
Avoid call disconnection due to request timeout when network change happens. (#2737) 2021-06-29 15:00:58 +07:00
Nanang Izzuddin cb35c79f21
Allow app modify video encoding param in on_stream_precreate() (#2741) 2021-06-29 15:00:12 +07:00
Riza Sulistyo 3844cd1b8b
Avoid deadlock when restarting SIP UDP transport due to holding pjsua lock (#2731)
* Avoid deadlock when restarting SIP UDP transport due to holding pjsua
lock.

* Add callback to lock/unlock any lock held when waiting for the read spin loop finish.

* Use simpler approach by unlocking before restarting UDP transport.

* Add doc to pjsip_udp_transport_restart() and pjsip_udp_transport_restart2() of the possibility of deadlock.
2021-06-29 14:58:22 +07:00
Nanang Izzuddin a5bd5e9d44 Misc (re #2698): Update docs of TD timer in SIP transaction, which also affects tsx timeout timer for both INVITE & non-INVITE tsx since https://trac.pjsip.org/repos/changeset/3203.
Thanks to Pirmin Walthert for the feedback.
2021-06-16 17:07:53 +07:00
sauwming 1cb34f56a7
Specify media direction when making, answering, or updating call (#2705) 2021-05-17 09:58:19 +08:00
sauwming bdbeb7c4b2
Skip unsupported digest algorithm (#2408)
Co-authored-by: Nanang Izzuddin <nanang@teluu.com>
2021-04-22 14:03:28 +08:00
sauwming ea7105c222
Allow SIP transaction to continue for certain case despite transport error (#2683) 2021-04-01 16:06:10 +08:00
Nanang Izzuddin 4772d62ed2
Fix reject incoming call before sending any response (auto 100/trying response is disabled) (#2676) 2021-04-01 11:50:57 +07:00
Dan Oprescu 29412ceb82
call_change_cap_dev() should allow *any* valid capture device, ie. including PJMEDIA_DIR_CAPTURE_PLAYBACK for example (#2678) 2021-03-31 10:03:55 +08:00
Hubert LOBIT c075a41071
Add a `getID()` method to PJSUA2 Buddy class (#2681) 2021-03-30 16:15:15 +08:00
Nanang Izzuddin 79531cbc05
More works on Trickle ICE (#2667)
- Improve trickling state management (fix no SIP INFO when initial INVITE responded immediately with 200, strayed SIP INFO after trickling is done, etc).
- Fix issues when rtcp-mux is enabled.
- Allow process incoming SIP INFO before receiving remote SDP.
- Use regular ICE on re-INVITE (with reinit media flag).
- Avoid calling pj_ice_strans_get_running_comp_cnt() for loop condition.
- Fix bug in pjnath-test: TURN server set wrong peer channel number.
- Added timer for end-of-candidate indication from remote & don't flag ice-mismatch if remote uses default address in trickle ICE
2021-03-17 13:00:01 +07:00
sauwming 1a3f8ad60d
Fixed race condition between media event callback and stopping video (#2666) 2021-03-12 16:42:56 +08:00
sauwming 90a7d70ae2
Fix secure transport checking (#2663) 2021-03-09 13:39:41 +08:00
Riza Sulistyo 74c34399d6 Misc (re #2504): Suppress some compile warning on VS Windows. 2021-03-09 07:32:36 +07:00
sauwming 67e46c1ac4
Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection

* revision based on feedback

* remove the code in create_request that has been moved
2021-03-08 17:39:36 +08:00
Riza Sulistyo 940e3c0443
Support Android AMediaCodec (#2552)
* Implement android AMediaCodec AVC/VPX codec.

* - Change "anmed" to "and_media" prefix for clearity.
- Check if encoder/decoder exists before enabling codec.

* Fix bug on enum info.

* Add support to AMRNB and AMRWB audio codec.

* Modification based on comments.

* - move VPX packetizer from codec implementation.

* - Remove unwanted changes.
- Fix bug on vpx (VP9) packetize method.

* - New method to initialize vpx packetizer config.
- Don't use pt as codec id.

* add compiler option to prioritze using software or hardware codec.

* add documentation related to packetization mode for H264.

* fix some potential compile error.

* Specify video codec PT to support #2656.
2021-03-05 21:59:07 +07:00
Riza Sulistyo 433cf50b1c
Add option to disable auto re-registration. (#2652)
* Add option to disable auto re-registration.

* modification based on comments

* Change config name and add doc.
2021-03-05 14:42:21 +07:00
Riza Sulistyo d9055ede5c
Allow EC to be used when sound device is opened on speaker mode only (#2651)
* Add option to always use VPIO on coreaudio dev.

* Revert "Add option to always use VPIO on coreaudio dev."

This reverts commit 55d6da5b4b.

* Allow EC to be enabled when sound device is opened on speaker only mode.

* Modify assertion to allow ec to be set on playback only mode.
2021-03-04 16:08:52 +07:00
Nanang Izzuddin d331da47c8
Update pjsip-simple RPID (#2639)
- Allow <note> element in <tuple> set in pjsip_pres_status.info[0].rpid.note without having RPID element in presence message body.
- Fix wrong parent node for finding note element in get_tuple_note().
- Update docs: fix typo, etc.
2021-03-03 15:27:57 +07:00
Nanang Izzuddin 415ada6a61
Fix SIP session timer not retry refreshing after a re-INVITE refresh responded with 503 (#2657) 2021-03-03 15:08:40 +07:00
sauwming 6470fb9e4b
Fixed race condition in regc_send() (#2653) 2021-02-24 17:03:29 +08:00
sauwming 0438a4762c
Modify pjsua maximum calls setting (#2654) 2021-02-24 17:02:58 +08:00
sauwming 0c78b9e8c8
Add compile time option to disable auto sending of 100 response (#2642) 2021-02-22 13:58:19 +08:00
sauwming 9c778a700a
Fixed race condition between stopping video stream and format change event (#2645) 2021-02-18 13:15:49 +08:00
Nanang Izzuddin aadc643a01
Fixed assertion in media update of session refresh after previous SDP offer has been rejected (#2627) 2021-02-15 10:18:02 +07:00
Riza Sulistyo e1b82fc25d
Update RTP timestamp on inactive/paused video stream (#2640) 2021-02-15 10:05:29 +07:00
Nanang Izzuddin 73553fbd02
Use UTC time in PJSIP presence PIDF timestamp (#2638) 2021-02-15 09:04:06 +07:00
Alex Kalmuk 974cb47351
Add --disable-pjsua2 option for targets which lacks C++ (#2630) 2021-01-28 10:45:32 +08:00
Nanang Izzuddin e6f7d032dd Re #2572: fix assertion in auto_rereg_timer_cb() when trying to re-register to an unavailable registrar via UDP. 2020-12-18 16:36:58 +07:00
Riza Sulistyo a29e9dc3e5
Modify on_new_session callback as optional. (#2534) 2020-12-15 14:32:06 +07:00
Nanang Izzuddin d65cacddd3
Implement trickle ICE (#2588)
Squash & merge trickle-ice dev branch to master.
2020-12-11 09:40:57 +07:00
Nikolai ZHUBR dad6a34680
Fix building with video support (including dshow camera) on mingw (#2589) 2020-12-10 15:54:40 +07:00
sauwming 2eea0ace2b
Report disconnection event immediately when hanging up a call (#2600) 2020-12-04 10:29:45 +08:00
Nanang Izzuddin c6bc0b1e2e
Create new contact for reregistration after transport disconnected (#2572) 2020-11-20 10:53:59 +07:00
Nanang Izzuddin 2925cca94f
Fix bugs in pjsip_inv_answer() (#2472) 2020-11-20 10:52:55 +07:00
Nanang Izzuddin 90a16c523b
Race condition between transport destroy and acquire (#2470)
* Handle race condition between transport_idle_callback() and pjsip_tpmgr_acquire_transport2().
* Add transport destroy state check as additional of transport shutdown state check
2020-11-20 10:52:22 +07:00
Andreas Wehrmann fe5ef0c3a4
PJSUA call: fix on_pager_statusX() callbacks for in-dialog requests (#2490)
- on_pager_status() was called twice: once for event TSX_STATE and later for event TIMER
- on_pager_status2() was not called at all
2020-11-19 10:01:17 +07:00
sauwming bba95b8a95
Prevent regc destroy when it is busy (#2575) 2020-11-11 10:28:28 +08:00
Nanang Izzuddin f3e091fac0
Invoke on_call_sdp_created callback for new SDP offer generated by pjsua_call_set_vid_strm() (#2564) 2020-11-02 14:46:15 +07:00
sauwming 86fdff32e7
Disallow forceful close of pjsua transport (#2557) 2020-10-23 08:37:03 +08:00
Riza Sulistyo efbe7164e9
Option to send keep alive periodically when stream is started for NAT hole punching (#2518)
* send keep alive when stream is started.

* modification based on comments.

* Add documentation.

* Modification based on comments.

* Grouped configuration.
2020-10-12 14:37:30 +07:00
Riza Sulistyo 7a702b9aab
Add option to disable ice mismatch check. (#2538)
* Add option to disable ice mismatch check.

* Fix check error and modify doc.

* Modification based on comments.
2020-10-12 12:38:12 +07:00
sauwming ce18018cc1
Fix incorrect copying of destination info when creating CANCEL (#2546) 2020-10-12 13:31:25 +08:00
Sergey Strelchenko 004f7f7d8c
Fixed wrong macros PJ_DEF. PJ_DECL is correct. (#2545) 2020-10-12 11:58:53 +08:00
Max Truxa 9c66083712
Implement stream pre-create callback (#2507) 2020-10-05 14:20:46 +07:00
Nanang Izzuddin 7147e2e985 Merge branch 'master' of https://github.com/pjsip/pjproject 2020-10-05 10:33:35 +07:00
Nanang Izzuddin 1749cf8a50 Misc (re #2504): Updated PJSUA_VID_REQ_KEYFRAME_RTCP_PLI docs, it is supported since 2.10. 2020-10-05 10:33:14 +07:00
Riza Sulistyo 510716631e Add option to disable ice mismatch check. 2020-10-02 14:18:51 +07:00
Nanang Izzuddin da46a61baf
Invite state not shifting to CONFIRMED state after sending ACK manually (#2528)
Also updated docs:
 - on_send_ack(): explicitly mention that ACK request must be created using pjsip_inv_create_ack().
 - pjsip_inv_create_ack(): SDP answer to be set using pjsip_inv_set_sdp_answer(), was pjsip_create_sdp_body().
2020-09-30 14:33:25 +07:00
sauwming a184b14f8c
Speaker only setting still requires audio input device (#2522) 2020-09-29 11:29:15 +08:00
sauwming e2d8ee0f49
Suppress CodeQL warnings (#2530)
Also exclude some third party libs and python source
2020-09-23 18:45:59 +08:00
Nanang Izzuddin 4ec0b6485c
Avoid invoking callback on_pager_status twice when resending with auth fails. (#2489) 2020-08-18 11:35:33 +07:00
Max Truxa 5925c42ea3
Pass JB discard algorithm along other JB settings (#2506) 2020-08-14 10:35:11 +08:00
Nanang Izzuddin 32153443e7 Misc (re #2504): Fixed compile error 'declaration after statement', e.g: on MSVC2005 2020-08-10 11:37:29 +07:00
sauwming 92d2e8df9a
Fix sip transaction to send pending message (#2471) 2020-07-20 11:32:54 +08:00
andreas-wehrmann 973bb671a1
PJ adjustable pool sizes (#2395)
Make several pool sizes settable via compile time macro settings. This can be used to deal with memory fragmentation issues in long running applications that encounter temporary high loads.
2020-07-15 11:46:59 +07:00
sauwming b0aa9e93a7
Fixed failed reinvite if call opt is NULL (#2478) 2020-07-03 17:22:44 +08:00
Max Truxa 5f14950cb5
Add callbacks to receive RTP DTMF events (#2447) 2020-06-26 16:06:21 +08:00
Nanang Izzuddin 11fd8da3ed
Fixed bug in ICE callback implementation in PJSUA to reschedule timer after failed in acquiring dialog. (#2468) 2020-06-24 09:03:21 +07:00
sauwming 87653d5a22
Check current inv state before decreasing ref count (#2459) 2020-06-15 14:14:45 +08:00
Riza Sulistyo de9f0713b3
Possible leak tdata when receiving 200 OK response after the invite session is destroyed. (#2432)
* Possible leak tdata when receiving 200 OK response after the invite
session was destroyed.

* Add comments linking the PR to the changes.

* Add safety check.

* Fix possible leaked tdata when ACK is not sent due to timeout.
2020-06-10 15:20:51 +07:00
Riza Sulistyo f45f2d435a
Allow demote SRTP call to RTP when using re-INVITE with PJSUA_CALL_REINIT_MEDIA (#2451)
* - Allow demote SRTP call to RTP when using re-INVITE with
PJSUA_CALL_REINIT_MEDIA
- DTLS renegotiation when receiving re-INVITE with modified media
transport address

* Revert DTLS_DEBUG to 0.

* modification based on comments.

* modified comment.
2020-06-10 10:42:53 +07:00
Truong-Thanh-Quang 6503ec40a8
Fix dtmf signal &duration parsing in dtmf-relay INFO message (#2425) 2020-06-09 15:14:25 +07:00
Nanang Izzuddin 5d216a94c8
Fix bug when sending IM using null content (continuation of #2452) (#2454)
Also update on_pager_status() callback: set body param with message body (i.e: tdata->msg->body) when IM is sent using null content.
2020-06-09 12:35:19 +07:00
Nanang Izzuddin 55cd705114
Allow NULL content in sending IM if msg_data has body/multipart (#2452) 2020-06-04 13:19:17 +07:00
sauwming c2d7c7616f
Call on_call_media_event() callback asynchronously to avoid deadlock (#2446) 2020-05-22 15:07:28 +08:00
Guido Falsi 78683646c8
Fix race condition in parallel builds (#2426)
* Some targets residing in `OBJDIRS` are missing a dependency on that directory, which results in a race condition, causing build to fail sometimes due to the directory not existing when running parallel builds.

* The `PJSUA_LIB` variable is not defined anywhere, resulting in an empty value, and no correct dependency on the pjsua shared library for `pjsua2`. The correct variable seems to be `PJSUA_LIB_LIB`, defined at the start of this same `Makefile`.
2020-05-11 13:50:39 +07:00
sauwming 95c29aa1d2
Avoid undefinition of standard macros s_addr and s6_addr (#2423) 2020-05-06 09:38:26 +08:00
sauwming bb60df2346
Fixed assertion when receving an INVITE response during an UPDATE (#2419) 2020-05-05 14:02:14 +08:00
sauwming b53b8e8651
Fix duplicate 408 status phrase
Re #2381
2020-05-01 17:18:02 +08:00
Nanang Izzuddin b23633707c
More CI works (#2376)
* pjsua-test:
  - Update pjsua-test module call: wait ICE update before checking media
  - Attempt to fix all failed tests by sipp module: changed SIPp port from 6000 to 50070 (port used by recvfrom module)
  - Update call module: confirm codec priority after change, fix DTLS-SRTP expect may race with state CONFIRMED
  - Add timeout check in telnet-ing to pjsua
  - ICE nego may race with call state CONFIRMED, so mod call better just sleep instead of expecting 'ICE nego success'.

* Other unit tests:
  - Print stack trace on crash on Linux and DarwinOS via SIGSEGV signal handler.
  - Update resolver test: print log on callback error, replace assertion checks with error return, fix comments, sleep periods, fix received packet count may be > 1 if server ignore the request (for example when the test machine experiencing high CPU load).
  - Update ccpp.yml: add -g for jobs with unit-tests.
  - More lenient on tsx retransmission count check in pjsip-test.
  - Update tsx_uac/s_test.c: allow retransmission timing diff from 150 to 500ms to accommodate possible CPU spike on some test machines.
2020-04-30 11:25:19 +07:00
sauwming 558922fc3f
Suppressed various compilation warnings (#2410)
Such as:
- conversion from string literal to 'char *' warning
- format-truncation warning

Co-authored-by: nanangizz <nanang@teluu.com>
2020-04-29 15:11:26 +08:00
sauwming 1c985975ce
Status phrases (#2381)
* pjsip: Add new status phrases

Taken from various (newer) SIP RFC's.

* psjip: Make status phrases match the RFC's

Replace homebrew phrases with the standard phrases from the SIP RFC's.

* pjsip: Add new status codes to pjsip_status_code enum

* Update symbols.i

* Fix indentation of symbols.i

Co-authored-by: sauwming <ming@teluu.com>
2020-04-29 11:58:31 +08:00
Nanang Izzuddin 8cd15e8073
Increment outgoing RTP timestamp on inactive or receive only stream (#2340) 2020-04-29 10:55:14 +07:00
Nanang Izzuddin 346550de5e
VideoPreview not updating its device ID after device fast-switched (#2368) 2020-04-29 09:59:08 +07:00
Alex Hermann d1c2cd097f pjsip: Add new status codes to pjsip_status_code enum 2020-04-28 09:00:59 +02:00
Alex Hermann 50a7ed0d06 psjip: Make status phrases match the RFC's
Replace homebrew phrases with the standard phrases from the SIP RFC's.
2020-04-10 14:26:59 +02:00
Alex Hermann 687c58d76d pjsip: Add new status phrases
Taken from various (newer) SIP RFC's.
2020-04-10 14:26:39 +02:00
andreas-wehrmann b3ca3b50e1
don't use private account pool for allocating the address; (#2379)
it's not used in the account directly and will lead to a very slow increase in memory usage over time.
2020-04-09 17:53:42 +08:00
sauwming e1edb64d4d
Handle case when provisional response is sent after a final one (#2350)
Handle case when provisional response is sent after a final one
- If 100rel is required, prevent retransmission if the initial send fails, since the retransmission will cause a crash later.
- Otherwise, return error instead of asserting in sip_transaction
2020-03-20 10:37:11 +08:00
Nanang Izzuddin 5f689f5d23
Add option to exclude benchmark tests in unit tests (#2321)
* Add option to exclude benchmark tests in unit tests

* Loosen up resolver round-robin testcondition (percent difference allowance from 5% to 10%, the test result variance relies heavily on OS random number distribution).
2020-03-19 14:46:22 +07:00
sauwming ddf48e2045
Fix parallel build failure (#2306)
Re #2300:
* Fix parallel build failure when building pjsua2 due to typo in pjsip's Makefile
* Fix parallel build failure for swig component
2020-03-19 15:35:26 +08:00
Nanang Izzuddin 8c09346142
Video capture device ID reverted back to default in SIP session refresh (#2341) 2020-03-19 14:26:28 +07:00
明月惊鹊 68e5350335
Fix account ID verification in pjsua_call_make_call() (#2332) 2020-03-06 18:00:28 +07:00
Nanang Izzuddin cc2198c278 Loosen up resolver round-robin testcondition (percent difference allowance from 5% to 10%, the test result variance relies heavily on OS random number distribution). 2020-03-03 17:34:45 +07:00
Nanang Izzuddin c3456980ba Add option to exclude benchmark tests in unit tests 2020-03-03 09:53:07 +07:00
sauwming dec146d750
Use port range when creating loop media transport (#2312) 2020-02-28 10:53:48 +08:00
Nanang Izzuddin 072fee1e68
Merge pull request #2297 from pjsip/tls1.3
Add TLS proto for TLS 1.3 (only for OpenSSL backend)
2020-02-27 09:48:22 +07:00
mingteluu 6e8bf7f337 more details in the log 2020-02-25 11:58:08 +08:00
mingteluu b76c134fea Add more log in pjsua_vid and vid_conf 2020-02-25 10:51:43 +08:00
Nanang Izzuddin 4fa33725bd Add TLS proto for TLS 1.3 2020-02-21 18:07:04 +07:00
Nanang Izzuddin 38ca44800a Fixing silly mistake in #2290: missing handling for incoming call 2020-02-21 11:31:24 +07:00
Nanang Izzuddin d2ece7dd87 Disable SDP media with no codec 2020-02-20 14:57:22 +07:00
nanangizz 3980472947 Decrease send counter in transaction when its state is shifting to TERMINATED (where it cancels itself from send notification) and there is pending send. 2020-02-18 19:41:02 +07:00
Riza Sulistyo c71d3d49cc Misc (re #2210): Fixed formatting mistake when printing destination on keep-alive log.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6161 74dad513-b988-da41-8d7b-12977e46ad98
2020-02-07 12:02:00 +00:00
Sauw Ming 6741c75da7 Re #2264: Fixed crash if pjsua_var.acc[acc_id].regc is NULL
Note that the regc instance itself hasn't been destroyed since the refcount has been incremented, but acc->regc can already be NULL-ed.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6160 74dad513-b988-da41-8d7b-12977e46ad98
2020-02-07 08:20:56 +00:00
Riza Sulistyo ae2e919d9e Misc (re #2210): Fixed various warnings on Visual Studio 2015.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6159 74dad513-b988-da41-8d7b-12977e46ad98
2020-02-06 04:02:56 +00:00
Sauw Ming 601d6e6824 Fixed #2266: Allow Via header with IPv6 containing []
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6158 74dad513-b988-da41-8d7b-12977e46ad98
2020-02-06 02:52:10 +00:00
Nanang Izzuddin 95c09007dc Misc (re #2210): Fixed various compile warnings on MSVC2005.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6157 74dad513-b988-da41-8d7b-12977e46ad98
2020-02-05 03:05:30 +00:00
Nanang Izzuddin b99e98bb09 Close #2265: Fixed compatibility issues on Python 3.7 or above.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6152 74dad513-b988-da41-8d7b-12977e46ad98
2020-02-04 04:47:32 +00:00
Sauw Ming 0e129f8665 Fixed #2264: Potential deadlock between pjsua lock and sip transport's lock
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6142 74dad513-b988-da41-8d7b-12977e46ad98
2020-01-29 04:05:51 +00:00
Nanang Izzuddin 5cb740f72b Misc (#2210): Added early check whether account is registered before sending unregistration in pjsua_acc_modify() (thanks to Peter Koletzki for the suggestion).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6141 74dad513-b988-da41-8d7b-12977e46ad98
2020-01-29 03:48:51 +00:00
Sauw Ming bde1167cc3 Closed #2143: Add AEC info to call info & statistics dump
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6140 74dad513-b988-da41-8d7b-12977e46ad98
2020-01-28 06:58:45 +00:00
Nanang Izzuddin d5ec2f4592 Misc (re #2210): Get rid of annoying persistent log lines due to video conference connection between active capturer and stopped/hidden renderer (thanks to Dmytrii Gonchar for the feedback).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6138 74dad513-b988-da41-8d7b-12977e46ad98
2020-01-28 02:42:42 +00:00
Riza Sulistyo ec2c39edc4 Close #2262: Notify when IP change handling is completed.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6137 74dad513-b988-da41-8d7b-12977e46ad98
2020-01-28 01:47:56 +00:00
Sauw Ming 2f3a1234d0 Closed #2261: Prevent unnecessary locking when adding group lock handler
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6136 74dad513-b988-da41-8d7b-12977e46ad98
2020-01-17 00:59:51 +00:00
Sauw Ming 45675996ab Fixed #2260: Potential deadlock between sip_transaction and sip_reg
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6134 74dad513-b988-da41-8d7b-12977e46ad98
2020-01-16 06:37:40 +00:00
Sauw Ming 824298c8ee Closed #2259: Fix check to cleanup provisional media
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6126 74dad513-b988-da41-8d7b-12977e46ad98
2019-12-26 03:36:57 +00:00
Nanang Izzuddin a414fb61f4 Re #2256: Readjusted build configs (after r6120 & r6121) to accomodate the convention that CXXFLAGS always includes CFLAGS in all PJSIP modules.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6122 74dad513-b988-da41-8d7b-12977e46ad98
2019-12-19 11:31:55 +00:00
Nanang Izzuddin 1a1db21d52 Re #2256: Fixed build error for iOS target due to changes in r6120.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6121 74dad513-b988-da41-8d7b-12977e46ad98
2019-12-19 10:00:53 +00:00
Nanang Izzuddin 192a6bfc43 Fix #2256: Mini refactored Android configure script:
- added CXXFLAGS & LDFLAGS parsing (from ndk-build output), CXXFLAGS was set to CFLAGS.
 - updated WebRTC instruction set to use SSE2, was generic, for Android emulator (x86 ABI).
 - updated C++ library/STL backend to use c++_shared, somehow '-lc++_static' is ignored after the refactor, also the official NDK docs mentions that c++_static may cause undefined behavior for app with multiple shared libraries (note pjsua2 app may use other shared libraries).



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6120 74dad513-b988-da41-8d7b-12977e46ad98
2019-12-19 02:57:20 +00:00
Riza Sulistyo dfb6aa264d Close #2258: Add PJSUA2 API to get and set OPUS codec setting.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6119 74dad513-b988-da41-8d7b-12977e46ad98
2019-12-17 10:06:01 +00:00
Nanang Izzuddin b9fd883dc2 Close #2255: Add API for making video window full screen.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6117 74dad513-b988-da41-8d7b-12977e46ad98
2019-12-10 03:55:51 +00:00
Sauw Ming e472147378 Fixed #2251: Deadlock between PJSUA LOCK and conference mutex
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6112 74dad513-b988-da41-8d7b-12977e46ad98
2019-11-29 04:21:17 +00:00
Sauw Ming 3c9fa7ae2d Fixed #2253: Support for VP8 and VP9 video codec
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6110 74dad513-b988-da41-8d7b-12977e46ad98
2019-11-22 06:18:55 +00:00
Nanang Izzuddin 2d9f105d82 Close #1437: Video keyframe request/response using RTCP-FB PLI.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6106 74dad513-b988-da41-8d7b-12977e46ad98
2019-11-13 09:11:04 +00:00
Nanang Izzuddin 666251bbf9 Misc (re #2210): Fixed macro setting PJSIP_MAX_TIMER_COUNT issues: not overridable and bad docs (thanks to Christian Ambach for the report and the patch).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6102 74dad513-b988-da41-8d7b-12977e46ad98
2019-11-07 03:22:42 +00:00
Sauw Ming 4976aaa25e Re #2210 (misc): Clarify in the doc that on_stream_created()/destroyed() callback is for audio stream
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6097 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-25 01:42:02 +00:00
Sauw Ming a0be35b381 Fixed #1778: Support for Voice Processing IO Audio Unit on Mac
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6094 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-17 07:02:50 +00:00
Nanang Izzuddin fc665ef46f Fix #2245: Reconnect video stream listeners in video conference bridge after format changed.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6093 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-15 08:58:41 +00:00
Nanang Izzuddin 3589e6f759 Re #2241: Fixed compile error due to declaration after code on older compilers or pre-C99 specs, such as MSVC2005.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6092 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-14 02:33:04 +00:00
Nanang Izzuddin 755f33d492 Fixed #2243:
- pjsip_tpmgr_acquire_transport2() should skip transports being shutdown in the lookup iteration.
 - Added some tracing logs in sip_transport.c.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6090 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-11 02:23:03 +00:00
Nanang Izzuddin dc4ed48423 Fixed #2242: Message buffer not set correctly in pjsip_rx_data_clone().
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6089 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-10 06:54:12 +00:00
Riza Sulistyo d2938b4cdc Fixed #2241: Update "sent-by" field of Via header on CANCEL request for proxy scenario.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6088 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-08 08:32:53 +00:00
Nanang Izzuddin d5a9caf6aa Fixed #2240:
- Avoid double pjsip_inv_dec_ref() by evaluating the local var 'state' instead of 'inv->state' in checking DISCONNECTED state in 'inv_set_state()', as the 'on_state_changed()' callback may recursively call 'inv_set_state()' and shift the state to DISCONNECTED.
 - Avoid inv sess destroy in the callback by increasing ref count.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6087 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-04 07:31:40 +00:00
Nanang Izzuddin 33a3c9e0a5 Fixed #2239:
- Deinit OpenGL immediately when initialization fails, so video device {{{start()}}} and {{{put_frame()}}} will return immediately.
 - Introduced new media event {{{PJMEDIA_EVENT_VID_DEV_ERROR}}}, used for notifying app when video device reinit (due to format change) fails.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6085 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-04 04:26:39 +00:00
Sauw Ming de55ff2b28 Fixed #2238: Local hold is not reset if there's failure during reinvite/update
We set local_hold later, after sending the message is successful.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6083 74dad513-b988-da41-8d7b-12977e46ad98
2019-10-02 03:42:13 +00:00
Sauw Ming 67cafdf1ec Re #2210 (misc): Add doc and extra check for Endpoint::utilLogWrite(LogEntry)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6081 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-30 06:08:48 +00:00
Riza Sulistyo 7ba4ca7835 Close #2232: Crash on Endpoint::libDestroy() when there is an active call.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6074 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-23 22:47:05 +00:00
Sauw Ming 8ed4a1c9eb Re #2209: Add checking if expiration is specified for determining if there's an active registration
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6068 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-11 01:03:47 +00:00
Nanang Izzuddin e4d0bb45d7 Misc (re #2210): Set local media port to zero when remote media port is zero in PJSUA early SDP verification, so disabled media will not be verified, otherwise unnecessary assertion due to failure verification may be raised.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6063 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-06 01:59:50 +00:00
Nanang Izzuddin 354d7da9fa Fix #2227: Added callback for sending ACK.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6062 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-05 05:03:12 +00:00
Nanang Izzuddin 7dbfebb815 Fix #2226: Skip authentication handling in evsub module if it is already done by other module.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6060 74dad513-b988-da41-8d7b-12977e46ad98
2019-09-04 07:49:44 +00:00
Riza Sulistyo 29883b397c Close #2222: Introduce a new compiler setting to allow to use cnonce for SIP authentication without hyphen character
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6055 74dad513-b988-da41-8d7b-12977e46ad98
2019-08-28 14:13:32 +00:00
Nanang Izzuddin 737e915274 Close #2219: Initialize enum fields in PJSUA2 objects.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6051 74dad513-b988-da41-8d7b-12977e46ad98
2019-08-15 05:11:41 +00:00
Nanang Izzuddin 3464650ee0 Misc (re #2210): Added SIP transport type DLTS. Note that this is not an implementation, just for app so it can register its own implementation.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6047 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-29 02:32:55 +00:00
Nanang Izzuddin b1f400b6d4 Fix #2216: reverted back changes in ticket #2198: r6025, r5998, r5995.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6044 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-26 05:40:42 +00:00
Nanang Izzuddin 747a9c190e Re #2211: Fixed compile error in pjsip_dlg_create_uac() on MSVC2005, var declaration should be at the beginning of function.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6042 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-22 08:53:01 +00:00
Riza Sulistyo 0fe5acf5e9 Close #2211: Use group lock for SIP dialog.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6037 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-10 07:15:08 +00:00
Sauw Ming 3f58d4d10d Fixed #2209: Insufficient variable storage to contain Expires header field/ parameter
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6035 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-01 07:12:43 +00:00
Riza Sulistyo 2c5dc72dd5 Re #2210 (misc): Minor patch for SSL error message. Thanks to George Joseph for the patch.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6034 74dad513-b988-da41-8d7b-12977e46ad98
2019-07-01 05:41:29 +00:00
Nanang Izzuddin b81fd15124 Misc (re #2147): Fixed compile warnings "dynamic exception specifications are deprecated in C++11".
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6026 74dad513-b988-da41-8d7b-12977e46ad98
2019-06-12 06:00:35 +00:00
Sauw Ming 65bc26e7c1 Re #2198:
* Do not return IPv6 address for loop transport
* Fixed failed PJSIP test because of  result count mismatch due to the additional IPv6 address



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6025 74dad513-b988-da41-8d7b-12977e46ad98
2019-06-12 05:04:32 +00:00
Nanang Izzuddin 0a6ca0c45f Re #2181: Fixed incorrect index in getEncodingVideoMedia() & getDecodingVideoMedia iterations.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6024 74dad513-b988-da41-8d7b-12977e46ad98
2019-06-12 04:51:10 +00:00
Riza Sulistyo 8cefecd714 Re #2147 (misc): Fix failed pjsip-test (transport_loop_test) caused by r6002.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6021 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-31 10:13:40 +00:00
Sauw Ming 58593ba22c Fixed #2205: Use bound address for outgoing UDP SIP messages
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6015 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-29 08:02:02 +00:00
Riza Sulistyo c217c850f7 Re #2147 (misc): Fix various compilation warnings on VS2015.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6009 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-27 15:01:08 +00:00
Sauw Ming 215a173519 Re #2181: Suppressed a couple of compilation warnings.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6008 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-27 06:34:57 +00:00
Riza Sulistyo 765e804fda Close #1017: TURN TLS transport implementation.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6004 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-24 03:32:17 +00:00
Riza Sulistyo 26d59020b3 Close #2201: Restart UDP transport after replace_udp_socket fail when sending data.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6003 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-23 17:47:55 +00:00
Riza Sulistyo 7c1f2f277d Close #1019: Support for multiple listeners.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6002 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-23 17:21:59 +00:00
Sauw Ming ccba81f943 Re #2198: Fixed wrong check that can return both IPv4 and IPv6 addresses
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5998 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-23 01:18:22 +00:00
Sauw Ming 6a8a5920b6 Fixed #2198: SIP resolve to return both IPv4 and IPv6 synthesized addresses (if any) for IPv4 address literals.
- Also included in this changeset: ipv6 option of sample pjsua_app will now try IPv6 STUN, bind the account to IPv6 transport and set the IPv6 media



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5995 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-17 09:37:18 +00:00
Nanang Izzuddin 5dfa75be7d Re #2179: Wipe out memory used for storing SSL keys in PJSIP TLS transport and pjsua app. Thanks Peter Koletzki for the feedback.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5994 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-15 09:41:52 +00:00
Nanang Izzuddin f3eac1d578 Re #2181: Fixed undefined reference linking errors when PJSUA_HAS_VIDEO is not set.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5992 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-15 02:57:44 +00:00
Nanang Izzuddin 98e035a46e Re #2191: Fixed crash in SIP transport destroy due to bug introduced by r5971, i.e: group lock is set after registering tp to tpmgr, so tpmgr won't call pj_grp_lock_add_ref(), but in unregisteration, group lock is set, so tpmgr will call pj_grp_lock_dec_ref().
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5991 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-15 02:54:52 +00:00
Sauw Ming ef5ac1253f Fixed #2107: Add option to use loopback media transport in pjsua
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5989 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-15 00:09:57 +00:00
Sauw Ming 2a8a1ff81f Re #2189: Fixing various bugs:
* assertion: !Endpoint::instance().mediaExists(*this) in Media::registerMediaPort() when using AudioMedia
Sound device is already registered in the conference bridge, while AudioMediaPlayer/Recorder creation function, i.e. pjsua_player_create(), pjsua_playlist_create(), and pjsua_recorder_create() already call pjmedia_conf_add_port(), so mediaExists() will always return TRUE.

* Endpoint.mediaAdd() should check in its own internal list if the media exists, rather than querying pjsua.

* Calling Endpoint::libDestroy() first, then deleting Endpoint will cause crash, since the mutex to remove the medias has been deleted in libDestroy().
The introduction of the mutex is in r5964.

* DevAudioMedia never removes itself from mediaList, potentially causing infinite loop/crash.

* Call medias, i.e. AudioMediaHelper, also never gets removed from mediaList.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5986 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-10 08:27:22 +00:00
Sauw Ming 2e505e6a57 Re #2181: Fixed incorrect index in getAudioMedia() iteration
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5985 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-10 08:24:34 +00:00
Nanang Izzuddin bcabd15299 Re #1298: Updated PJSIP* to use PJ_ERROR consistently.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5984 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-09 08:18:18 +00:00
Nanang Izzuddin 7d75682aed Re #1298: Updated PJSUA-LIB to use PJ_ERROR or pjsua_perror when applicable.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5979 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-09 04:00:00 +00:00
Sauw Ming 481a9c32d8 Fixed #2196: Assertion due to unset sip error code when media initialization fails during incoming call
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5978 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-06 10:55:35 +00:00
Sauw Ming 4673810b64 Fixed #2195: Assertion when receiving more calls than the configured maximum
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5977 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-06 10:44:20 +00:00
Sauw Ming 316c315d97 Fixed #2194: onStreamDestroyed callback is not called upon call disconnection
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5976 74dad513-b988-da41-8d7b-12977e46ad98
2019-05-06 10:05:03 +00:00
Nanang Izzuddin 25076466c8 Fixed #2192: Update dialog local contact for non registering account.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5973 74dad513-b988-da41-8d7b-12977e46ad98
2019-04-25 08:39:49 +00:00
Nanang Izzuddin 0971e7dd7d Re #2181: Implemented video conference APIs for PJSUA2.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5972 74dad513-b988-da41-8d7b-12977e46ad98
2019-04-23 10:49:56 +00:00
Nanang Izzuddin 4ad9acd150 Fixed #2191:
- Stricter double timer entry scheduling prevention.
 - Integrate group lock in SIP transport, e.g: for add/dec ref, for timer scheduling.
 


git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5971 74dad513-b988-da41-8d7b-12977e46ad98
2019-04-23 08:42:45 +00:00
Nanang Izzuddin 8fda2f9f36 Close #2189: fixed PJSUA2 thread safety issue in list of objects manipulation.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5969 74dad513-b988-da41-8d7b-12977e46ad98
2019-04-15 10:52:16 +00:00
Riza Sulistyo 9cabb4ec5f Misc (re #2147): Add lock to prevent race condition when accessing media list.
Thanks to Niclas Larsson for the report.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5964 74dad513-b988-da41-8d7b-12977e46ad98
2019-04-08 01:24:10 +00:00
Riza Sulistyo b9f923adfc Misc (re #2147): Enable to change SIP outbound instance id when modifying account.
Thanks to Jure Erznožnik for the report.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5963 74dad513-b988-da41-8d7b-12977e46ad98
2019-04-08 01:18:17 +00:00
Sauw Ming b73c5a8350 Re #2187: Delay the creation of video capture until it is needed
Also in this commit: add PJSUA_LOCK() and UNLOCK() around access of pjsua_vid_win



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5962 74dad513-b988-da41-8d7b-12977e46ad98
2019-04-01 07:28:24 +00:00
Sauw Ming 881f21ea85 Fixed #2187: Avoid starting video capture if the setting vid_out_auto_transmit is false
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5961 74dad513-b988-da41-8d7b-12977e46ad98
2019-03-29 01:52:59 +00:00
Sauw Ming 681033652a Fixed #2186: Enable video stream keep alive mechanism
* Also add video stream port to video conf when call is on local hold in order for video stream to keep sending keep-alive.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5960 74dad513-b988-da41-8d7b-12977e46ad98
2019-03-27 01:53:57 +00:00
Nanang Izzuddin f01387d5aa Misc (re #2147): Add info and checks about Extra Audio Device supporting mono channel only.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5956 74dad513-b988-da41-8d7b-12977e46ad98
2019-03-21 08:46:13 +00:00