Commit Graph

26 Commits

Author SHA1 Message Date
frytimo
2cbb4dbc31 remove instances where a pointer is used in a foreach loop for value (#7108) 2024-08-22 12:41:10 -06:00
frytimo
9f204a7cac move explode of $line inside of if block to fix php warning for line 93 (#6842) 2023-12-07 18:38:57 -07:00
frytimo
3a4c2f72e2 Event socket bug fix and more docs (#6823)
* Add documentation to methods. Use is_resource for added type detection

* Allow connect to specify timeout in microseconds with default 30,000

* Update calling mechanism for event sockets

* Update project for new singleton event sockets

* remove unused variable

* catch errors on closing the socket
2023-12-02 17:16:18 -07:00
FusionPBX
7ab357380b simplify the while statement 2023-09-27 23:30:18 -06:00
FusionPBX
bf8c6f8078 Simplify event_socket code 2023-09-27 23:23:56 -06:00
FusionPBX
bf47bbcc47 Event Socket settings auto defaults or custom using config.conf 2023-09-16 15:07:41 -06:00
FusionPBX
88b43cfa14 If no handle return false
Splitting up the condition and return false for each condition works in all tests.
2022-10-20 16:18:55 -06:00
FusionPBX
0a25c48b5d event socket make fp public 2022-10-13 12:52:52 -06:00
FusionPBX
58d0a1ad8c Make sure resource exists before using feof
This code changes prevents this error.

Warning: feof() expects parameter 1 to be resource, bool given
2022-10-13 11:26:53 -06:00
FusionPBX
4d8496f4ad Fix the event socket connected method
It was not detecting the connection to event socket correctly. 
This change resolve the high cpu usage for event guard.
2022-10-04 12:36:27 -06:00
FusionPBX
a43388bace Increase the timeout to 30000 microseconds.
30,000 Microseconds = 0.03 Seconds. Longer timeout reduces the CPU. If the timeout is too long then the Status -> SIP STATUS page will take longer to load.
2022-08-27 16:45:07 -06:00
frytimo
09dbdfb79f Removed usleep command (#6468)
* Removed usleep command

* Update event_socket.php
2022-08-26 16:53:25 -06:00
FusionPBX
b8f1eb7f10 Add function to check if we are connected to event soscket 2022-08-26 11:48:47 -06:00
FusionPBX
7a71f0bf0a Less CPU used to listen to event socket. 2022-07-31 10:15:42 -06:00
FusionPBX
fe099e4dfb Update event_socket.php 2022-02-14 14:08:46 -07:00
FusionPBX
2e62e0316b Set this value to 20.
Improves page load times for pages using event socket.
2022-02-14 11:55:10 -07:00
FusionPBX
7c6ed79d6c usleep 1 million is 1 second 2021-11-26 21:30:39 -07:00
FusionPBX
7c3675107d Update event_socket.php 2019-09-24 18:14:43 -06:00
chansizzle
16e08250bf Update event_socket.php (#4652)
removes potential "Warning: fsockopen(): unable to connect to 127.0.0.1:8021 (Connection refused)"
2019-09-24 16:40:31 -06:00
FusionPBX
95c36e4d35 Update event_socket.php 2017-01-11 14:43:45 -07:00
FusionPBX
da9cd4cbcf Update event_socket.php
Add freeswitch defaults to event_socket.php
2017-01-11 14:14:47 -07:00
Harry G. Coin
cc553a70c5 Cleanups.
Remove default 192.168.42.42/32 allow.
Restore missing app/fax/resources/functions/parse_attachments.php to satisfy pre-existing include
Fix so sql in voicemail app works if var undefined.  Warning: don't know if non Mariadb's like cast(...) .
Cleanup close in event socket.
2016-04-25 22:16:19 -05:00
Harry G. Coin
bda6861f88 \r\n --> \n
Cause all the .php files containing lines ending with \r\n to instead end with \n.

DYI with:

find fusionpbx -type f -name '*.php' -exec dos2unix '{}' \;
2016-04-25 20:30:23 -05:00
Harry G. Coin
8abe003a71 The goal is to increase confidence in fusionpbx, one step is to run by default with error_reporting (E_ALL ^ E_NOTICE);
So, please find in this set numerous small changes which eliminate numerous php warning messages.

Also, a small bug fix in an sql statistics routine, naming a count(*) field as count, so displaying correct detail.

If any of the proposed changes are omitted, the relevant page will experience php warnings.

There are no doubt fusionpbx pages I've yet to visit that still generate warnings, this set is nearly certainly not comprehensive.
2016-04-25 20:19:58 -05:00
markjcrane
b5fbf389dd Change the switch class to freeswitch. 2016-04-02 19:37:37 -06:00
markjcrane
637a3fadb5 Rename the EventSocket file to math current naming standard. 2016-04-02 19:24:32 -06:00