Skip to main content

Can't provision BLFs with TL MTE and Asstra 57i

Posted by stuartcowen on Sat, 03/06/2010

ThirdLane PBX Manager 6.0.1.78
Asterisk 1.6.1.17
Aastra 57i

ThirdLane Expertise: n00b

I have tried Auto-Provisioning BLFs using a random handful of button numbers, but none of my attempts generate any change in either the aastra.cfg or .cfg file. It seems liket the aastra_blf.cfg file isn't being parsed at all.

The only changes I have made from the default provisioning environment is to copy the aastra.cfg and the aastra_phone.cfg to the /etc/asterisk/user_provisioning directory and make cosmetic changes to the bottom softkeys. The top softkeys is where I would like the BLFs to appear.

Any guidance is greatly appreciated.

Thanks,

Stuart Cowen
VoiceWave, LLC


Submitted by Denis Campq on Mon, 03/08/2010 Permalink

Yes, I have the same problem and really need some help.
I don't understand how Thirdlane mixes the base file into the end MAC file.

I hope someone out there can give us a pointer on how this works. Can we fix it with a little effort on our part or do we have to wait for a patch from Thirdlane before it will work? We will be happy to provide working base files once we get it working so Aastra provisioning will work better.

Thanks for any help we can get.

Submitted by Denis Campq on Tue, 03/09/2010 Permalink

Thanks Erik but still need some additional help if you please. The phone provisions up and registers but never gets any Speed Dials or BLF in the MAC file after creating the provisioning file.

The models.txt for my phone shows,

[aastra-57i]
label=Aastra 57i/57i CT
lines=9
phone_template=aastra_phone.cfg
line_template=aastra_line.cfg
speeddial_template=aastra_speeddial.cfg
blf_template=aastra_blf.cfg
output=${MAC}.cfg
input_1=aastra.cfg
output_1=aastra.cfg

The BLF template has the following.

expmod1 key${LINE} type: blf
expmod1 key${LINE} label: ${BLF_LABEL}
expmod1 key${LINE} value: ${BLF_TARGET}

I am not clear how Thirdlane matches the variable names above with what is configured in the Thirdlane Provisioning GUI for the BLF and SPEED dials to what should be placed in the final MAC file. I am thinking we can fix the problem we are having by making some changes here but not sure what to change to make it work. the expmod1 value above in the BLF Template file does not match the paramater name for BLF or Speed dial for the phone config which should look like the following when the mac file is created from the base template files.

softkey5 type: speeddial
softkey5 label: Park
softkey5 value: "#*,,700"
softkey5 states: connected

We are getting a little desperate with this problem. We are willing to pay for some support to get this working if someone can help. Please Help!!!

Denis

Submitted by Denis Campq on Tue, 03/09/2010 Permalink

Ok, after doing some additional research and digging in to some of the other phone templates I think I now understand how this all goes together.

The models.txt file provides the list of input and output files to be generated for each phone type.

blf_template=aastra_blf.cfg
speeddial_template=aastra_speeddial.cfg

Are used to generate the specific phone config settings in a very flexable format where generic variables like $LINE, $BLF_LABEL and $BLF_TARGET are replace in the template before being included in the specific MAC file. Seems pretty straight forward. Below is my blf template for the Aastra phone.

topsoftkey${LINE} type: blf
topsoftkey${LINE} label: ${BLF_LABEL}
topsoftkey${LINE} value: ${BLF_TARGET}

The problem is everything looks ok but provisioning with TL GUI is not feeding the files or finding the variable tags. Nothing is going into the MAC from blf or the Speeddial template. I have run provisioning on the other phone types like snom and was able to get the speed dial information in the MAC file but not the BLF. I ran the linksys 942 and everything worked as expected with BLF and Speeddials. I have looked very closly as the differances in the different templates the work for BLF and thoes like Snom that don't but can't see the differance or problem in the text of the templates.

My base files look ok for aastra, the variables are present and the provisioning is done through the Thirdalne GUI. The structure looks pretty easy and flexable to support a wide variety of phones and even provides us the ability to add our own templates / phone types without having Thirdlane hard code support for each phone.

