Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOF error #16

Open
shep-k-a opened this issue Oct 2, 2023 · 7 comments
Open

EOF error #16

shep-k-a opened this issue Oct 2, 2023 · 7 comments

Comments

@shep-k-a
Copy link

shep-k-a commented Oct 2, 2023

PBX Version:16.0.40.4
PBX Distro:12.7.8-2306-1.sng7
Asterisk Version:18.19.0
SuiteCRM 8.4.0

When installing the module in a clean SuiteCRM, the module works fine.
I am making changes in my SuiteCRM and since then I get an EOF error in the asterlink module on FreePBX.
What could this be related to?

Deleting /extensions/asterlink, /cache and even completely reinstalling the module does not give results
1

@serfreeman1337
Copy link
Owner

serfreeman1337 commented Oct 2, 2023 via email

@shep-k-a
Copy link
Author

shep-k-a commented Oct 2, 2023

I have 4 users, all with an extension. OK, this is a test thread, so I deleted all users except the administrator. The extension is specified. The error does not go away. How can I track it?

@serfreeman1337
Copy link
Owner

image

"204 Not Content" (and hence nondescript "End Of File" error) will happen if this query returns no results:

case 'get_ext_users':
$r = BeanFactory::getBean('Users')->get_list("", "asterlink_ext_c IS NOT NULL AND asterlink_ext_c != ''");
foreach($r['list'] as $user) {
$response[$user->asterlink_ext_c] = $user->id;
}
break;

You can try to run this query manually to see if there is any results:
SELECT user_name,users_cstm.asterlink_ext_c FROM users LEFT JOIN users_cstm ON users_cstm.id_c = users.id;'

@shep-k-a
Copy link
Author

shep-k-a commented Oct 3, 2023

Here is the answer and it seems logical

image

This is the log of the initial launch with a clean SuiteCRM 8.4.0

level=info msg=AsterLink
level=info msg="Setting log level" fields.level=trace
level=info msg="Using SuiteCRM Connector"
level=trace method=GET suite=true url="http://crm.local/index.php?entryPoint=AsterLinkEntryPoint&action=get_ext_users"
level=trace msg="200 OK" method=GET suite=true url="http://crm.local/index.php?entryPoint=AsterLinkEntryPoint&action=get_ext_users"
level=info msg="User list updated" suite=true users="map[1001:1]"
level=info msg="Enabling web server" addr="192.168.1.139:5678" suite=true
level=info msg="Established connection with AMI" fields.msg="Asterisk Call Manager/7.0.3"

After I change my SuiteCRM (adding users, changing standard modules, etc.) I get this error.

level=info msg=AsterLink
level=info msg="Setting log level" fields.level=trace
level=info msg="Using SuiteCRM Connector"
level=trace method=GET suite=true url="http://crm.local/index.php?entryPoint=AsterLinkEntryPoint&action=get_ext_users"
level=trace msg="204 No Content" method=GET suite=true url="http://crm.local/index.php?entryPoint=AsterLinkEntryPoint&action=get_ext_users"
level=error msg=EOF suite=true
level=info msg="Enabling web server" addr="192.168.1.139:5678" suite=true
level=info msg="Established connection with AMI" fields.msg="Asterisk Call Manager/7.0.3"

I really liked the work of your module, but this error prevents it from being put into operation

@serfreeman1337
Copy link
Owner

SELECT user_name,users_cstm.asterlink_ext_c FROM users LEFT JOIN users_cstm ON users_cstm.id_c = users.id;'
Here is the answer and it seems logical

Does this query return the same result after adding more users/changing modules ?
You didn't install any other 3rd party modules ?

@shep-k-a
Copy link
Author

Hello, I'm sorry, I was going on vacation, so I couldn't answer.
I couldn’t figure out the problem on version SuiteCRM 8; I didn’t install any third-party modules. That is, only crm and asterlink.
But, yesterday, for testing, I tried the latest version of SuiteCRM 7 (7.14.1) and to be honest, I liked the speed of work more than in the 8th version and the Asterlink works fine, but 2 questions arose:

  1. Is it normal that every time you refresh the page or switch to another module, asterlink breaks and re-establishes the connection on the new port? (when testing SuiteCRM 8 this did not happen, the connection occurred only during authorization and disconnection after logging out)
    image

  2. How can I create a connection between calls through asterlink and contacts created through the asterlink button?
    image

I click on ---create --- when making a call, I create a contact, but in the “Calls” module the “Contact” and “Related to” fields are still empty.
image

Thank you in advance

@serfreeman1337
Copy link
Owner

serfreeman1337 commented Oct 21, 2023

  1. Yes. SuiteCRM 7 reloads pages when you switch between them. It shouldn't be a problem. Also some modules support AJAX loading (like Leads or Contacts) and switching between them should keep the connection.
    Also opening another tab should keep the connection as well.

  2. Current "--- create ---" button only opens "create" form and populates phone filed, nothing more. It will be improved in the next releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants