Solved Avaya phone will not provision with recent 3CX version, "No call server address", bad web browser?

Status
Not open for further replies.

yesh459

Free User
Joined
Aug 21, 2022
Messages
2
Reaction score
0
I am not entirely sure when this started occurring (currently running v18.0.4.965), but my Avaya 96xx phone rebooted the other day, and it wouldn't provision itself (it just said "no call server address").

After doing a tcpdump to watch the DHCP + HTTP provisioner traffic from my phone to my 3CX PBX, I noticed the phone is getting an invalid response from the server:

I can easily reproduce this by sending a CURL with the same User-Agent string the phone is using to the 3CX PBX web server:

Code:
curl -i --http1.1 http://172.16.254.200/provisioning/xxxxxxxxxxxx/96xxupgrade.txt -H 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0)'
HTTP/1.1 200 OK
Server: nginx
Date: Sun, 21 Aug 2022 20:38:00 GMT
Content-Type: application/octet-stream
Content-Length: 228
Connection: keep-alive
Content-Type: text/html

<html><body><h1>Unfortunately, you are using an outdated and unsupported browser.<br>Please upgrade your browser to improve your experience and security.<br>Supported browsers: Chrome, Edge, Safari or Firefox.</h1></body></html>

To alleviate this, I think it might be good to adjust the NGINX rules to something like this (which will disable the out-dated browser check for /provisioning, but leaves it in place for the rest of the UI):

Code:
# /var/lib/3cxpbx/Bin/nginx/conf/snippets/40-common.conf
#
# After this stanza:
if ($http_user_agent ~ "MSIE|Trident" ) {
    set $test "outdated";
}

# Add this:
if ($request_uri ~ ^/provisioning) {
        set $test "provisioning";
}

# So this check statement will never be reached when anything under /provisioning/... is requested
if ($test = "outdated") {
    rewrite  ^  /outdated break;
}

Of course, I made this change locally (and there's probably a much better way to do this--I just needed a quick fix to get my phones provisioning again), but it will only last until the next time 3CX is updated :).

Thanks for such a great product, I've been using 3CX for YEARS, and this is the first (minor) issue I've run into--keep up the good work!
 
Last edited by a moderator:
I appreciate the pointer, but I don't have the ability to run a whole new webserver for my phones.

I fixed the issue by patching using this patch:

Diff:
--- 40-common.conf.orig 2022-09-29 18:25:52.277357227 -0700
+++ 40-common.conf      2022-09-29 18:26:06.905764782 -0700
@@ -12,6 +12,10 @@
     set $test "outdated";
 }
 
+if ($request_uri ~ ^/provisioning) {
+        set $test "provisioning";
+}
+
 if ($test = "outdated") {
     rewrite  ^  /outdated break;
 }

Uploading to /tmp/40-common.conf.patch, and then patching it using these commands:

Code:
root@klm-pbx-01:~# cd /var/lib/3cxpbx/Bin/nginx/conf/snippets
root@klm-pbx-01:/var/lib/3cxpbx/Bin/nginx/conf/snippets# patch -p0 < /tmp/40-common.conf.patch
root@klm-pbx-01:/var/lib/3cxpbx/Bin/nginx/conf/snippets# chown phonesystem:phonesystem 40-common.conf
root@klm-pbx-01:/var/lib/3cxpbx/Bin/nginx/conf/snippets# reboot

I have not had issues since doing that fix (yes, I understand this could break in the future and is not supported, I just need 3CX to provision the phones, not a separate webserver).

Provisioning of devices should probably be a separate set of rules, since there's no actual browser/user-agent there (or, if there is, it's a very limited one and should be treated as a whole separate entity from an actual user with a browser).
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,880
Messages
589,533
Members
164,735
Latest member
998742