Project

General

Profile

12 hour clock on Cisco SCCP Phones

Added by James Young about 2 months ago

I can not test SCCP Phones clock. On 18.03 Wazo shows 24 hour clock. I am wondering if 12 hour clock is available on more recent versions?


Replies (12)

RE: 12 hour clock on Cisco SCCP Phones - Added by Sébastien Duthil about 2 months ago

Hi James,

no, there have been no changes in the SCCP library regarding the date format in more recent versions. But we would gladly welcome a contribution that would add the feature :)

RE: 12 hour clock on Cisco SCCP Phones - Added by James Young about 2 months ago

Let me add a detail to the clock on the Cisco Phones. When you change the configuration from M/D/Y to M/D/YA the phone displays 12 hour for about 1 second then changes to 24 hour clock.
The phone reads the config correctly but the something overrides the 12 hour setting. this happens on 7941,7942,7961,7962 phones.

Thanks

RE: 12 hour clock on Cisco SCCP Phones - Added by Sébastien Duthil about 2 months ago

Hi James,

Thanks for the precision. After some investigation, here's what I found:

- the Cisco phones get the date format from two sources:
- the provisioning file (dateTemplate), as configured in /var/lib/xivo-provd/plugins/xivo-cisco-whatever/var/tftpboot/SEPsomething.cnf.xml), which is always D-M-YA, unless you use a custom config template to override it.
- the Asterisk server (Register Ack message), as configured in the web interface SCCP General settings, default D/M/Y.
- Here's a description of the date formats accepted by the phone: https://github.com/chan-sccp/chan-sccp/wiki/Cisco-phone-configuration-files-SEPXXXXXXXXX.cnf.xml

My observations on my Cisco 7941 with xivo-cisco-sccp-9.0.3 plugins show that:

- After Asterisk reboot, the date format is taken from the provisioning file
- Upon all subsequent device resets (sccp reset device ...), the date format is taken from the Asterisk server.

The one second delay that you see is the time it takes to the phone to receive the new date format from the Asterisk server. Before that, it displays the format from the provisioning file.

Formatting the date from the web interface works correctly, as long as the format does not exceed 5 characters (like changing the date order or separators).

However, when the date format is 6 characters long, like M/D/YA or M/D/YY, the last character is stripped, and only the first 5 characters are kept in Asterisk.

And indeed I found a bug in xivo-libsccp, where the size of the dateformat field is not long enough to store the tailing A.

The pull requet is here: https://github.com/wazo-pbx/wazo-libsccp/pull/4. It should be merged in the following days.

Once it is merged, you can test it by recompiling wazo-libsccp according to the instructions here: http://documentation.wazo.community/en/stable/contributors/sccp.html

RE: 12 hour clock on Cisco SCCP Phones - Added by James Young about 2 months ago

Thank You for your effort. How can I tell when the pull request is merged?

Thanks

RE: 12 hour clock on Cisco SCCP Phones - Added by Sébastien Duthil about 2 months ago

On Github, it is marked as Open. Il will change to Merged when someone else will do the review and accept the change.

RE: 12 hour clock on Cisco SCCP Phones - Added by James Young about 1 month ago

I got the following error

root@wazopbx:~/xivo-libsccp# make
cc -c -Wall -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wmissing-format-attribute -Wformat=2 -g -fPIC -D'_GNU_SOURCE' -D'AST_MODULE="chan_sccp"' -D'AST_MODULE_SELF_SYM=__internal_chan_sccp_self' -o sccp.o sccp.c
In file included from sccp.c:14:0:
sccp_config.h:5:26: fatal error: asterisk/mwi.h: No such file or directory
#include <asterisk/mwi.h>
^
compilation terminated.
Makefile:21: recipe for target 'sccp.o' failed
make: *** [sccp.o] Error 1
root@wazopbx:~/xivo-libsccp#

any ideas?

RE: 12 hour clock on Cisco SCCP Phones - Added by James Young about 1 month ago

maybe name changed from xivo-libsccp to wazo-libsccp

i do not know how to compile if name changed

RE: 12 hour clock on Cisco SCCP Phones - Added by Sébastien Duthil about 1 month ago

Looks like you're missing some files. Did you run the following command, as said in the docs ?

apt-get update && apt-get install build-essential asterisk-dev

RE: 12 hour clock on Cisco SCCP Phones - Added by James Young about 1 month ago

Yes I did run the apt-get update && apt-get install

this is the output

root@wazopbx:~# apt-get update && apt-get install build-essential asterisk-dev
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://ftp.us.debian.org/debian stretch InRelease
Hit:3 http://ftp.us.debian.org/debian stretch-updates InRelease
Hit:4 http://ftp.us.debian.org/debian stretch Release
Hit:5 http://mirror.wazo.community/debian phoenix-stretch InRelease
Get:6 http://security.debian.org/debian-security stretch/updates/main Sources [207 kB]
Get:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [497 kB]
Get:8 http://security.debian.org/debian-security stretch/updates/main Translation-en [222 kB]
Fetched 1,020 kB in 0s (1,282 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.3).
asterisk-dev is already the newest version (8:15.2.2-1~wazo1.deb9).
0 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
root@wazopbx:~#
root@wazopbx:~# cd xivo-libsccp
root@wazopbx:~/xivo-libsccp# make
cc -c -Wall -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wmissing-format-attribute -Wformat=2 -g -fPIC -D'_GNU_SOURCE' -D'AST_MODULE="chan_sccp"' -D'AST_MODULE_SELF_SYM=__internal_chan_sccp_self' -o sccp.o sccp.c
In file included from sccp.c:14:0:
sccp_config.h:5:26: fatal error: asterisk/mwi.h: No such file or directory
#include <asterisk/mwi.h>
^
compilation terminated.
Makefile:21: recipe for target 'sccp.o' failed
make: *** [sccp.o] Error 1
root@wazopbx:~/xivo-libsccp#

RE: 12 hour clock on Cisco SCCP Phones - Added by James Young about 1 month ago

I would like some guidance on how to fix the errors while complying the SCCP. looks like a file is missing. Do not know where to get file.

thanks

RE: 12 hour clock on Cisco SCCP Phones - Added by Sébastien Duthil 27 days ago

Hi James,

before running make, run:

git checkout 585f92f102d32c87f24e593750f2291364dca1e4

Explanation: 2 days before you tried compiling, there was another commit adding a reference to asterisk/mwi.h, which is a new file only available in the latest versions of Asterisk. What this command does is checking out the commit (version) just before the reference to asterisk/mwi.h was added.

RE: 12 hour clock on Cisco SCCP Phones - Added by James Young 14 days ago

Thank You for the information regarding missing file. Followed your instructions and the 12 hour clock works great!!!

Fantastic support.....Thanks

    (1-12/12)