[YMCS/YDMP Free Trial Program]Yealink would like to offer Free Trial Program of Yealink device management service for our current eligible customers. You can see the details below.
https://www.yealink.com/ydmp-freetrial-2020


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to detect or manage expansion modules ?
Author Message
oliv Offline
Member
***

Posts: 88
Joined: Feb 2016
Reputation: 1
Post: #11
RE: How to detect or manage expansion modules ?
(04-13-2017 03:59 PM)jolouis Wrote:  
(04-13-2017 01:03 PM)Kevin_Yealink Wrote:  For point 1, when the phone send HTTP packet and if you plug EXP, yealink should carry EXP information. PM need to know why we need to carry those information? Such as if the phone send HTTP GET to ask for auto provision file, some provision need to certificate the phone, so it will certificate the Agent information of phone.
But fot EXP information, i need to know why we need the EXP information in HTTP packet. So i need your kindly tell me more usage scenario information.

For your question:
How can I configure something like "if this phone has an expansion module, leave linekeys unconfigured, otherwise configure those linekeys this way ..." ?
Knowing at provisioning time how many expansion module, a phone currently has, would let me tailor its config accordingly.

Do you means that the we don't set BLF key on phone side but on EXP side, right? And when you plug the EXP, the server will know how many EXP in one phone, then it will push all the BLF to displayed on EXP?
Please point out if any misunderstanding.

oliv can clarify further but since I understand the request maybe I can help explain.

Your interpretation is correct in that there needs to be a way to have the Autoprovision server know whether expanders (and how many) are connected when a phone requests its config. Oliv suggested doing this by providing the serial numbers of each expander as part of the user agent. The serial numbers are not strictly important, what matters is that there is a way for the phone to indicate that it has expanders connected to it, and how many.

Oliv's use case (and I have seen this before for our customers too) is that by knowing which phones have expanders, the auto provision can adjust to program BLFs either to the "hidden buttons" (Page 2, Page 3 BLFs), or the expansion modules. The result would be a single auto provision script can handle these two scenarios:
a) Phones with no expander can still get all BLFs by going to page 2/page 3. Less convinient but still possible.
b) Phones with expander get all BLFs on expander, and Page 2/Page 3 is not used which makes phone interface less cluttered/confusing for users.

This seems logical and hopefully would be relatively easy to implement. Even just adding something like "Exp:2" to the user agent to indicate there are 2 expanders on the phone would achieve the goal.

The Action URL and other information is probably more of a long term wish list as it would take much more work to develop I expect.

jolouis perfectly summarized my request ! Thanks you very much for this !

A side note, just in case phones accept different kinds of expanders in the future (one with color screen, one with 60 buttons, ...), maybe a string like "exp20:exp60" should be used to correctly inform provisioning server about the type and order of connected expanders.

(04-14-2017 06:30 AM)Kevin_Yealink Wrote:  1. The server only have cfg file, how does the server recognize Agent information in HTTP packet?
2. For the BLF key configuration, you have to pre-configure it on Yealink cfg file, how many key you add in the cfg, then the phone download the cfg and update.
And we use different provision syntax for the line key and exp key.

So we don't think it is convenience to carry EXP information in the HTTP packet.

Please point out if any misunderstanding.

BR
Kevin
Hello,

All the above reasoning is correct for what I would call, static provisioning server with which config files are hand-edited by sys admins, simply served to requesting HTTP clients.

With today's web development tools, it is quite easy for sys admins (DevOps trend) to develop dynamic provisioning server with which config files do not even exist at the time the provisioning server receives a request.

Upon request reception, dynamic provisioning server would simply:
- reads User-Agent header content to get MAC address (and hopefully expanders presence),
- use pre-configured templates to generate on the fly y00000000xxx.cfg, MAC.cfg or other files (phonebook, vpn certificates, ...) depending on data found in User-Agent header or hundreds of other factors (time of day, IP range, ...), if this ever makes sense.

