TUTORIAL step by step guide to setup endpoints

ariban

Member
Joined
Aug 1, 2013
Messages
310
Reaction score
16
Hi,
I looked around in many places and found all kinds of questions and even less answers about setting up the PIAF server to proper configure phones using OSS endpoint manager.
Can someone please help, here is what i did so far and here are some questions (in bold below):

I installed the OSS endpoint manager (from modules) then I typed the following in the ssh command:
yum -y install t*f*t*p-server
yum install nmap
chkconfig ntpd on
/etc/init.d/ntpd start
chkconfig t*f*t*p on
chmod 777 /tftpboot/

/sbin/chkconfig --level 345 xinetd on

/sbin/chkconfig --level 345 t*f*t*p on
/etc/init.d/xinetd restart

I read in various places to make sure that option 66 is enabled, how do i do that? (please provide step by step).

Then I went to connectivity > and put my servers ip address 192.168.1.126
then in oss package manager i installed the phones i have, polycom and cisco 504g
then in oss endpoint device list, i put the mac address, and selected the phone and lines to use for each phone.

Then for my polycom phones i did the following:
enter the setup menu and use the password 456 when prompted. Make sure DHCP is set to enabled and in the DHCP Menu the Boot Serveroption is set to Custom+Opt.66. Next in the Server Menu make sure the Server Type is set to TrivialFTP then set the Server Address option to the IP address of your AsteriskNow server. Once this is all set reboot the phone and it should connect to the server, synchronize it’s time, download and install the new firmware files, and update it’s configuration with the extension settings.


for my cisco 504g phone i simply did the following:
In provisioning change the profile rule to: t*f*t*p://server ip address/spa$MA.xml

so now my polycom phone works, and my cisco phone shows the new time (since we moved an hour forward last night), however the following dont work and i dont know if i am doing something wrong:

1. both on polycom and cisco phones, i dont know how to download the contacts that i have in my server either in asterisk phonebook or nerd vittles asterdix, can this be done for all phones? or anyone to do this with another source of phonebook?
2. the cisco phone doesnt really effect any changes other than the correct time, but the phone lines are whatever was manually set in the phone and not updated via the oss endpoint manager.
3. i also have the cisco pap2 adapters can i program these as well and if yes how?

thank you in advance for your time and help.
Ben
 

ariban

Member
Joined
Aug 1, 2013
Messages
310
Reaction score
16
also if someone can highlight a few other features that can be done with oss endpoint that i dont know about. i know there must be alot but what are the top 5.
thx
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
Option 66 is configured at your DHCP server. I find it useful to also define option 150.
If you are using Microsoft DHCP, the value for 66 is: t*f*t*p://x.x.x.x/
where x.x.x.x is the IP address of the t*f*t*p server
likewise option 150 is: x.x.x.x

You may need to update your cisco phone firmware, and I usually do a factory reset from the phone's menu.
Another thing to check is if you have CDP installed anywhere on your network. These phones will sometimes annoyingly go into a another vlan if CDP is setup in a way you are not expecting. You can try and disable CDP on the phone to make sure nothing funky or unexpected is occurring.

I have my OSS EPM updating my firmware automatically. this is my update rule string (goes in the template you have assigned for the phone)
Code:
($SWVER lt 7.5.2b) ? t*f*t*p://x.x.x.x/spa50x-30x-7-5-2b.bin | t*f*t*p://x.x.x.x/spa50x-30x-7-5-6.bin
Same as above, x.x.x.x is your t*f*t*p server.
Obviously you need to download the firmware files from Cisco and place the firmware files in your /tftpboot/ folder.
7.5.7 is current, feel free to use that if you like, we are still only at 7.5.6
7.5.2b is an intermediary update and is required if your firmware level is below that to reach current.
The rule will do the two step upgrade automagically.

make sure you scan the network, assign a phone to an extension, rebuild the configs and then reboot the phone. (you probably will need to manually reboot the first time, until the phone is latched to your server)
 

ariban

Member
Joined
Aug 1, 2013
Messages
310
Reaction score
16
Hi Synack,

So i think i edited the right file nano /etc/dhcp/dhcpd.conf
in this file was

# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
# see 'man 5 dhcpd.conf'
#

I added the following:
dhcp-option=66, t*f*t*p://192.168.1.126
dhcp-option=150, t*f*t*p://192.168.1.126

