cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1104
Views
5
Helpful
6
Replies

SPA504G provisioning corrupted file error

idemkovitch
Level 1
Level 1

I'm starting new thread on this because I believe I isolated issue as much as I can..

Simple requirement: to provision file via TFTP

See attached archive. One file is spa504G.cfg - loads and applies just fine. I'm seeing syslog messages and other options is fine. Phone reboots and starts to grab individual file spaa....cfg - and errors out. This second file is a simple as it can be, I only want to set Display Name and Voicemail number. And it wouldn't work. Any ideas why? What is not formatted correctly?

Syslog shows correct file pulled and TFTP shows it was received and yet no go...

Jul  4 11:17:47 resync rule:  tftp://192.168.33.31/spaa44c119eebf8.cfg
Jul  4 11:17:47 resync rule:  tftp://192.168.33.31/spaa44c119eebf8.cfg
Jul  4 11:17:47 192.168.99.112 ++ j=0 sip=c0a8211f
Jul  4 11:17:47 192.168.99.112 ++ j=0 sip=c0a8211f
Jul  4 11:17:47 SPA504G a4: 4c:11:9e:eb:f8 -- Requesting resync tftp://192.168.33.31:69/spaa44c119eebf8.cfg
Jul  4 11:17:47 SPA504G a4: 4c:11:9e:eb:f8 -- Requesting resync tftp://192.168.33.31:69/spaa44c119eebf8.cfg
Jul  4 11:17:47 localhost in.tftpd[8174]: RRQ from 192.168.99.112 filename /spaa44c119eebf8.cfg
Jul  4 11:17:47 SPA504G a4: 4c:11:9e:eb:f8 -- Resync failed: corrupt file
Jul  4 11:17:47 SPA504G a4: 4c:11:9e:eb:f8 -- Resync failed: corrupt file
 

1 Accepted Solution

Accepted Solutions

I can't sleep 2 days over this simple issue

Oh sorry. I suspected encoding issue, it take few seconds for me to look at it, but I postponed the analysis until I will upgrade my test lab to 7.6.2

 there was something with encodings and/or line breaks.

Both. It has been  UTF-16 with CRLF.

 Is there a "global variable" I can use for MAC address?

Of course. Did you missed the Administrators guide, page 3-40 paragraph Macro Variables ? The $MAU seems to be the variable you wish for. But not every configuration option is subject of macro variable expansion. Macro expansions are documented for URLS only. You may try it for USER_ID, but it may not work. And even if it will work, it's undocumented feature which may not survive next firmware upgrade.

Another reason to use HTTP(s) instead of TFTP and use own script to supply per-phone configuration.

View solution in original post

6 Replies 6

idemkovitch
Level 1
Level 1

Issue solved! 

User error as always but man is this finicky :)

Can you spot difference between files??

I TFTP then from Win machine to server. Now I tried to edit in terminal in Linux and it showed up as gibberish..

Lesson learned. Now I got EVERYTHING I needed in this file and phone rebooted and pulled config all as planned.

I assumed an unprintable character or so, but my test equipment has not been upgraded to 7.6.2 yet, so I decoded to upgrade before depth in analysis.

Congratulations, you has been faster. Glad to hear you solved it.

Dan,

I can't sleep 2 days over this simple issue :) But seriously. I uploaded file from Windows. I downloaded it on MAC and it opened fine (this is what I attached). Nothing looked wrong until I tried 'nano spaa..' in terminal.

Then I noticed something wrong and copy/pasted correct content. It didn't work even though it was readable. I removed all lines and started to add one by one and it worked! Content was OK but there was something with encodings and/or line breaks.

If you read that - one quick question. Is there a "global variable" I can use for MAC address?

All my user names in Asterisk is by MAC (uppercase). Would be nice if I can move most of the config into spa504G.cfg

Instead of writing 

'<User_ID_1_>A44C119EEBF8-SLS</User_ID_1_>'

Would be nice to put something like that:

<User_ID_1_>$MC$-SLS</User_ID_1_>

in main config

I can't sleep 2 days over this simple issue

Oh sorry. I suspected encoding issue, it take few seconds for me to look at it, but I postponed the analysis until I will upgrade my test lab to 7.6.2

 there was something with encodings and/or line breaks.

Both. It has been  UTF-16 with CRLF.

 Is there a "global variable" I can use for MAC address?

Of course. Did you missed the Administrators guide, page 3-40 paragraph Macro Variables ? The $MAU seems to be the variable you wish for. But not every configuration option is subject of macro variable expansion. Macro expansions are documented for URLS only. You may try it for USER_ID, but it may not work. And even if it will work, it's undocumented feature which may not survive next firmware upgrade.

Another reason to use HTTP(s) instead of TFTP and use own script to supply per-phone configuration.

Note previous comment has been submitted incomplete by accident, thus I edited it later.

Yes, I already tried and it did not work