serfreeman1337 / asterlink

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

The clicktocall window does not appear. #14

Closed MatthewWeb closed 1 year ago

MatthewWeb commented 1 year ago

изображение изображение изображение изображение

In asterisk ami there is also no empty space.

serfreeman1337 commented 1 year ago

If you type http://192.168.2.129:5678/ws/ in browser does it also return 404 ?

MatthewWeb commented 1 year ago

Yes. SuiteCRM v. 7.12.8

serfreeman1337 commented 1 year ago

What about curl -v http://127.0.0.1:5678/ws/ on the asterlink machine ?

Expected result:

curl -v http://127.0.0.1:5678/ws/
*   Trying 127.0.0.1:5678...
* Connected to 127.0.0.1 (127.0.0.1) port 5678 (#0)
> GET /ws/ HTTP/1.1
> Host: 127.0.0.1:5678
> User-Agent: curl/7.86.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 403 Forbidden
< Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, X-AsterLink-Token
< Access-Control-Allow-Methods: POST, GET, OPTIONS
< Access-Control-Allow-Origin: *
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Tue, 20 Dec 2022 15:33:39 GMT
< Content-Length: 45
< 
token contains an invalid number of segments
* Connection #0 to host 127.0.0.1 left intact
MatthewWeb commented 1 year ago

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

127.0.0.1
Apache

MatthewWeb commented 1 year ago

изображение изображение

I don't have this option. That's probably the point.

serfreeman1337 commented 1 year ago

That's apache webserver on this port which is weird. Is ./asterlink process really running on the 5678 port ?

As I see from first screenshot, Enabling web server addr="0.0.0.0:5678" means 5678 tcp port is listening by asterlink process and there is no way apache whould bind to that address.

Do you run asterlink process and suitecrm on separate machines ?

MatthewWeb commented 1 year ago

изображение Yes. When starting asterlink on a server with ip 192.168.2.129, this error.

serfreeman1337 commented 1 year ago

On suitecrm module's settings page in Endpoint URL and WebSocket URL fields you need to specify ip of machine where asterlink process is running.

You can also try to use another port like 51034: conf.yml:

   endpoint_addr: "0.0.0.0:51034"

Then update port on module's settings page as well.

MatthewWeb commented 1 year ago

изображение There is some progress. But there is still no clicktocall window

serfreeman1337 commented 1 year ago

Please show browser console when you click on a number. (as I see on 2-nd screen, click2call tries to send dial request)

MatthewWeb commented 1 year ago

изображение

serfreeman1337 commented 1 year ago

I see click2call request was successfully sent. You shoud get a popup card once you receive call on 999 extension. (since click2call first rings user extension and after answer asterisk will dial clicked number)

MatthewWeb commented 1 year ago

изображение Everything is fine. It remains to configure dialplan. The last question, through https can I somehow make it work? Swears at the certificate.

serfreeman1337 commented 1 year ago

You need to use domain instead of ip for https.

MatthewWeb commented 1 year ago

изображение изображение изображение I'll deal with ssl later. Dialplan does not accept. The call goes through telnet.

serfreeman1337 commented 1 year ago

dial-context in conf.yml is the click2call context to place calls. In your setup it should be:

  dial_context: call-out
Probably correct dialplan configuration but I'm not sure: ``` dialplan: incoming_context: - call-in outgoing_context: - call-out ext_context: - default dial_context: call-out ```

Note that asterlink higly relies on dialplan. Check basic-pbx dialplan example.

MatthewWeb commented 1 year ago

Thanks a lot! Everything worked out and the calls went! Thanks for your hard work!