Use 3CX WebAPI via an agent's browser.
This option controls how the app connects to 3CX WebAPI, e.g., to place outbound calls.
-
Unchecked: The API calls will be made through our AWS cloud. In this case, connections from the AWS cloud shoud be allowed.
Main app IP: 15.236.161.87 (Admin configuration)
AWS IP ranges: (please contact support)
-
Checked: The connection will be made via the agent's browser. This option exposes the WebAPI access token to agents and should be used only if you can't open 3CX server from AWS cloud.
To use a direct connection via the agent's browser, you must modify the 3cx server nginx configuration:
Edit nginx conf file (this operation must be performed every time 3CX is updated)
After
client_max_body_size 300m;
root "C:/ProgramData/3CX/Data/Http/wwwroot";
add
location ~ ^/webapi/?(.*) { if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Headers "origin, authorization, accept, X-Progress-ID"; add_header Content-Length 0; add_header Content-Type text/plain; return 200; } proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Access-Control-Allow-Headers "origin, authorization, accept, X-Progress-ID"; add_header Access-Control-Allow-Origin *; proxy_pass http://127.0.0.1:8081/webapi/$1$is_args$args; proxy_buffering off; }
and restart Nginx
systemctl restart nginx
Comments
0 comments