Dynamic provisioning servers cannot be implemented with TFTP as this protocol is only designed to serve files but dynamic provisioning servers perfectly match with HTTP/HTML: content is customized and build on purpose when requested, not before being requested.

Hope this helps.
(This post was last modified: 04-14-2017 07:14 AM by oliv.)
04-14-2017 06:55 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Kevin_Yealink Offline
Administrator
*******

Posts: 204
Joined: Jul 2016
Reputation: 2
Post: #12
RE: How to detect or manage expansion modules ?
(04-14-2017 06:55 AM)oliv Wrote:  
(04-13-2017 03:59 PM)jolouis Wrote:  
(04-13-2017 01:03 PM)Kevin_Yealink Wrote:  For point 1, when the phone send HTTP packet and if you plug EXP, yealink should carry EXP information. PM need to know why we need to carry those information? Such as if the phone send HTTP GET to ask for auto provision file, some provision need to certificate the phone, so it will certificate the Agent information of phone.
But fot EXP information, i need to know why we need the EXP information in HTTP packet. So i need your kindly tell me more usage scenario information.

For your question:
How can I configure something like "if this phone has an expansion module, leave linekeys unconfigured, otherwise configure those linekeys this way ..." ?
Knowing at provisioning time how many expansion module, a phone currently has, would let me tailor its config accordingly.

Do you means that the we don't set BLF key on phone side but on EXP side, right? And when you plug the EXP, the server will know how many EXP in one phone, then it will push all the BLF to displayed on EXP?
Please point out if any misunderstanding.

oliv can clarify further but since I understand the request maybe I can help explain.

Your interpretation is correct in that there needs to be a way to have the Autoprovision server know whether expanders (and how many) are connected when a phone requests its config. Oliv suggested doing this by providing the serial numbers of each expander as part of the user agent. The serial numbers are not strictly important, what matters is that there is a way for the phone to indicate that it has expanders connected to it, and how many.

Oliv's use case (and I have seen this before for our customers too) is that by knowing which phones have expanders, the auto provision can adjust to program BLFs either to the "hidden buttons" (Page 2, Page 3 BLFs), or the expansion modules. The result would be a single auto provision script can handle these two scenarios:
a) Phones with no expander can still get all BLFs by going to page 2/page 3. Less convinient but still possible.
b) Phones with expander get all BLFs on expander, and Page 2/Page 3 is not used which makes phone interface less cluttered/confusing for users.

This seems logical and hopefully would be relatively easy to implement. Even just adding something like "Exp:2" to the user agent to indicate there are 2 expanders on the phone would achieve the goal.

The Action URL and other information is probably more of a long term wish list as it would take much more work to develop I expect.

jolouis perfectly summarized my request ! Thanks you very much for this !

A side note, just in case phones accept different kinds of expanders in the future (one with color screen, one with 60 buttons, ...), maybe a string like "exp20:exp60" should be used to correctly inform provisioning server about the type and order of connected expanders.

(04-14-2017 06:30 AM)Kevin_Yealink Wrote:  1. The server only have cfg file, how does the server recognize Agent information in HTTP packet?
2. For the BLF key configuration, you have to pre-configure it on Yealink cfg file, how many key you add in the cfg, then the phone download the cfg and update.
And we use different provision syntax for the line key and exp key.

So we don't think it is convenience to carry EXP information in the HTTP packet.

Please point out if any misunderstanding.

BR
Kevin
Hello,

All the above reasoning is correct for what I would call, static provisioning server with which config files are hand-edited by sys admins, simply served to requesting HTTP clients.

With today's web development tools, it is quite easy for sys admins (DevOps trend) to develop dynamic provisioning server with which config files do not even exist at the time the provisioning server receives a request.

