Yealink Forums
HTTP Provisioning passing phone parameters in the URL (MAC, model, etc.) - Printable Version

+- Yealink Forums (http://forum.yealink.com/forum)
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: Auto Provisioning (/forumdisplay.php?fid=14)
+--- Thread: HTTP Provisioning passing phone parameters in the URL (MAC, model, etc.) (/showthread.php?tid=1365)



HTTP Provisioning passing phone parameters in the URL (MAC, model, etc.) - arcanos - 03-06-2014 09:11 PM

Dear friends

Is it possible to define a configuration URL that passes some internal parameters as variables? I mean, something like...

Code:
http://192.168.1.50/provisioning/yealink/phone.php?mac=$mac&type=$model

My intention is to have only one configuration file (phone.php) that will dinamically change specific parameters for the phone specified by the mac and model variable. This is much more easy than having to create one file for each phone. This is how we do it know with Cisco SMB phones, and it¡s really confortable.

In fact, with this behaviour you could also mantain the actual way just defining an static URL...

Code:
http://192.168.1.50/provisioning/$mac.cfg

Is there anyway to do this (or something similar) know? Any plans to develop this? In fact, it's similar to what you do in the Action URLs... Maybe this is the potential of HTTP provisioning against TFTP, being able to dinamically change file content.

Regards


RE: HTTP Provisioning passing phone parameters in the URL (MAC, model, etc.) - Yealink Support - 03-10-2014 02:09 PM

Hi arcanos,

I think you can use XML Browser feature.
XML Browser_V72


RE: HTTP Provisioning passing phone parameters in the URL (MAC, model, etc.) - jolouis - 03-13-2014 11:07 PM

If you're using PHP the information is easy enough to find without requiring that the phone pass it as separate URL variables. Take a look at the User Agent string that the phone sends when it makes it's request to your provisioning script, all the goodies are there. With some relatively simple session caching you can also map model file requests to MAC file requests, giving you a simple way to know the model of each phone when it pulls for the mac file... if that was something you needed.


RE: HTTP Provisioning passing phone parameters in the URL (MAC, model, etc.) - arcanos - 03-14-2014 12:11 AM

I've already solved it using rewrite module in apache, so this url...

http://X.X.X.X/provisioning/010101010101.cfg

... is automatically rewrited as...

http://X.X.X.X/provisioning/file.php?mac=010101010101

... and done!

Anyway, the user agent option sounds good. Maybe take into account that would be neccesary to add the .cfg extension to apache as a php file.

But I keep thinking that the posibility to set it directly with a variable in the url of the common file would be better (at least more open). Smile

Regards and thank you all!


RE: HTTP Provisioning passing phone parameters in the URL (MAC, model, etc.) - Yealink Support - 03-14-2014 07:46 PM

Thanks to your advice.