504 Commits

Author SHA1 Message Date
Andrey Volk
79ce088101
[Core] Coverity: Dereference before null check
* [Core] Coverity: 1060958 Dereference before null check

* [Core] Coverity: 1024236 Dereference before null check
2023-10-05 00:26:26 +03:00
Andrey Volk
c4115537e0
[Core] Coverity: Use of 32-bit time_t
* [Core] Coverity: 1500270 Use of 32-bit time_t

* [Core] Coverity: 1500229 Use of 32-bit time_t

* [Core] Coverity: 1500235 Use of 32-bit time_t

* [Core] Coverity: 1500244 Use of 32-bit time_t

* [Core] Coverity: 1500250 Use of 32-bit time_t

* [Core] Coverity: 1500245 Use of 32-bit time_t

* [Core] Coverity: 1500255 Use of 32-bit time_t

* [Core] Coverity: 1500370 Use of 32-bit time_t

* Cleanup
2023-10-04 18:24:16 +03:00
Jakub Karolczyk
bb9afcb388
[core] Coverity fixes
* [core] Coverity 1518099, 1518097, 1518098 (Unchecked return value from library)

* [core] Coverity 1468551 Unchecked return value

* [core] Coverity 1468293 Unchecked return value

* [core] Coverity 1468274 Explicit null dereferenced

* [core] Coverity 1395588 Unchecked return value

* [core] Coverity 1395515 Logically dead code

* [core] Coverity 1364984 Result is not floating-point

* [core] Coverity 1395554, 1468440 Dereference before null check

* [core] Coverity 1024487 Dereference after null check

* [core] Coverity 1024872 Unchecked return value

* [core] Coverity 1025822 Unchecked return value

* [core] Coverity 1025823 Unchecked return value

* [core] Coverity 1087637, 1346467, 1087638 Unchecked return value

* [core] Coverity 1107607 Unchecked return value

* [core] Coverity 1210777 Unchecked return value

* [core] Coverity 1227670 Dereference before null check

* [core] Coverity 1024551 Logically dead code

* [core] Coverity 1024560 Logically dead code

* [core] Coverity 1024664 Operands don't affect result

* [core] Coverity 1364957 Dereference after null check

* [core] Coverity 1395572 Logically dead code

* [core] Coverity 1412459 Unchecked return value

* [core] Coverity 1412490 Unchecked return value

* [core] Coverity 1395515/2 Logically dead code

* [core] Coverity cleanup
2023-09-08 20:17:57 +03:00
Jakub Karolczyk
55f2dc4759
[core] Coverity fixes
* [core] Coverity CID 1024233 (Dereference before null check)

* [core] Coverity CID 1024239 (Dereference before null check)

* [core] Coverity CID 1024242 (Dereference before null check)

* [core] Coverity CID 1024243 (Dereference before null check)

* [core] Coverity CID 1024453 (Dereference before null check)

* [core] Coverity CID 1024554 (Logically dead code)

* [core] Coverity CID 1024868 (unchecked return value from library)

* [core] Coverity CID 1024869 (unchecked return value from library)

* [core] Coverity CID 1468281 (Dereference before null check)

* [core] Coverity CID 1024238 (Dereference before null check)

* [core] Coverity CID 1468621 (Copy into fixed size buffer)

* [core] Coverity CID 1024871 (Unchecked return value)
2023-07-21 13:49:40 +03:00
Dragos Oancea
48b8b0c4d7
[Core] Coverity fixes
* [core] coverity CID 1395504 (Logically dead code)

* [core] coverity CID 1395581 (Dereference before null check)

* [core] coverity CID 1346451 (Improper use of negative value)

* [core] coverity CID 1395497 (Dereference before null check)

