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

SPA504G provisioning CFG profile question

idemkovitch
Level 1
Level 1

Question about creating spaxxxx.cfg files.

I read somewhere that I should save .cfg file from template phone and then just modify it for new phones. I'm not sure I like it because it's really hard to navigate through those huge file..

Is it possible to only specify 10 or so options that need to be updated over factory default? So those .CFG files will be small and straight to the point?

Also, what can I put into spa504G.cfg other than simple:

<flat-profile>
<Resync_On_Reset>Yes</Resync_On_Reset>
<Resync_Periodic>10</Resync_Periodic>
<Profile_Rule>tftp://192.168.zz.zz/spa$MA.xml</Profile_Rule>
</flat-profile>

Can I use it as template and put all our specific settings? Like proxy and other overlapping settings same for all devices?

Thank you!

2 Accepted Solutions

Accepted Solutions

Dan Lukes
VIP Alumni
VIP Alumni
Is it possible to only specify 10 or so options

Yes, you can put even zero options into file.

Also, you can change order, so you can put options of your choice on top followed by all those default you wish not to change on bottom. But make sure no option will be listed twice. As change of most options will trigger reboot, the phone is rebooting on every load of provisioning file as the consequence. And if you have "resync on reboot" turned on as well those reboots are perpetual.

over factory default

Well ...

... over factory default values of which firmware version ? Some "default values" vary from version to version. See changes, if interested.

Also, phone needs to be in factory default state while reset to factory default can't be triggered remotely. So if a phone gets misconfigured, it can't be recovered by just reboot (it can be triggered remotely) or power cycle (which can be done even by small kid). It require reset to factory default first as stripped config will not revert misconfigured values into proper one.

But the final decision depends on your requirements.

View solution in original post

Reorder Tone - recommendation to change values from 0.25 to 0.125..

This option affect nothing but user experience. Thus forget experts recommendations. Use the same tone your users are familiar with. Most of time - the best choice is to use the same tone as used in public phone network.

As far as I know, the most common reorder tone in US is 480@-19,620@-19;10(.25/.25/1+2) but if your local telco uses 480@-19,620@-19;10(.125/.125/1+2) or your users are preferring such tone for whatever reason, then feel free to use it.

Note ITU standard: :

... subscribers should not be confused by hearing different tones for the same purpose within their national networks. Consequently, the practice already in use for analogue generated tones should be maintained for reasons associated with the human factor ...

 

According corrupted file - you created new thread for the topic, so we will continue in it.

View solution in original post

5 Replies 5

Dan Lukes
VIP Alumni
VIP Alumni
Is it possible to only specify 10 or so options

Yes, you can put even zero options into file.

Also, you can change order, so you can put options of your choice on top followed by all those default you wish not to change on bottom. But make sure no option will be listed twice. As change of most options will trigger reboot, the phone is rebooting on every load of provisioning file as the consequence. And if you have "resync on reboot" turned on as well those reboots are perpetual.

over factory default

Well ...

... over factory default values of which firmware version ? Some "default values" vary from version to version. See changes, if interested.

Also, phone needs to be in factory default state while reset to factory default can't be triggered remotely. So if a phone gets misconfigured, it can't be recovered by just reboot (it can be triggered remotely) or power cycle (which can be done even by small kid). It require reset to factory default first as stripped config will not revert misconfigured values into proper one.

But the final decision depends on your requirements.

Dan,

Can you clarify this?

And if you have "resync on reboot" turned on as well those reboots are perpetual.

If no option repeated between spa504G.cfg and individual config - no cycling should happen, right?

What you say about factory defaults makes perfect sense. But at least "Info/" entities can be safely dropped, right?

And then move changed options up on top...

But I didn't understand, can we put more stuff into spa504G.cfg? Like those regional settings, etc? And remove them from individuals?

