• Welcome to SAIL Community Supported PBX . Please login or sign up.
 

Polycom provisioning

Started by PWDasterisk, May 09, 2016, 05:57:21 AM

Previous topic - Next topic

PWDasterisk

May 09, 2016, 05:57:21 AM Last Edit: May 10, 2016, 11:09:12 AM by PWDasterisk
I never had issues with the older sail versions using legacy polycom phones. I just upgraded to 4.1 on debian and I have not been able to get either older IP550(ver3_3_5) or newer VVX 500(ver4_1_8) to receive the provisioning files from the http /provisioning directory.  I manually upgraded both models to the recommended software using the http://voipt2.polycom.com website.

Where are the specific [MACADDRESS].cfg, [MACADDRESS]-polycom-phone1.cfg , [MACADDRESS]-polycom-locals.cfg files being placed? They are not in the /public/polycom folder and I can't see them in the sark.db sqlite3 database.

This is what /var/log/messages puts out on a provisioning attempt:

May  8 23:21:52 asterisk apache2: 192.168.1.55 0004f2afe689-calls.xml provisioning data not found in db.  Sending 404 and giving up
May  8 23:21:52 asterisk apache2: 192.168.1.55 sending config 0004f2afe689-directory.xml
May  8 23:21:52 asterisk apache2: 192.168.1.55 0004f2afe689-calls.xml provisioning data not found in db.  Sending 404 and giving up
May  8 23:21:52 asterisk apache2: 192.168.1.55 sending config 0004f2afe689-directory.xml
May  8 23:21:53 asterisk apache2: 192.168.1.55 sending config 0004f2afe689.cfg
May  8 23:21:53 asterisk apache2: 192.168.1.55 sending config 0004f2afe689-phone.cfg
May  8 23:21:53 asterisk apache2: 192.168.1.55 0004f2afe689-web.cfg provisioning data not found in db.  Sending 404 and giving up
May  8 23:21:53 asterisk apache2: 192.168.1.55 000000000000-license.cfg not found in db(RowCount).  Sending 404 and giving up
May  8 23:21:53 asterisk apache2: 192.168.1.55 0004f2afe689-license.cfg provisioning data not found in db.  Sending 404 and giving up
May  8 23:21:53 asterisk apache2: 192.168.1.55 Ignoring PUT request - Sending 200 and giving up
May  8 23:21:55 asterisk apache2: 192.168.1.55 Ignoring PUT request - Sending 200 and giving up


The polycom logs are long and not very descriptive, This is a sample of Minor Errors:

000036.338|clist|4|00|dbSet::startLoadLocalSet:No local copy, requesting backup from server
000036.484|clist|4|00|dbIO::processResult:copy error
000036.484|clist|4|00|dbSet::srv2mem:transfer failed
000036.593|clist|4|00|dbSet::startLoadLocalSet:No local copy, requesting backup from server
000036.593|clist|4|00|dbSet::load:cleared load error state m_sync=<0x40>
000036.629|clist|4|00|dbIO::processResult:copy error
000036.629|clist|4|00|dbSet::srv2mem:transfer failed


If I look at the Polycoms through their direct web interface they are all at default settings after booting up so the cfg files are invalid or not being accepted. Additionally each Polycom model family have different cfg formats but require identical file names so there would have to be distinctive folders under the public share to accomodate this. Looking at your sark.conf and device.php it that you are just pushing them out which means a wireshark packet trace is the only way to see what is being transmitted.

Do you have documentation posted on how the .cfg files are built?



...if at first you don't succeed then keep on reading until you do succeed.

sysadmin

May 10, 2016, 10:49:23 PM #1 Last Edit: May 10, 2016, 10:53:11 PM by sysadmin
If we are talking about the same thing then the latest GA SIP firmware, according to the Polycom matrix is 4.0.10.   Most of the testing we did in 4.1 SARK if I remember correctly used VVX phones on 4.0.4.

The templates can be found in the template tab under end-points in 4.1.   You should have templates for Polycom, polycom-locals.cfg, polycom-phone1.cfg and polycom.Fkey.  4.x uses a new provisioning engine based upon a simple pseudo language to synthesise provisioning streams on-the-fly.   It's easy enough, at least locally, to see what is being sent simply by entering the same URI's the phones send, into your browser.    The provisioning server will send you the stream.    So, for example, in the case of a Polycom,  if you entered

http://ip.,address.of.sark/provisioning/0004f2afe689.cfg

...then it will present you with the same stream it would send to the phone.

The provisioning server recognises only a few Polycom filetypes (as described above).   Anything else a Polycom asks for is automatically redirected to the Polycom public folder via mod_rewrite.   If the file is there, it will be served, if not, it won't.   Polycom, suggest you unzip the entire Polycom firmware pack into the provisioning folder, which in our case is /public/polycom.   We've followed the standard Polycom guidelines in terms of naming conventions, file structure and the bootstrap XML techniques they use.   For avoidance of doubt, we don't supply, ship, touch the base Polycom firmware.   There is nothing in the public/polycom folder put there by us.   It is up to the user to licence, choose, download and unzip the correct firmware into that folder. 