Upon request reception, dynamic provisioning server would simply:
- reads User-Agent header content to get MAC address (and hopefully expanders presence),
- use pre-configured templates to generate on the fly y00000000xxx.cfg, MAC.cfg or other files (phonebook, vpn certificates, ...) depending on data found in User-Agent header or hundreds of other factors (time of day, IP range, ...), if this ever makes sense.

Dynamic provisioning servers cannot be implemented with TFTP as this protocol is only designed to serve files but dynamic provisioning servers perfectly match with HTTP/HTML: content is customized and build on purpose when requested, not before being requested.

Hope this helps.

Hi Oliv

Thanks for your information.

Assume we develop new SN.cfg for EXP. If the phone connect a EXP, it will carry EXP information in HTTP, then the server will push SN.cfg file to the phone and update.

But as you know, exp is different from phone. I think the major feature for EXP is speed dial and BLF.
1. It use cooperatively with every single phone every single account. If we develop single PN.cfg file, why we don't add it in the MAC.cfg file?
2. different EXP has different key configuration, so the sys admin have to create all different PN.cfg file for all EXP, i think it would be more chaotic and inconvenience.
3. If we connect this EXP to another phone, it can't push this another phone to update.

BR
Kevin
04-17-2017 03:48 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jolouis Offline
Moderator
*****

Posts: 339
Joined: Oct 2013
Reputation: 6
Post: #13
RE: How to detect or manage expansion modules ?
(04-17-2017 03:48 AM)Kevin_Yealink Wrote:  Assume we develop new SN.cfg for EXP. If the phone connect a EXP, it will carry EXP information in HTTP, then the server will push SN.cfg file to the phone and update.

But as you know, exp is different from phone. I think the major feature for EXP is speed dial and BLF.
1. It use cooperatively with every single phone every single account. If we develop single PN.cfg file, why we don't add it in the MAC.cfg file?
2. different EXP has different key configuration, so the sys admin have to create all different PN.cfg file for all EXP, i think it would be more chaotic and inconvenience.
3. If we connect this EXP to another phone, it can't push this another phone to update.

As Oliv mentioned, the primary use for this request is with "Dynamic" provisioning servers (i.e. ones that generate a cfg file based on template and the incoming request).

The main reason, as mentioned before, that this "dynamic" server would need to know about expanders is to let it use a different template, or change the generated config to adjust the phone itself when an expander is connected. (i.e. logic flow would be:
a) Phone requests MAC.cfg via HTTP
b) Dynamic Provision server gets request, looks at user agent
If EXP information was in user agent, then the server would generate a config which would leave main buttons on phone for use as line keys (or some other primary purpose). Assigns common BLFs to EXP slots.
If EXP information was not in user agent, server assumes no EXP present so it assigns common BLFs to main phone keys instead.

The difference in config is on the main phone itself, not the EXP. (AS I mentioned before, the EXP config can be sent to any phone always, it does not matter if EXP is actually there or not.) What matters is that the config for the phone itself needs to know if EXP is present or not.

So making phones to another request for something like SN.cfg would not be of any benefit.

Much simpler solution would be to add to UserAgent as requested, or provide some kind of API that the config server can use to ask the phone directly "do you have any EXPs attached?".
04-17-2017 01:35 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Kevin_Yealink Offline
Administrator
*******

Posts: 204
Joined: Jul 2016
Reputation: 2
Post: #14
RE: How to detect or manage expansion modules ?
(04-17-2017 01:35 PM)jolouis Wrote:  
(04-17-2017 03:48 AM)Kevin_Yealink Wrote:  Assume we develop new SN.cfg for EXP. If the phone connect a EXP, it will carry EXP information in HTTP, then the server will push SN.cfg file to the phone and update.

But as you know, exp is different from phone. I think the major feature for EXP is speed dial and BLF.
1. It use cooperatively with every single phone every single account. If we develop single PN.cfg file, why we don't add it in the MAC.cfg file?
2. different EXP has different key configuration, so the sys admin have to create all different PN.cfg file for all EXP, i think it would be more chaotic and inconvenience.
3. If we connect this EXP to another phone, it can't push this another phone to update.