* [core] coverity CID 1468458 (Dereference before null check)
2023-03-29 19:08:18 +03:00
agree
81046e943a [core] switch_ivr_originate set originate endpoint used
This commit introduces a new channel variable that sets the channel endpoint used by the originate. This is particulary useful when using `execute_on_originate` that will execute multiple times when using fake endpoints as `user/` or `group/`. With this variable, a user can determine which endpoint is being used by the originate, and whether they want to process it.
2023-02-26 21:50:51 -05:00
Andrey Volk
ded2a4c1be [Core] Fix crash in enterprise originate: memory fence the handles. 2022-11-30 23:22:01 +03:00
Dragos Oancea
8e59603d98 [core][mod_sofia] remove ZRTP (deemed obsolete).
[unit-tests][build-system][docs] remove references to ZRTP.
2022-10-28 20:19:42 +03:00
Zvonimir Bužanić
92caab3647
[core] Fix wrong reason code for group call 2022-10-26 20:53:01 +03:00
Andrey Volk
56b6e954cf [Core] Fix dead nested assignments 2022-08-09 23:29:31 +03:00
Seven Du
01b92f00bb [core] add peer uuid to originate log 2021-10-23 21:59:57 +03:00
Andrey Volk
67048377c4 [Core] Fix possible dereference of null pointer in switch_ivr_originate() and switch_ivr_enterprise_originate() 2021-10-19 20:35:10 +03:00
Andrey Volk
4b03a47a7f [Core] Fix dereference of null pointer in switch_ivr_wait_for_answer() 2021-10-19 20:35:10 +03:00
Andrey Volk
f6f3f38d25 [Core] Fix bridge_early_media 2021-07-09 17:53:30 +03:00
Chris Rienzo
e3a6ec86f8 [core] Update switch_ivr_enterprise_originate() to accept optional switch_dial_handle_list_t instead of dialstring. 2021-03-23 20:23:28 +03:00
Andrey Volk
22ae5a1ba1 [Core] Fix memory leak of local_var_event in switch_ivr_originate() when caller_channel is not ready. 2021-03-17 00:53:55 +03:00
phonecomwire
3c5773719e [Core] Adding fix for switch_ivr_originate to not copy group_confirm variables to the channel 2021-03-16 20:19:39 +03:00
Andrey Volk
661f653956 [Core] Fix OSX build in switch_ivr_originate.c 2020-05-08 01:21:24 +04:00
Seven Du
0cafcf8a9b [core] Add global/leg variable to originate: group_confirm_timeout
group_confirm_timeout is a value in seconds for the maximum time to wait for group confirmation to finish.  This variable replaces group_confirm_cancel_timeout which has been deprecated.  Set group_confirm_timeout=0 to disable leg_timeout during group confirm.
2020-05-08 01:17:22 +04:00
Seven Du
fcda4c6a06 [core] add support to set group confirm on each leg 2020-05-08 01:11:44 +04:00
Mike Jerris
bfd02beef8 [core] refactor originate internals (oglobals) 2020-05-08 00:28:57 +04:00
Dragos Oancea
0e6a15419d [core] scan-build: Value stored to 'myflags' during its initialization is never read - switch_ivr_originate() 2020-02-12 21:49:43 +00:00
Dragos Oancea
4fce39bd78 [core] scan-build: Value stored to 'file' is never read 2020-01-30 18:01:00 +00:00
Andrey Volk
1486e84aa2 [Core] Fix dereference of null pointer in switch_ivr_originate and switch_ivr_enterprise_originate causing crashes, add unit test. 2019-12-31 02:31:26 +04:00
Seven Du
8aafff281b [Core] Make switch_ivr_orig_and_bridge function return status and a cause. 2019-10-30 21:07:54 +04:00
Chris Rienzo
fb695c528e FS-11893 [core] add switch_dial_handle_create_json() and switch_dial_handle_serialize_json() for dial handle/json conversions 2019-07-18 00:09:20 +04:00
Chris Rienzo
12ce8dd34b FS-11818 [core] fix memory leak when using dial handle in switch_ivr_originate() 2019-07-17 23:04:02 +04:00
Andrey Volk
c86f66436e FS-11792: [core] Fix memory leak in switch_ivr_originate.c 2019-04-23 17:54:49 +04:00
Mike Jerris
a4db3a4355 Merge pull request #1491 in FS/freeswitch from ~HUNYI/freeswitch:feature/FS-8900-improve-record_follow_transfer to master
* commit '069da397f5b9e7adb10c2c9d8d03f83d195dae37':
  Improve recording transfer
2018-09-05 22:34:38 +00:00
Anthony Minessale
d3e320ef56 FS-11346: [core] add api to pass pre-parsed values instead of dial strings to switch_ivr_originate
SWITCH_DECLARE(switch_status_t) switch_dial_handle_create(switch_dial_handle_t **handle);
SWITCH_DECLARE(void) switch_dial_handle_destroy(switch_dial_handle_t **handle);
SWITCH_DECLARE(void) switch_dial_handle_add_leg_list(switch_dial_handle_t *handle, switch_dial_leg_list_t **leg_listP);
SWITCH_DECLARE(void) switch_dial_leg_list_add_leg(switch_dial_leg_list_t *parent, const char *dial_string, switch_dial_leg_t **legP);
SWITCH_DECLARE(void) switch_dial_handle_add_global_var(switch_dial_handle_t *handle, const char *var, const char *val);
SWITCH_DECLARE(void) switch_dial_handle_add_global_var_printf(switch_dial_handle_t *handle, const char *var, const char *fmt, ...);
SWITCH_DECLARE(switch_status_t) switch_dial_handle_add_leg_var(switch_dial_leg_t *leg, const char *var, const char *val);
SWITCH_DECLARE(switch_status_t) switch_dial_handle_add_leg_var_printf(switch_dial_leg_t *leg, const char *var, const char *fmt, ...);
SWITCH_DECLARE(int) switch_dial_handle_get_peers(switch_dial_handle_t *handle, int idx, char **array, int max);
SWITCH_DECLARE(int) switch_dial_handle_get_vars(switch_dial_handle_t *handle, int idx, switch_event_t **array, int max);
SWITCH_DECLARE(switch_event_t *) switch_dial_handle_get_global_vars(switch_dial_handle_t *handle);
SWITCH_DECLARE(switch_event_t *) switch_dial_leg_get_vars(switch_dial_leg_t *leg);
SWITCH_DECLARE(int) switch_dial_handle_get_total(switch_dial_handle_t *handle);
SWITCH_DECLARE(void) switch_ivr_orig_and_bridge(switch_core_session_t *session, const char *data, switch_dial_handle_t *dh);