Hope this helps get you on the road.











PWDasterisk

Thanks,  that's enough info to start troubleshooting.

I will probably have to add specific phone model folders under the polycom directory, customize the rewrite rules and device.php code to accomodate the different polycom phones. Polycom file names are identical between versions and phones but are not compatible with each other. 

I will post the mods once I have them working.
...if at first you don't succeed then keep on reading until you do succeed.

PWDasterisk

May 19, 2016, 04:13:23 AM #3 Last Edit: May 19, 2016, 03:31:23 PM by PWDasterisk
I suspect there's a bug in the Polycom provisioning provisioning code. I don't know php so can't identify the specific error.

The Polycom templates are all there.
Distro: debian
Sail Release: 4.1.0-12
HPE Release: 4.0.0-37
Server IP = 192.168.1.30
Polycom VVX mac = 0004f2afe689
Polycom Version = 4.0.10

This is the output I get:

http://192.168.1.30/provisioning/0004f2afe689.cfg

<?xml version="1.0" standalone="yes"?>
<!-- $RCSfile$  $Revision: 155256 $ -->
<APPLICATION APP_FILE_PATH="sip.ld"
CONFIG_FILES="[MACADDRESS]-polycom-locals.cfg, [MACADDRESS]-polycom-phone1.cfg" />
<!--MISC_FILES=""  LOG_FILE_DIRECTORY=""  OVERRIDES_DIRECTORY=""  CONTACTS_DIRECTORY=""  LICENSE_DIRECTORY="" 

USER_PROFILES_DIRECTORY=""  CALL_LISTS_DIRECTORY=""  COREFILE_DIRECTORY=""-->


http://192.168.1.30/provisioning/0004f2afe689-polycom-locals.cfg

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Our local phone system common configuration in this file -->
<localcfg>
<server voIpProt.server.1.address="192.168.1.30"/>
<SIP>
   <outboundProxy voIpProt.SIP.outboundProxy.address="192.168.1.30"/>
</SIP>
<TCP_IP>
   <SNTP tcpIpApp.sntp.resyncPeriod="86400" tcpIpApp.sntp.address="192.168.1.30" tcpIpApp.sntp.address.overrideDHCP="0"

tcpIpApp.sntp.gmtOffset="0" tcpIpApp.sntp.gmtOffset.overrideDHCP="0" tcpIpApp.sntp.daylightSavings.enable="1" />
</TCP_IP>
<call>
         <call.directedCallPickupMethod="legacy" call.directedCallPickupString="*8" />
         <missedCallTracking call.missedCallTracking.1.enabled="1"
          call.missedCallTracking.2.enabled="0" call.missedCallTracking.3.enabled="0"
          call.missedCallTracking.4.enabled="0" call.missedCallTracking.5.enabled="0"
          call.missedCallTracking.6.enabled="0"/>
</call>
<!-- Registration info -->
<attendant
          attendant.uri=""
          attendant.reg="1"
          attendant.behaviors.display.spontaneousCallAppearances.normal="1"
          attendant.behaviors.display.spontaneousCallAppearances.automata="1"
          attendant.behaviors.display.remoteCallerID.normal="1"
          attendant.behaviors.display.remoteCallerID.automata="1"
/>
</localcfg>


http://192.168.1.30/provisioning/0004f2afe689-polycom-phone1.cfg
Not Found (404)

Whatever section of code is supposed to generate the [MACADDRESS]-polycom-phone1.cfg is failing.

Here are the var/log/messages:

May 18 19:14:40 asterisk apache2: 192.168.1.10 sending config 0004f2afe689-phone.cfg
May 18 19:14:42 asterisk apache2: 192.168.1.10 sending config 0004f2afe689.cfg
May 18 21:05:02 asterisk apache2: 192.168.1.10 sending config 0004f2afe689-polycom-locals.cfg
May 18 21:05:49 asterisk apache2: 192.168.1.10 sending config 0004f2afe689-polycom-locals.cfg
May 18 21:06:18 asterisk apache2: 192.168.1.10 0004f2afe689-polycom-phone1.cfg Sending 404 because creds already sent
May 18 21:10:46 asterisk apache2: 192.168.1.10 0004f2afe689-phone1.cfg provisioning data not found in db.  Sending 404 and giving up
May 18 21:12:26 asterisk apache2: 192.168.1.10 0004f2afe689-polycom-phone.cfg provisioning data not found in db.  Sending 404 and giving up
May 18 22:17:11 asterisk apache2: 192.168.1.10 0004f2afe689-polycom-phone1.cfg Sending 404 because creds already sent
May 18 22:19:03 asterisk apache2: 192.168.1.10 0004f2afe689-polycom-phone1.cfg Sending 404 because creds already sent


...if at first you don't succeed then keep on reading until you do succeed.

sysadmin

The reason you are getting the 404 is due to the way in which SARK provisions.   By default it will only send phone creds once and never again until told to.   This used to be fine on older Polycom firmwares but later ones seem to want the creds on every pass.  You can force this by setting the 'AUTH' value (on the extensions screen) to 'Always'.  Most other phone types are happy to fetch their provisioning without getting creds each time but Polycoms less so.