I am really at a loss. My customer decided to delay his cut so I have time to trouble shoot this problem without being in a panic but I can't see where the problem is. Is there a check for some specific formatting I am not aware of that would keep Thirdlane from adding the blf template information to the MAC file?

Probably just my eyes not picking up a missed or missed typed }) type of thing. Exactly what has keept me from being any kind of software engineer.

No big hurry now .... but would still like some help from the community if you have an idea or point me in the right direction. The more I get into TL the more I see the flexable design effort TL has included so you can do just about anything you want, but am always supprized how many little things need to be tweaked to make simple things work without some additional effort.

Cheers :)

Submitted by Denis Campq on Tue, 03/09/2010 Permalink

Ok, I figured out my problem and learned quite a bit in the process.

What was missing was the variable names in the aastra_phone.cfg

# aastra registration
sip proxy ip: ${SERVER}
sip registrar ip: ${SERVER}
${LINES}
${BLFS}
${SPEEDDIALS}

Daaa.

I Hope TL can make this change to the Aastra base phone template for distribution so others won't have to learn through hard knocks. I am a bit more realistic and forgiving of this kind of problem with scipts and phone provisioning scripts in thirdlane. You have to test them and not not assume just because they are included they don't need some messing with to make them work for you. This is really a strength and not a weekness but is more difficult to master.

On the positive side I learned how this works and how flexable a process this really is. I have always wonders how this really worked or didn't work. Now I know and will be able to modify and add new phone types without a big learning curve to overcome.

Live and learn. Thanks for the pointers Erik.

Submitted by eeman on Wed, 03/10/2010 Permalink

just submit a patch to alex on what needs to be changed and explain that how and why you feel the change should be global versus someone just adding it in later. In your case adding the ${BLFS} and ${SPEEDDIALS} variables seems to have been an oversight on whoever contributed the aastra code.

with regard to if the template needs to be

topsoftkey${LINE}

versus

expmod1 key${LINE}

will likely require research on your part to see when and why expmod1 was chosen and if it is for a specific phone. You may or may not find that the syntax of the template is different between models in which case you would need to pick different file names and modify models.txt to use those alternate files for those models (like cisco phone templates must do).

this template based provisioning system is by far the most flexible... the gui parses the files in a search/replace fashion for a set of variables and then merges them into output files based on models.txt. This is also why I am such a fan of the polycom phones. A few override declarations in polycom_local and you can alter just about anything from disabling mwi beeping, to custom programming softkeys to perform macro operations, to customized ring tones, to custom logo's as the background image.

as long as you know how to write a config file without the use of a provisioning tool, figuring out how the provisioning tool works is merely a matter of time, patience, and a experimentation.

Submitted by Denis Campq on Wed, 03/10/2010 Permalink

Thanks Erik,

I will submit the changes to Alex when I get the files working.

At ABP we carrie a large selection of different IP phones. Alex is always requesting I submit templates for the new phones. I never took the time to really learn how the thirdlane provisioning tool worked with the files so I was unable to contirbute much.
The other issue of course is how each phone config file works and what method to use for the phone to auto-provision, TFTP, HTTP, FTP.

I may have missed the document that explaines how this works... but it should be better documented or the document should be easier to find if there is one. For some engineer types, reading the code is all the documentation they need.

I was in the middle of a cut over with 300 phones and had no time, patience, and no time to experiment. I really needed one of thoes Easy Buttons from stapels.
If TL includes provisioning files for the phones as part of the distribution, lets make sure they work. As you know, some people use this option to get the phones working, some couldn't manually provision a phone if they had to, so if they try to plug and play and it doesn't work they don't know what to do.

Cheers :)

Submitted by eeman on Wed, 03/10/2010 Permalink

as for protocols (ftp, http, tftp) I usually make the following assumption... almost every phone will do tftp. The polycoms prefer ftp because they upload user-changed settings and created contacts. So to increase usability I modify my tftp daemon in xinetd to run from the /home/PlcmSpIp directory. That means that not only can i drop polycom files into that directory but other phone configs, when dropped into that directory, can access it via TFTP. With the exception of the ISO, which so mistakenly runs webmin on port 80, one could also modify apache to also run a virtualhost out of the same directory for use with http provisioning. Extra care would be needed for http provisioning to prevent random downloads and indexing so as to obtain unauthorized phone calls.