Also, I know you mentioned that you are using Asterisk. For Asterisk there is a lot of different setups flying on net. One of the advices to put phone into "Static" IP mode which seem bad. I'd like to control IPs from DHCP side. So, it's "Static" in a system but not from phone setup standpoint..

Do you care to share Asterisk-specific options you use?

Here is options we have set, not sure it's needed:

#Those for Asterisk
<RTP_Packet_Size group="SIP/RTP_Parameters">0.020</RTP_Packet_Size>
<Reorder_Tone group="Regional/Call_Progress_Tones">480@-19,620@-19;10(.125/.125/1+2)</Reorder_Tone>
<Interdigit_Long_Timer group="Regional/Control_Timer_Values__sec_">5</Interdigit_Long_Timer>


#Those to make offset work and clock adjust
<Daylight_Saving_Time_Rule group="Regional/Miscellaneous">start=3/8/7;end=11/1/7;save=1</Daylight_Saving_Time_Rule>
<Primary_NTP_Server group="System/Optional_Network_Configuration">pool.ntp.org</Primary_NTP_Server>

#Those I'm not sure if I need.. What is this magic Multicast Address?
#Do we need NAT set if it's all inside network on same subnet?
<NAT_Keep_Alive_Intvl group="SIP/NAT_Support_Parameters">15</NAT_Keep_Alive_Intvl>
<Multicast_Address group="SIP/Linksys_Key_System_Parameters">224.168.168.168:6061</Multicast_Address>

EDIT: Ok, I did what I think correct. I placed all common settings into spa504G.cnf. I removed same name settings and all INFO settings from template I downloaded. Phone would download spa504G.cnf and APPLY IT - I can see.

Then it downloads spaXX.cnf and nothing happens. I turned on debugging and here is what it says. Not much, right? ....

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

I wish it said what IS corrupt.. .cfg file attached. Can you see what might be wrong with it?

I literally just removed some lines which should be OK..

Sorry for many questions, trying to understand process better :)

Thank you

According 'a option listed twice in configuration file' issue ...

Imagine following configuration file:

<flat-profile>
        <Resync_On_Reset ua="na">Yes</Resync_On_Reset>
        <Enable_CDP ua="na">No</Enable_CDP>
        <Enable_CDP ua="na">Yes</Enable_CDP>
</flat-profile>

There are two instances of Enable_CDP. So we can be sure at least second one is considered change of the value - regardless the original value of option.

Any change of Enable_CDP will trigger phone reset, thus phone resets whenever this configuration become loaded.

Now how about Resync_on_Reset. The 'Yes' value mean the provisioning will be reloaded on bootup. So phone enters never ending loop:

  1. Phone loads configuration, the reset is committed because of it
  2. Phone boot up, then (re-)loads configuration
  3. continue with step 1

But at least "Info/" entities can be safely dropped, right?

True.

can we put more stuff into spa504G.cfg? Like those regional settings, etc? And remove them from individual

Phone process all configuration files the same way. For the purpose of this discussion you can assume the phone will concatenate all of them into one file, then parse it. The real algorithm is slightly different, but you can ignore the details now.

For example I'm using just simple configuration file: <Profile_Rule>https://$(A)/Cisco/Provisioning.php</Profile_Rule>

The Provisioning.php script on server will merge all necessary stuff for particular phone and send them to phone in one chunk.

Do you care to share Asterisk-specific options you use?

There is just only true Asterisk-specific option I know: <Server_Type>Asterisk</Server_Type>

Other are not specific to Asterisk, Yes, I'm willing to speak about any option or to share complete configuration, if you wish.

Lets go.

IP setup

You can use either static or dynamic configuration. But first I need to explain the terms.

Saying 'dynamic' I mean there's a pool of IP addresses. DHCP server will assign a rantom address from the pool to the phone.

Saying 'static' I mean the particular phone will receive same IP address all the times. Such address cam be assigned by DHCP to them (but not randomly from pool) or hardwired by phone configuration.

So 'static' is not the same as 'with no DHCP'.