did i do this correct and is it in the right file?

do i need to restart anything? if yes what command do i do??

i then went into oss endpoint template manager and the only place in spa504g template that said upgrade rule was in spa$mac.xml
it said in there
<!-- Firmware -->
<Upgrade_Enable ua="ro">{$enable_upgrade}</Upgrade_Enable>
<Upgrade_Rule ua="ro">{$upgrade_path}</Upgrade_Rule>
i changed that to be
<!-- Firmware -->
<Upgrade_Enable ua="ro">{$enable_upgrade}</Upgrade_Enable>
<Upgrade_Rule ua="ro">($SWVER lt 7.5.2b) ? t*f*t*p://192.168.1.126/spa50x-30x-7-5-2b.bin | t*f*t*p://192.168.1.126/spa50x-30x-7-5-7.bin</Upgrade_Rule>

but its still not doing anything and its still on the firmware 7.4.9c
yes i put the files that i downloaded from cisco the .bin files in /tftpboot

i dont have cpd on the network.
can you please tell me what i am doing wrong?

thank you
Ben
 

mike s.

New Member
Joined
Jan 4, 2015
Messages
2
Reaction score
0
I know its a little off topic, but I'm having trouble setting up my Commercial(paid) EndPoint Manager doing BLF function with call Parking (Pro) I'm using Cisco SPA525G2 phones that at this moment all setup one by one manually ( thru web interface) and I dont have any issue using line commands:


fnc=blf+sd+cp;sub=71@$PROXY;nme=LINE 1 - NO issue reprodusing it under profiles at endpoint Mgr as BLF and Value *8571


fnc=blf+sd+cp;sub=72@$PROXY;nme=LINE 2 - BLF and Value *8572
fnc=sd;ext=70@$PROX;nme=PARK MY Call - but no way I can generate this string , the only way I can do is to use *8670 - but its not doing the same thing such as park call on next spot and hangup

Please help, Thx mike
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
Hi Synack,

So i think i edited the right file nano /etc/dhcp/dhcpd.conf
in this file was

# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
# see 'man 5 dhcpd.conf'
#

I added the following:
dhcp-option=66, t*f*t*p://192.168.1.126
dhcp-option=150, t*f*t*p://192.168.1.126

did i do this correct and is it in the right file?

do i need to restart anything? if yes what command do i do??

i then went into oss endpoint template manager and the only place in spa504g template that said upgrade rule was in spa$mac.xml
it said in there
<!-- Firmware -->
<Upgrade_Enable ua="ro">{$enable_upgrade}</Upgrade_Enable>
<Upgrade_Rule ua="ro">{$upgrade_path}</Upgrade_Rule>
i changed that to be
<!-- Firmware -->
<Upgrade_Enable ua="ro">{$enable_upgrade}</Upgrade_Enable>
<Upgrade_Rule ua="ro">($SWVER lt 7.5.2b) ? t*f*t*p://192.168.1.126/spa50x-30x-7-5-2b.bin | t*f*t*p://192.168.1.126/spa50x-30x-7-5-7.bin</Upgrade_Rule>

but its still not doing anything and its still on the firmware 7.4.9c
yes i put the files that i downloaded from cisco the .bin files in /tftpboot

i dont have cpd on the network.
can you please tell me what i am doing wrong?

thank you
Ben

No I don't believe that is correct for dhcpd.conf
I believe it's something like:
Code:
option tftp66 code 66 = t*f*t*p://192.168.1.126/
option tftp150 code 150 = 192.168.1.126
you would need to restart dhcpd or at least HUP it to re-read it's configuration.

as for the upgrade rule, can you not select the upgrade rule/enable upgrade from the General tab?
You should not need to manually edit the spa$mac.xml files at all unless you want to do some advanced features.
Doing so, without knowing the ramifications may have already messed up your config files.
I would suggest keeping it simple until you have a working configuration before making changes to those files.

If you have any cisco or cisco like switches (including linksys) you *may* have CDP and not know it... which is why I suggest you disable it on the phone anyway.

You may also want to check to make sure your t*f*t*p server is running. You did start it you said, right?
run:
netstat -tupan | grep 69
and you should see a line similar to:
Code:
udp        0      0 0.0.0.0:69                  0.0.0.0:*                              1406/xinetd
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
Oh, and this DHCP server is your ONLY DHCP server on this network right?
You can't mix and match DHCP servers without being very careful, so just don't.
 