as far as an easy button, I guess I'm just not cut from that cloth. If my employer came up to me tomorrow and asked that I become a train engineer, because its desperately needed, you can believe I intend to be the worlds best train engineer. I would learn more than the basics, I would learn what ever valve, lever and switch in the engineroom did. I would know its history and the basis of its design criteria. Perhaps thats just the navy nuclear training, but I'd like to think others took as much pride in their jobs. Did every phone need a BLF or just the receptionist? One of my favorite features of thirdlane is when you know how to do something manually, and that feature isnt yet in the gui, you can still do it manually without interference from the admin portal. Thats something that the peice-of-shit trixbox and that damn switchvox cannot boast. When their gui's lack a feature that you know how to do on a vanilla asterisk system, you are powerless to implement it.

switchvox sucks so bad that even after 2 years of explaining why vlans for voice are so important, they still have yet to allow the pbx to run 802.1Q on their ethernet interfaces. If they would just let people access the shell of the OS, one could very easily provision the ports for 802.1Q as long as they knew how to do it in fedora/centos/redhat. They refuse you access, and as a consequence I have polycom telling me that customers are having to buy 2 and 3 pbx's because they are experiencing a 150ish handset technical limitation of the switchvox pbx; most likely as a result of having to run phones on the same subnet as the crappy windoze PCs.

Submitted by Denis Campq on Thu, 03/11/2010 Permalink

OK, I now know how to change the base BLF and Speeddial templates, how to modify the models.txt file to compile the files I need. How to include the $BLF and $SPEEDDIAL variables to the Phone provisioning file for Aastra phones.

Thanks for all your assistance in helping get this figured out.

Now what I want to do is put all my knowledge together and ran into a few other things I don't know how to do.

1. I want to add another phone type to the list in models.txt file and have it show up on the drop down list of phones when I provision with GUI. I was hoping to just add the phone following the same format in models.txt and it would just show up in the list. Alas.... no joy. How do I add an additional to the list. I want to add the new Snom 8XX series and new Aastra phones for starters.
Can I also put the models.txt under user_provisioning so it will be selected first and I can protect my changes for standard updates.

2. I would also like to add different button types and have them automatically drop down the different input boxes, like Speeddial drops down a text box and BLF drops down the list of created users to select from. How can I accomplish this.

Lastly. There are several variables defined in the provisioning files. Most are self explanatory like $LINE $SERVER $BLF. Where is this list kept so I can tell what other variables I have to work with and can I add my own variables.

Thanks again for the forums help.
Denis

Submitted by thirdlane on Fri, 03/12/2010 Permalink

This was an interesting discussion - I am glad that the flexibility built into provisioning is appreciated.

Please remember that you are supposed to add or modify models and templates in user_provisioning directory - not in provisioning where they would be overwritten in the next PBX Manager upgrade. Both model descriptions and templates in user_provisioning directory always take precedence over those in provisioning so you can have models or templates with the same name and PBX Manager will use the ones from user_provisioning. A word of warning - do not copy everything from provisioning to user_provisioning - that will effectively disable our updates and fixes to the files in provisioning as they will be ignored.

In multi tenant you can go one step further and create tenant specific models or templates - in /user_provisioning/tenantname - note that since it is not frequently used we don't create the directory for every tenant - you will have to manually create directory tenantname under user_provisioning.

Another "less known fact" - you can make PBX Manager execute a program when provisioning a device by specifying it for the model in models.txt. This way you can do some post-processing which may be useful for some devices that need special processing or encoding - like grandstream phones.

Submitted by Denis Campq on Fri, 03/12/2010 Permalink

Thanks Alex,

I have tried to add the new phone models for Snom and Aastra I need to add to the models.txt and have the new templates in the user_provisioning directory but the new phones are not automatically listed in the phone types on the drop down box on the provisioning settings GUI. What do you think I am missing?