As Oliv mentioned, the primary use for this request is with "Dynamic" provisioning servers (i.e. ones that generate a cfg file based on template and the incoming request).

The main reason, as mentioned before, that this "dynamic" server would need to know about expanders is to let it use a different template, or change the generated config to adjust the phone itself when an expander is connected. (i.e. logic flow would be:
a) Phone requests MAC.cfg via HTTP
b) Dynamic Provision server gets request, looks at user agent
If EXP information was in user agent, then the server would generate a config which would leave main buttons on phone for use as line keys (or some other primary purpose). Assigns common BLFs to EXP slots.
If EXP information was not in user agent, server assumes no EXP present so it assigns common BLFs to main phone keys instead.

The difference in config is on the main phone itself, not the EXP. (AS I mentioned before, the EXP config can be sent to any phone always, it does not matter if EXP is actually there or not.) What matters is that the config for the phone itself needs to know if EXP is present or not.

So making phones to another request for something like SN.cfg would not be of any benefit.

Much simpler solution would be to add to UserAgent as requested, or provide some kind of API that the config server can use to ask the phone directly "do you have any EXPs attached?".

Hi Jolouis

I know totally what you need. I have 1 question, would you mind kindly guiding me who to create cfg/config file on the server side.

As you know, the auto provision syntax for EXP key and line key is different. So if the server can know if EXP is present or nor, we also need to modify the cfg file so that we can control the BLF key should be display on EXP or line key.
And all the auto provision related to EXP key should add on the MAC cfg files in advanced. So I don't think it is convenience.
Please kindly answer my last question so that i can check with our PM.

BR
Kevin
04-18-2017 03:41 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jolouis Offline
Moderator
*****

Posts: 339
Joined: Oct 2013
Reputation: 6
Post: #15
RE: How to detect or manage expansion modules ?
(04-18-2017 03:41 AM)Kevin_Yealink Wrote:  I know totally what you need. I have 1 question, would you mind kindly guiding me who to create cfg/config file on the server side.

....So I don't think it is convenience.
Hi Kevin,

You're still thinking static config files my friend... Oliv and I are talking about dynamically generated ones. So in our case, the server will generate the configs on demand, based on the request.

For example:
1) Configure webserver so that all requests to a given path are forwarded to a dynamic generator (in this case PHP script). In Apache you can do something like this in an htaccess file:
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ master.php?file=$1 [L,QSA]
This takes all incoming requests and says if the requested file doesn't exist, make the request to master.php, and pass the filename as the "file=" argument.
2) Now write master.php to generate the appropriate configuration based on the requested file. Usually this involves pulling information from a database, or some pre-set cache. Once the data is loaded, appropriate config information is written out. A simple example:
Code:
<?php

//Get the name of the requested file
$targetFN = $_REQUEST["file"];

if ($targetFN == "y000000000046.cfg") {
        //Generate or import generic config for T29G

} else if (preg_match("/^([0-9A-Fa-f]{2}){6}\.cfg$/", $targetFN)) {
        //Regular expressoin matches any MAC.cfg file requests.

        //connect to database and load information for this device...
        //Fake this in our example
        if ($targetFN == "001565297016.cfg") {
                $myExt = "420";
        } else {
                //..other definitions based on other MACs
        }


        //Now generate config as it will be seen by phone
        echo '#!version:1.0.0.1

##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.##
';

        //Output basic config for first 3 line keys
        echo "linekey.1.line = 1
linekey.1.type = 15
linekey.1.label = $myExt
linekey.2.line = 1
linekey.2.type = 15
linekey.2.label = $myExt
linekey.3.line = 1
linekey.3.type = 15
linekey.3.label = $myExt
";

        //Now, let's output BLF depending on what is in user agent.
        $ua = $_SERVER['HTTP_USER_AGENT'];

        //If the user agent contained expander information, we could search for that and adjust our BLF output based on it.
        if (strpos($ua, "Exp") !== false) {
                //Expander is included in UA, so must be present. Put exp button config out
                echo "expansion_module.1.key.1.type = 16
                      expansion_module.1.key.1.line = 1
                      expansion_module.1.key.1.value = 254
                      expansion_module.1.key.1.label = Jim Bob
                ";

        } else {
                //No Expander present, so put this as a BLF on normal phone key instead
                echo "linekey.8.line = 1
                      linekey.8.type = 16
                      linekey.8.value = 254
                      linekey.8.label = Jim Bob
                ";

        }
}