ariban

Member
Joined
Aug 1, 2013
Messages
310
Reaction score
16
I put the upgrade in the general tabs and now its working! thank you (i reverted the file to the original file)
so i guess this means that my machine is set up properly even though i didnt do anything but for my knowledge and for others who need help with this:

can you please tell me where the correct dhcpd.conf file is for me to change. and i believe its the only dhcp server i never did anything all i did was install the cd from nerdvittles. below is my install info please let me know where is the file and what command to type in to restart the dhcp server with the new settings you wrote.

│ │
│ PIAF Installed Version = 3.0.6.5 under *HARDWARE* │
│ FreePBX Version = 2.11.0.42 │
│ Running Asterisk Version = 11.12.0 │
│ Asterisk Source Version = 11.12.0 │
│ Dahdi Source Version = 2.10.0 │
│ Libpri Source Version = 1.4.15 │
│ IP Address = 192.168.1.126 on eth0 │
│ Operating System = CentOS release 6.5 (Final) >< │
│ Kernel Version = 2.6.32-431.29.2.el6.i686 - 32 Bit │
│ Incredible Version = 11.10


also when i run netstat -tupan | grep 69 here are the results

tcp 0 0 127.0.0.1:25 0.0.0.0:* LIST EN 1697/sendmail
udp 0 0 0.0.0.0:69 0.0.0.0:* 7966/xinetd
udp 0 0 0.0.0.0:4569 0.0.0.0:* 4475/asterisk
Thank you for all your help and guidance!
Ben
 

ariban

Member
Joined
Aug 1, 2013
Messages
310
Reaction score
16
also is there a way to send all contacts from asterdix or asterisk phone book to all phones via this same method?
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
DHCP could be on one of many devices. Often your default gateway/firewall is configured as such. If your computers on your network get an IP address from *somewhere* it's likely you have DHCP on your network already. I couldn't tell you what your network looks like, so this is something you will likely need to figure out prior to configuring dhcp on your PBX. Running 2 without proper precautions and lots of manual work WILL cause problems on your network.

As for the file location, you had it correct. I was saying that your directives were wrong. (assuming you have the standard ISC DHCPD server on your pbx installed)

contacts from asteridex/phonebook will need to have some sort of translation to cisco's XML format. There may be something already built on the net or not, I do not know. But the cisco phone (and oss epm) allows for configuration of the phonebook xml location. Again, on the general tab, called XML Directory service.
I cannot stress enough that you will need to correctly build the xml file in some way to enable this feature. As far as I know, it's not created for you on your server.

If you manage to build a php file that pulls from asteridex and provides the correct xml to the cisco phones, please feel free to share it, as I'm sure it would be useful to others.

You asked for "extras", I know there is a visual voicemail xml app "out there" on the cisco forums that works ok. This I believe requires manual modification of the config files I told you not to modify... So don't try it until you have a known working configuration and please backup your config file before you change it.
 

ariban

Member
Joined
Aug 1, 2013
Messages
310
Reaction score
16
DHCP could be on one of many devices. Often your default gateway/firewall is configured as such. If your computers on your network get an IP address from *somewhere* it's likely you have DHCP on your network already. I couldn't tell you what your network looks like, so this is something you will likely need to figure out prior to configuring dhcp on your PBX. Running 2 without proper precautions and lots of manual work WILL cause problems on your network.

Ok I think i understand now, so i am using a cisco router with dd-wrt installed on it, this is what i have to make the changes?? i found this link for dd wrt routers: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=9195

contacts from asteridex/phonebook will need to have some sort of translation to cisco's XML format. There may be something already built on the net or not, I do not know. But the cisco phone (and oss epm) allows for configuration of the phonebook xml location. Again, on the general tab, called XML Directory service.
I cannot stress enough that you will need to correctly build the xml file in some way to enable this feature. As far as I know, it's not created for you on your server.

I will try working on this, see if i come up with anything and I will post it for others as well.

Thank you for all your help and time!
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
Here is a php file I created for my business to build a "Corporate Directory" from each of my piaf servers by location (using extension list from mysql). I have a company wide VPN mesh, so I used internal IP addresses for the server names. You will need to modify it to suit your needs, but it's a start anyway.
setup your sites inside the php as appropriate:
Code:
menuitem("Site A", "http://x.x.x.x/directory.php?getextlist=1&amp;returl=$LOCAL");
menuitem("Site B", "http://x.x.x.x/directory.php?getextlist=1&amp;returl=$LOCAL");
A copy of this PHP file would need to be uploaded to each piaf server /var/www/html
Then change $LOCALTITLE="Site A"; to be whatever you want to call each of your sites on EACH server/php file. it's just a label for that grouping, so set it to what makes sense for you.
Anytime you add a site, you will want to add a new menuitem on each server.
Basically each menuitem pulls an extension list from that site's server.
***None of this code has been validated for security.. it's my own little project and my servers are not exposed to the internet.***
I think it would be obvious how to accomplish site A only having directories for certain sites etc..
You would add this as a button on your cisco phone by editing the spa$mac file and modifying the following entries:
Code:
<Programmable_Softkey_Enable ua="na">Yes</Programmable_Softkey_Enable>
<Idle_Key_List ua="na">redial|1;NewCall|2;cfwd|3;dnd|4;PSK1|5;lcr|7;</Idle_Key_List>
<PSK_1 ua="na">fnc=xml;url=http://x.x.x.x/directory.php;nme=dir</PSK_1>
x.x.x.x of course is the IP to the piaf server appropriate for that phone.
p.s. Following what I have done already, it might be fairly trivial to add asteridex support via another sql query and maybe an "external" site?
 

Attachments

  • directory.zip
    976 bytes · Views: 5

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
In the code tag above, I intended the following to be bolded:
<Programmable_Softkey_Enable ua="na">Yes</Programmable_Softkey_Enable>
<Idle_Key_List ua="na">redial|1;NewCall|2;cfwd|3;dnd|4;PSK1|5;lcr|7;</Idle_Key_List>
<PSK_1 ua="na">fnc=xml;url=http://x.x.x.x/directory.php;nme=dir</PSK_1>
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
Doh.. the directory thing above also needs an Application->Directory setup in freepbx (it uses the directory_entries table)
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
it's a slow day for me today....
directory.php with asteridex for outside numbers.
At the top you can specify your dialout prefix (dial 9 by default)

notice the getextlist=2 in menuitem for asteridex. fill out the blanks as above.
 

Attachments

  • directory.zip
    1.1 KB · Views: 6

ariban

Member
Joined
Aug 1, 2013
Messages
310
Reaction score
16
amazing i will play around with all this.

i guess one guru's slow day is another newbies super fast day!!
 

ariban

Member
Joined
Aug 1, 2013
Messages
310
Reaction score
16
ok so i played around for a few hours since you posted and i uploaded your first file without asterdix to make things easier on me. i uploaded the file with the changes to x.x.x.x to be my ip address of the pbx server.

i edited spa$mac file to be
<Programmable_Softkey_Enable ua="na">Yes</Programmable_Softkey_Enable>
<Idle_Key_List ua="na">redial|1;NewCall|2;cfwd|3;dnd|4;PSK1|5;lcr|7;</Idle_Key_List>
<PSK_1 ua="na">fnc=xml;url=http://192.168.1.126/directory.php;nme=dir</PSK_1>

and in general tabs i added the XML directory server URL to be:
http:/192.168.1.126/directory.php;nme=dir

once saved and rebooted, i now see the NEW dir button on the phone, when i push that it shows SITE A and when i push select its empty, its not bringing up my entries in my asterisk phone book http://192.168.1.126/admin/config.php?display=phonebook

what am i doing wrong?
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
That's the asterisk phonebook, not asteridex. let me look into what's needed for the phonebook. What kind of numbers do you have in the phonebook? are they internal? external? or both? That phonebook is meant more for setting up systemwide speed dials eg: speeddial 767 = 18005551212
 

synack

Guru
Joined
Dec 31, 2013
Messages
227
Reaction score
56
Oh yuck, the asterisk phonebook uses the Asterisk AGI. The DB backend on the agi is not all that great. I would strongly consider using something else like asteridex with a proper DB backend.
If you really really must use the Asterisk phonebook, I invite you to refer to /var/lib/asterisk/agi-bin/pbdirectory file for hints on what code you would need to integrate into the directory php I provided.
I unfortunately won't have the time to get too involved into that, but I am available for questions.
 

Members online

Forum statistics

Threads
25,801
Messages
167,719
Members
19,232
Latest member
voiplads
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top