add switch_dial_handle_t *dh to end of args for switch_ivr_originate
2018-08-22 18:20:13 +00:00
Anthony Minessale
cfd7761e9f FS-10896: [freeswitch-core] Parse error on originate syntax with nested square brackets #resolve 2018-07-24 07:21:39 +00:00
Hunyadvári Péter
069da397f5 Improve recording transfer
Use the same method everywhere
Move the bug without stopping and starting the recording over
It was broken in some circumstances and also some settings were lost

FS-8900 --resolve
2018-03-20 09:20:37 +01:00
Mike Jerris
8fa59c995d Merge pull request #1374 in FS/freeswitch from ~MOCHOUINARD/freeswitch:bugfix/FS-10608-patch-change-hard-coded-60-value to master
* commit '348c2c42bb9d366b3c5a36fa4a377bbf8286d3c6':
  FS-10608: Change 60 second timeout value to a global #define SWITCH_DEFAULT_TIMEOUT
2017-09-08 17:29:14 +00:00
Anthony Minessale
3c524021ca FS-10637: [core] FreeSWITCH crash in 'enterprise originate' API caused due to fix done for FS-10596 #resolve 2017-09-01 11:19:34 -05:00
Marc Olivier Chouinard
348c2c42bb FS-10608: Change 60 second timeout value to a global #define SWITCH_DEFAULT_TIMEOUT 2017-08-29 13:54:34 -04:00
Mike Jerris
e7269d7389 FS-10596: [core] include opposite caller profiles in cdr when doing enterprise originate 2017-08-17 16:47:58 -04:00
Ken Rice
53116495d1 Revert "FS-10416: [mod_commands] add new outbound channels to an in-progress originate"
This commit causes a segfault when parsing destinations that are |
delimited. This patchset needs to be tested further before inclusion
into the tree.

This reverts commit b11955db0bfdcccd5ad98fd689870153d31154f3.
2017-07-11 17:25:48 -05:00
Hristo Trendev
b11955db0b FS-10416: [mod_commands] add new outbound channels to an in-progress originate
This allows new endpoints (outbound channels) to be called, after an originate
is already in progress, where any of the originally called endpoints need to
continue to ring.

One use case would be to convert a 302 Moved Temporarily destination to SIP
endpoint(s) and then to add the new endpoints to an in-progress originate,
without cancelling any of the other (already ringing) outbound channels.
2017-06-21 19:31:46 +02:00
Anthony Minessale
bbd87e4a67 FS-10328: [freeswitch-core] Add method to allow orphaned B legs during originate to transfer to another extension 2017-05-19 19:05:44 -05:00
Anthony Minessale
c70fc7a940 FS-10328: [freeswitch-core] Add method to allow orphaned B legs during originate to transfer to another extension #resolve 2017-05-18 11:57:37 -05:00
Anthony Minessale
35865bd90c FS-10118: [freeswitch-core] Race conditions from lack of error checking in switch_core_session_read_lock #resolve 2017-03-09 13:22:25 -06:00
Sergey Safarov
df1ab07ca4 FS-9924: Removed extra space in source files 2017-02-09 23:59:49 -05:00
Anthony Minessale
0db3a2febe FS-9932: [freeswitch-core] Error with group confirm feature combined with enterprise originate #resolve 2017-01-10 16:06:33 -06:00
Chris Rienzo
11452979f6 FS-9696 keep pickup endpoint up if another endpoint in dialstring hangs up and leg_timeout is set on the pickup endpoint 2016-11-03 16:39:43 -04:00
Mike Jerris
7c75cf7300 FS-9484: fix var type format spec 2016-09-08 04:03:18 -04:00
Chris Rienzo
4620f1070c FS-9472 [core] Add originate_retry_timeout and originate_retry_min_period_ms
originate_retry_timeout : maximum duration in seconds to allow retry attempts to occur.
        On expiration, this will not stop an in progress attempt, it will only prevent a
        retry attempt from starting. This value works together with originate_retries.

  originate_retry_min_period_ms : minimum spacing between retry attempts.  This prevents
        retries from flooding an enpoint when it rejects quickly.
2016-09-01 10:59:06 -04:00
Anthony Minessale
9fe7c48df7 FS-9390 #resolve ['Segmentation fault' during call setup] 2016-07-28 16:27:17 -05:00
Chris Rienzo
94c11e41d2 FS-8806 Change group_confirm_cancel_timeout to apply only to the legs that answer the call. 2016-02-17 11:19:04 -05:00
Anthony Minessale
ad696ccabf FS-8612 #resolve [rare ivr originated calls crash due to read codec leak] 2015-12-04 10:33:41 -06:00
Anthony Minessale
a0b009e353 FS-8338 #resolve [Ringback does not work correctly on stereo channels] 2015-10-12 17:00:13 -05:00