Would also like to add additional button types as I mentioned. Is that possible and how do I add them and select the drop down types so I can add text or phones in the case of BLF. For example, if Asterisk and the phone finally get SLAs working I would like to add this button type as well.

Thanks for the feeback and pointers.

Denis

Submitted by thirdlane on Fri, 03/12/2010 Permalink

Denis,

Adding new button types will require changes to PBX Manager. I suggest that you first manually create the file - the way the end result should look like, then send that to me with some comments. This way we can decide how to break the file down into templates and what changes would be required to PBX Manager.

Are you working on SLA? If so please post your finding to the forum and once you have something concrete in the manually created configuration please send it over.

And please do what Erik suggested - otherwise we have no way of knowing what may be wrong.

Submitted by Denis Campq on Fri, 03/12/2010 Permalink

I tried to add the phone to models.txt and placed the new file with changes in user_provisioning directory but didn't see the new phone type in the drop down list of phone modles. Did a reload, reboot with the modified models.txt file in the user_provisioning directory but still don't see the new phone model. Not sure what I am missing so I will continue to play around.

I have several lab and demo systems and see the same issue on all.

The new button types can wait but I would like to be able to drop down the phone model list and see the new phones and have the system grab the new provisioning base files listed in the new models.txt list of phones.

I was very tired when I tried this so I might have missed something obvious. Can someone else confirm my findings and give me a pointer in the right direction.

Thanks guys.

Submitted by eeman on Fri, 03/12/2010 Permalink

you probably screwed up models.txt and are too afraid to post it... i asked for the copy/paste and still nothing. My crystal ball says 'gross syntax error on behalf of customer'. Sorry thats the best help i can offer when you refuse to post the code.

Submitted by Denis Campq on Fri, 03/12/2010 Permalink

Confirmed, I screwed up and didn't update the label of the phone. New phones show up now.

You probably assumed I screwed up based on the many spelling errors and typos when I post to this forum.

Thanks for your help. I will try not to make these kind of changes in the wee hours or at least double check my work before posting to the forum. Sorry to wast your time

Cheers:)

Submitted by eeman on Fri, 03/12/2010 Permalink

no, im trying to provoke you into posting your code... you cant ask 'what am i missing' when we cant see what you have. Thats like saying.. i seem to be short on some change for the vending machine.. can you tell me how much more I need? but never bother to show us the change you have, or what selection you were trying to push :-)

Submitted by bup413 on Thu, 08/25/2011 Permalink

I am not sure if this has been covered somewhere but I can't find it.

I am wondering if there is a way to create server based {MAC}.CFG files to contribute to the final {mac}.cfg file.

can I add a line to the models.txt like:

[aastra-57i]
label=Aastra 57i/57i CT
lines=9
phone_template=aastra_phone.cfg
line_template=aastra_line.cfg
speeddial_template=aastra_speeddial.cfg
blf_template=aastra_blf.cfg
custom_template=aastra_custom_{mac}.cfg <<******************
output=${MAC}.cfg
input_1=aastra.cfg
output_1=aastra.cfg

What I am trying to do is add buttons like "direct to voicemail transfer" and XML application buttons to just a couple of the phones on the tenant system.

Any thoughts? Am I nuts? or already possible?

-Adam

Submitted by chris on Fri, 08/26/2011 Permalink

If you only want to do this for specific devices you would probably need to create a new model for that device. Copy the models.txt file into /etc/asterisk/user_provisioning and add something like
[aastra-57i-custom]
label=Aastra 57i/57i CT Custom
lines=9
phone_template=aastra_phone.cfg
line_template=aastra_line_custom.cfg
speeddial_template=aastra_speeddial.cfg
blf_template=aastra_blf.cfg
output=${MAC}.cfg
input_1=aastra.cfg
output_1=aastra.cfg

Then, copy the aastra_line.cfg into the user_provisioning directory as aastra_line_custom.cfg and make your customizations there. Then you just provision whichever version you want the phone to be.
If you are doing this on a tenant level basis, you can just copy the templates into /etc/asterisk/user_provisioning/TENANTNAME and any changes you make there will apply to that tenant's devices.