With dynamic configuration the Asterisk know no IP of phone unless phone become registered.

With static configuration you may configure no registration on phone (IP address of phone must be filled in Asterisk's sip.conf) or you may register even in such case.

The best choice depends on local condition. I would like to recommend you static configuration with DHCP with registration. E.g. phone is configured to use DHCP. DHCP server use no random address of pool, but assign preallocated IP according phone's MAC address. There are no IP addresses in sip.conf, phone will register to Asterisk.

I dislike the dynamic (random) addresses. it make debugging hard and old logs may be useless (as you doesn't know what phone belong to what IP address).

Your mileage may vary.

RTP Packet Size

It's not Asterisk related option. You should follow you upstream Voice provider recommendations here. E.g. you should use the same value he is using.

0.020 is most common value used on G.711 - just because it's standard value for classic (e.g. non VoIP) phone telecommunication world.  As long as you will use G.711 we can assume the 0.020 is correct. But check parameters of incoming INVITE (from upstream to Asterisk) - the ptime value of SDP will disclose provider's choice to you.

Reorder Tone

It has nothing to do with Asterisk. It's the definition of tone generated locally by phone when an outbound call has failed or when a person on the other end hangs up after a call has been established. It's used also when a dial tone or any of the other options times out. Reorder tone may be replaced by SITx tone when requested by <SITx_RSC> option.The definition of reorder tome should follow regional requirements (they are country specific, for exact advice I need to know the country the phone is located in).

Daylight Saving Time Rule

Have nothing to do with Asterisk either. it need to follow your country daylight saving rules.

NAT Keep Alive Intvl

... also have nothing to do with Asterisk. If there's NAT between phone and Asterisk, it needs to be set. Interval should be lower than NAT purging time. If there's no NAT you can leave it as is (superfluous keep-alives harm nothing) or set it to 0.

Multicast Address

Such address is required if there's Linksys call control device. Asterisk can't emulate it. But if you will use multicast paging feature on Asterisk, this address needs to be set to the same value you configured on Asterisk. I would like to recommend you not to use multicast paging. It have more drawbacks than positives.

Sorry for many questions, trying to understand process better

That's we are here for. Just rate valuable comments ;-)

The best choice depends on local condition. I would like to recommend you static configuration with DHCP with registration. E.g. phone is configured to use DHCP. DHCP server use no random address of pool, but assign preallocated IP according phone's MAC address. There are no IP addresses in sip.conf, phone will register to Asterisk.

This is exactly what I've been doing. Our router gives out IPs by MAC and I don't use those in sip.conf, using UN/PW

Asterisk located in USA and almost all phones too (some phones abroad but they are on VPN and call into USA only). So, should I make any changes to those options from defaults?

Reorder Tone - recommendation to change values from 0.25 to 0.125..

I'm still having same issue with making phone take that config.. (See my EDIT to previous post)

What I did now - Set just one option (Station Name). Saved profile as XML

Uploaded profile AS IS to TFTP (not like cleaned one I attached) and reset phone to factory.

Same issue. Says file is corrupt and won't take. Is it possible that file I get from admin/spacfg.xml is NOT in correct format? (SPCP?)

Reorder Tone - recommendation to change values from 0.25 to 0.125..

This option affect nothing but user experience. Thus forget experts recommendations. Use the same tone your users are familiar with. Most of time - the best choice is to use the same tone as used in public phone network.

As far as I know, the most common reorder tone in US is 480@-19,620@-19;10(.25/.25/1+2) but if your local telco uses 480@-19,620@-19;10(.125/.125/1+2) or your users are preferring such tone for whatever reason, then feel free to use it.

Note ITU standard: :

... subscribers should not be confused by hearing different tones for the same purpose within their national networks. Consequently, the practice already in use for analogue generated tones should be maintained for reasons associated with the human factor ...

 

According corrupted file - you created new thread for the topic, so we will continue in it.