?>
3) Setup phones to request provisioning from the above server.

If Yealink updated firmware to add expander information to user agent in some way (i.e. add "Exp1:EXP20" if a EXP20 was connected), then the script from would adjust it's output. Phone without EXP would get:
Code:
#!version:1.0.0.1

##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.##
linekey.1.line = 1
linekey.1.type = 15
linekey.1.label = 420
linekey.2.line = 1
linekey.2.type = 15
linekey.2.label = 420
linekey.3.line = 1
linekey.3.type = 15
linekey.3.label = 420
linekey.8.line = 1
linekey.8.type = 16
linekey.8.value = 254
linekey.8.label = Jim Bob

While alternatively, phone with EXP would automatically get:
Code:
#!version:1.0.0.1

##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.##
linekey.1.line = 1
linekey.1.type = 15
linekey.1.label = 420
linekey.2.line = 1
linekey.2.type = 15
linekey.2.label = 420
linekey.3.line = 1
linekey.3.type = 15
linekey.3.label = 420
expansion_module.1.key.1.type = 16
expansion_module.1.key.1.line = 1
expansion_module.1.key.1.value = 254
expansion_module.1.key.1.label = Jim Bob

That of course is an overly simplified piece of coding but it works for demonstration.

These type of cfg generators are usually included as part of PBX software, implemented through "Auto Provisioning" or "Provision generator templates". Other times people like me write our own to fit custom needs or requirements for our customers and different types of installations.
(This post was last modified: 04-18-2017 02:42 PM by jolouis.)
04-18-2017 02:36 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Kevin_Yealink Offline
Administrator
*******

Posts: 204
Joined: Jul 2016
Reputation: 2
Post: #16
RE: How to detect or manage expansion modules ?
(04-18-2017 02:36 PM)jolouis Wrote:  
(04-18-2017 03:41 AM)Kevin_Yealink Wrote:  I know totally what you need. I have 1 question, would you mind kindly guiding me who to create cfg/config file on the server side.

....So I don't think it is convenience.
Hi Kevin,

You're still thinking static config files my friend... Oliv and I are talking about dynamically generated ones. So in our case, the server will generate the configs on demand, based on the request.

For example:
1) Configure webserver so that all requests to a given path are forwarded to a dynamic generator (in this case PHP script). In Apache you can do something like this in an htaccess file:
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ master.php?file=$1 [L,QSA]
This takes all incoming requests and says if the requested file doesn't exist, make the request to master.php, and pass the filename as the "file=" argument.
2) Now write master.php to generate the appropriate configuration based on the requested file. Usually this involves pulling information from a database, or some pre-set cache. Once the data is loaded, appropriate config information is written out. A simple example:
Code:
<?php

//Get the name of the requested file
$targetFN = $_REQUEST["file"];

