Project

General

Profile

Cisco 7941 D/M/Y to M/D/Y

Added by James Young 7 days ago

Where is the default file that /usr/bin/xivo-confgen asterisk/sccp.conf uses to generate sccp.conf?

Changing the /var/lib/xivo-provd/plugins/xivo-cisco/sccp/9.4/var/templates/tftpboot does not change the phones display.

So probably the sccp.conf is overiding the xml setting.


Replies (8)

RE: Cisco 7941 D/M/Y to M/D/Y - Added by Pascal Cadotte-Michaud 7 days ago

Hi James,

unfortunately this setting is not available in the web interface.

You can add it manually to the DB with the following commands (The last line will disconnect all SCCP devices from asterisk)

sudo -u postgres psql asterisk
insert into sccpgeneralsettings (option_name, option_value) values ('dateformat', 'M/D/Y');
\q
asterisk -rx 'module reload chan_sccp.so'

RE: Cisco 7941 D/M/Y to M/D/Y - Added by James Young 3 days ago

That fixxed the M/D/Y problem. I now need to know how to change the time to 12 hour instead of 24 hour.

Have tried M/D/YA and M/D/Ya and is still 24 hour.

thanks

RE: Cisco 7941 D/M/Y to M/D/Y - Added by James Young 3 days ago

when I ran the suggested script i got this error below

root@wazopbx:~# sudo -u postgres psql asterisk
could not change directory to "/root": Permission denied
psql (9.6.7)
Type "help" for help.

asterisk=# insert into sccpgeneralsettings (option_name, option_value) values ('dateformat', 'M.D.YA');
INSERT 0 1
asterisk=# \q
root@wazopbx:~# asterisk -rx 'module reload chan_sccp.so'
Module 'chan_sccp.so' reloaded successfully.

RE: Cisco 7941 D/M/Y to M/D/Y - Added by Pascal Cadotte-Michaud 3 days ago

Hi James,

At the moment the channel driver does not support the YA format for the dateformat field. I tried a modification to the channel driver which actually make this work.

If you feel confident compiling libsccp you could try this patch

diff --git a/sccp_config.h b/sccp_config.h
index 7274d9a..8bda3f9 100644
--- a/sccp_config.h
+++ b/sccp_config.h
@@ -28,7 +28,7 @@ struct sccp_general_cfg {

 struct sccp_device_cfg {
        char name[SCCP_DEVICE_NAME_MAX];
-       char dateformat[6];
+       char dateformat[8];
        char voicemail[AST_MAX_MAILBOX_UNIQUEID];
        char vmexten[AST_MAX_EXTENSION];
        char timezone[40];
diff --git a/sccp_msg.h b/sccp_msg.h
index 41d9ab9..abe6ac7 100644
--- a/sccp_msg.h
+++ b/sccp_msg.h
@@ -306,8 +306,7 @@ struct feature_status_req_message {
 #define REGISTER_ACK_MESSAGE 0x0081
 struct register_ack_message {
        uint32_t keepAlive;
-       char dateTemplate[6];
-       char res[2];
+       char dateTemplate[8];
        uint32_t secondaryKeepAlive;
        uint8_t protoVersion;
        uint8_t unknown1;

You can find the instructions to compile it here http://documentation.wazo.community/en/stable/contributors/sccp.html

The could not change directory to "/root": Permission denied message happens because the user postgres cannot enter the /root directory, which is your current working directory. It has no effect since your not trying to read or write files to that location from psql.

Be careful to remove old values from the sccpgeneralsettings.

RE: Cisco 7941 D/M/Y to M/D/Y - Added by James Young 2 days ago

Just checking the steps to compile SCCP

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

2) apply above patch

3) git clone https://github.com/wazo-pbx/xivo-libsccp.git
cd xivo-libsccp
make
make install

RE: Cisco 7941 D/M/Y to M/D/Y - Added by Pascal Cadotte-Michaud 1 day ago

Hi James,

the patch should be applied to libsccp so step 2 goes after cd xivo-libsccp and before make

RE: Cisco 7941 D/M/Y to M/D/Y - Added by James Young 1 day ago

I have tried to compile many times....numerous errors and is still 24 hour on phones.

Maybe you can supply the recompiled file.

thanks

RE: Cisco 7941 D/M/Y to M/D/Y - Added by Pascal Cadotte-Michaud about 9 hours ago

Hi James,

here's a version compiled for a 64bits architecture with asterisk 15.

You can copy the file to /usr/lib/asterisk/modules and reload the module asterisk -rx 'module reload chan_sccp.so'

chan_sccp.so (412 KB)

    (1-8/8)