serfreeman1337 / asterlink

Asterisk integration with Bitrix24 and SuiteCRM
MIT License
27 stars 18 forks source link

new to suitecrm and your module #9

Open f1-outsourcing opened 2 years ago

f1-outsourcing commented 2 years ago

The readmes is are not really clear how this supposed to work if you are quite new. Currently I am using the odoo crap and that connects directly to asterisk for similar functionality (although as everything there, buggy). So I do not really get why it is necessary to have a process running, or is the zip file enough?

serfreeman1337 commented 2 years ago

It's designed such way that process communicates with asterisk via ami, it monitors for calls/requests and then sends info to suitecrm. On the suitecrm side module is need for frontend tweaks (call card/click2call) and api for call logging.

asterisk <-- (ami) --> asterlink process <-- (http/ws via module) --> suitecrm

So running process is necessarry.

f1-outsourcing commented 2 years ago

What would be the minimum required permissions for the asterisk manager, currently I just grabbed something from the internet

read = all,system,call,user,dtmf
write = all,system,call

because with these asterlink would not start.

read =
write = originate,reporting
f1-outsourcing commented 2 years ago

method=POST suite=true url="http://crm.xxxxxxx.xxx/instance/index.php?entryPoint=AsterLinkEntryPoint&action=create_call_record" TRAC[0570] 404 Not Found

http://crm.xxxxxx..xxx/instance/index.php also gives error

f1-outsourcing commented 2 years ago

in the module configuration in suitecrm I would also make better clear what settings are related to suitecrm side and what settings are related to asterlink

Also put working default values. It is easier to replace hostnames than figure out what needs to be entered in empty fields, if it needs to be the hostname of asterlink or suitecrm or voip server.

enpoint settings? endpoint in suitecrm or end point of asterlink???

serfreeman1337 commented 2 years ago

What would be the minimum required permissions for the asterisk manager, currently I just grabbed something from the internet

read = call,dialplan,originate
write = system,originate

http://crm.xxxxxx..xxx/instance/index.php also gives error

suitecrm:
url: http://my.suitecrm/instance/
...

It's an example for suitecrm installed in subfolder /instance/ in the webserver fodler. Set it to http://crm.xxxxxx..xxx/, if suitecrm installed in the root of webserver folder (htdocs/html).

enpoint settings? endpoint in suitecrm or end point of asterlink???

It's asterlink endpoint settings. User's browser will connect to asterlink (for call card or click2call) using those URL. I.e. asterlink needs to be available for user, either directly or by apache2/nginx proxy.

5678 is default port from endpoint_addr in conf.yml

f1-outsourcing commented 2 years ago

yes removing the /instance/, i have the call logged.

Is there also functionality that asterisks gets the Caller name from suitecrm so it can add this to the sip callerid, so it the name will be displayed on the phone?

serfreeman1337 commented 2 years ago

No at this moment. I will add it in next release.

f1-outsourcing commented 2 years ago

No at this moment. I will add it in next release.

COOL! :)

f1-outsourcing commented 2 years ago

No at this moment. I will add it in next release.

Is the new release also for suitecrm 8?

f1-outsourcing commented 2 years ago

I am not getting the calls connected to accounts/contacts, I assume this can be realized with the relationship settings? But I can't seem to find what would be a good module to choose. Eg. I have no idea what the difference is between 'Related to Leads' or 'Leads'.

serfreeman1337 commented 2 years ago
Module configuration example ![image](https://community.suitecrm.com/uploads/default/original/2X/8/89e1505e32f1aeb7a9f683c36696f16b7c479c42.png)

If i recall correctly, "related to" shows that it's a primary module in relation to "Calls" module.
https://docs.suitecrm.com/admin/administration-panel/studio/#_relationships

It can be verified by looking at "Calls" module relationships in studio. For contacts just "Contacts" needs to be selected, because "Calls" is primary in that case, but for leads it's otherwise, since "Leads" is primary in relationship.

Contacts: Calls -> Contacts (Calls is primary module) Related to Leads: Calls <- Leads (Leads is primary module) Also I remember that there was a hardcoded relationships in suitecrm regarding to "Contacts" module, so "Related to Contacts" may also be displayed, but "Contacts" needs to be selected to match "Calls" primary module module relationships in studio.

Is the new release also for suitecrm 8?

Yes, I'm aiming to add v8 support in 0.5 release, but can't tell any ETA.

f1-outsourcing commented 2 years ago

suitecrm8 did not work properly, even when I installed the zip file. I noticed at least one form input variable not being verified and just dumped in a htaccess file. Also this speed is still not fixed in 8.1.2 as this Paul is complaining about in 2021[1], it was even annoying to me. So I am back on suitecrm7.

[1] https://www.youtube.com/watch?v=Knt6U5ga4nI

f1-outsourcing commented 2 years ago

Currently my call logs are having an incorrect date_end (they are all the same as date_start) at first I thought it could be a permission issue due to incorrectly configured asterlink conf. However I noticed that the duration fields are set, could this be a bug? Also that these calls initiate on 00 seconds looks not ok to me.

0   2022-06-28 10:07:00 2022-06-28 10:07:00
0   2022-06-28 10:06:00 2022-06-28 10:06:00
0   2022-06-28 10:06:00 2022-06-28 10:06:00
19  2022-06-28 08:42:00 2022-06-28 08:42:00
34  2022-06-28 07:55:00 2022-06-28 07:55:00
serfreeman1337 commented 2 years ago

asterlink process logs correct time for date_start, date_end ie:

time="2022-06-26T19:44:14+02:00" level=trace msg="map[data:map[asterlink_call_seconds_c:17 date_end:2022-06-26 17:44:14 duration_hours:0 duration_minutes:1 status:]

but in suitecrm it's 00 seconds ?

f1-outsourcing commented 2 years ago

Yes the above is from the suitecrm database. You can notice the date_modified, so the modification of the records is being received.

date_entered    date_modified   modified_user_id    created_by  description deleted assigned_user_id    duration_hours  duration_minutes    date_start  date_end
2022-06-28 10:07:20 2022-06-28 10:08:12 (null)      (null)  false       0   0   2022-06-28 10:07:00 2022-06-28 10:07:00

This is logged by asterlink, look how the time is the same as the modified date field, so I guess the suitecrm module does not update it?

e msg="map[data:map[asterlink_call_seconds_c:52 date_end:2022-06-28 10:08:12

f1-outsourcing commented 2 years ago

@serfreeman1337 You also have this? Or I am just the lucky only one having this? I was searching your code where the date_end field is updated but can not really find it.

serfreeman1337 commented 1 year ago

Is there also functionality that asterisks gets the Caller name from suitecrm so it can add this to the sip callerid, so it the name will be displayed on the phone?

This can be achieved with "CID Superfecta" freepbx module. Configure "SugarCRM" Data Source in superfecta scheme and enable superfecta lookup for inbound route.

adroit48Dev commented 7 months ago

Hi, I'm getting the https://xxx.xxx.com/originate -> 404 not found an error in the console, when I tried to initiate a call from suitecrm.

conf.yml

suitecrm: url: https://crm.xxxx.com/ endpoint_token: suitetokenxxxx endpoint_addr: "0.0.0.0:5678"

Mentioned the same on the Suitecrm module page.