if ($targetFN == "y000000000046.cfg") {
        //Generate or import generic config for T29G

} else if (preg_match("/^([0-9A-Fa-f]{2}){6}\.cfg$/", $targetFN)) {
        //Regular expressoin matches any MAC.cfg file requests.

        //connect to database and load information for this device...
        //Fake this in our example
        if ($targetFN == "001565297016.cfg") {
                $myExt = "420";
        } else {
                //..other definitions based on other MACs
        }


        //Now generate config as it will be seen by phone
        echo '#!version:1.0.0.1

##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.##
';

        //Output basic config for first 3 line keys
        echo "linekey.1.line = 1
linekey.1.type = 15
linekey.1.label = $myExt
linekey.2.line = 1
linekey.2.type = 15
linekey.2.label = $myExt
linekey.3.line = 1
linekey.3.type = 15
linekey.3.label = $myExt
";

        //Now, let's output BLF depending on what is in user agent.
        $ua = $_SERVER['HTTP_USER_AGENT'];

        //If the user agent contained expander information, we could search for that and adjust our BLF output based on it.
        if (strpos($ua, "Exp") !== false) {
                //Expander is included in UA, so must be present. Put exp button config out
                echo "expansion_module.1.key.1.type = 16
                      expansion_module.1.key.1.line = 1
                      expansion_module.1.key.1.value = 254
                      expansion_module.1.key.1.label = Jim Bob
                ";

        } else {
                //No Expander present, so put this as a BLF on normal phone key instead
                echo "linekey.8.line = 1
                      linekey.8.type = 16
                      linekey.8.value = 254
                      linekey.8.label = Jim Bob
                ";

        }
}

?>
3) Setup phones to request provisioning from the above server.

If Yealink updated firmware to add expander information to user agent in some way (i.e. add "Exp1:EXP20" if a EXP20 was connected), then the script from would adjust it's output. Phone without EXP would get:
Code:
#!version:1.0.0.1

##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.##
linekey.1.line = 1
linekey.1.type = 15
linekey.1.label = 420
linekey.2.line = 1
linekey.2.type = 15
linekey.2.label = 420
linekey.3.line = 1
linekey.3.type = 15
linekey.3.label = 420
linekey.8.line = 1
linekey.8.type = 16
linekey.8.value = 254
linekey.8.label = Jim Bob

While alternatively, phone with EXP would automatically get:
Code:
#!version:1.0.0.1

##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.##
linekey.1.line = 1
linekey.1.type = 15
linekey.1.label = 420
linekey.2.line = 1
linekey.2.type = 15
linekey.2.label = 420
linekey.3.line = 1
linekey.3.type = 15
linekey.3.label = 420
expansion_module.1.key.1.type = 16
expansion_module.1.key.1.line = 1
expansion_module.1.key.1.value = 254
expansion_module.1.key.1.label = Jim Bob

That of course is an overly simplified piece of coding but it works for demonstration.

These type of cfg generators are usually included as part of PBX software, implemented through "Auto Provisioning" or "Provision generator templates". Other times people like me write our own to fit custom needs or requirements for our customers and different types of installations.

Thank you Jolouis, I will transfer it to PM and check with them.

I will keep you update.

BR
Kevin
04-20-2017 02:31 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Trythistwo Offline
Junior Member
**

Posts: 3
Joined: Nov 2016
Reputation: 0
Post: #17
RE: How to detect or manage expansion modules ?
THANK FOR DETAIL

sbobet
05-17-2017 08:14 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
oliv Offline
Member
***

Posts: 88
Joined: Feb 2016
Reputation: 1
Post: #18
RE: How to detect or manage expansion modules ?
Hello Everybody,

Any update on this topic ?

Best
07-10-2017 12:05 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
Question why phone send gateway ip detect packet pig_tails 1 5,258 06-04-2021 08:38 PM
Last Post: KaithlynMoore
  My T27G does not detect BT40 or WF40 oliv 4 14,809 04-12-2017 01:30 PM
Last Post: oliv
  Detect a yealinkphone cuongvc93 1 6,845 04-22-2015 01:51 PM
Last Post: Elaine_Yealink
  Do not detect inband DTMF aron 0 5,815 03-21-2015 05:38 AM
Last Post: aron

Forum Jump:


User(s) browsing this thread:

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication