Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OTM Time Server for PBX 1

Status
Not open for further replies.

Arugg

MIS
Sep 14, 2004
339
US
I am about to install OTM in our site. It has been requested of me to find out if OTM can serve as the time server for the PBX. In other words can the PBX reset its time based on the OTM box? The reason for this is to help synch time throughout or office. If this is possible I can have the OTM get its time from the network.
 
if you are using procomm, their is a short script you can run that will turn any networked pc into a server. If you use scheduler to fire it off around 23:00 it will wait until a set time and copy the pc time from your windows and set it in your switch.. very cool script i got from and ace over in the aspect forum (knob)... otm by itself does not provide that function unless nortel just slipped it in

john poole
bellsouth business
columbia,sc
 
There is also a UNIX script that you can use that will access the PBX in a "telnet" like setting, using rlogin. This can be placed on the OTM server and run at a set time. We use it to set the time on our main switch, then use Nortels "Network Time Syncronization" to keep the other PBX's (76 Option 11's)in sync.

Just another option.

Scott
 
Here is the .bat and the .exp script we use. Some of the data has been changed to protect the innocent. Some of you will notice this is a UNIX expect script, and user rlogin. You may need to make some minor changes, but this should work. I thought it would be easier to just post it here for the benefit of all.

*************** .bat file ********************

set LOGFILE=stad.log
set PBXIP=10.X.X.X (This is the IP address of your PBX)
set TIMEUSER= xxxx (User ID for time syncronization)
set TIMEPASS= xxxx (User password. It is a good idea to create a user for only this purpose)
set RECIPIENTS=bob@whatever.com (email address in case you want confirmation)
set FROMNAME=server@whatever.com
set MSG=PBX time synchronized


del %LOGFILE%
expect -f stad.exp
if errorlevel 1 set MSG=*ERROR* - PBX time synchronization failure
blat empty.txt -attacht %LOGFILE% -t %RECIPIENTS% -s "%MSG%" -server (sever name) -f %FROMNAME%

********************* .exp file ***********************

#!/usr/local/bin expect -f
#
# expect script to rlogin to PBX and set time
#

log_file [set env(LOGFILE)]

spawn rlogin -l CPSID1110 [set env(PBXIP)]
expect "Done" {} default {exit 1}

#make sure logged out first
send "****\n"
send "logo\n"

# now login
send "logi [set env(TIMEUSER)]\n"
expect "PASS" {} default {exit 1}
send "[set env(TIMEPASS)]\n"
expect ">" {} default {exit 1}

# time user is now logged in
send "ld 2\n"
expect "." {} default {exit 1}

#results sent are from system's date command
send "stad [timestamp -format "%d %m %Y %H %M %S"]\n"
expect "." {} default {exit 1}

*********************************************

Once you have this working, you can access the NTS Feature in LD of your networked PBX's. You could also run multiple scripts to sync multiple PBX's by changing the IP address and login credentials.

If you use NTS, there are only a few things to set in the PBX, and only need one batch/expect script

I can place another post if anyone wants/needs to know how Network Time Syncronization is set up.

Scott
 
here is a short script that i use in procomm, this ver assumes that you are logged on, a couple of lines could be added to run unattented, i use the scheduler packaged with procmomm to auto start procomm, dial my switch, login, set the time to match the pc, logo and hang up... this copy will simple set the time and date to match the pc you start it on

proc main
integer iDay, iMonth, iYear, iMin, iHour, iSec
string sSend

ltimeints $LTIME iYear iMonth iDay iHour iMin iSec

strfmt sSend "STAD %02d %02d %d %02d %02d %02d" iDay iMonth iYear iHour iMin iSec
set txpace 30
transmit "****^M"
waitfor ">"
transmit "ld 2^M"
waitfor "."
transmit "TTAD^M"
waitfor "."
transmit sSend
transmit "^M"
waitfor "."
pause 2
transmit "TTAD^M"
waitfor "."
pause 2
transmit "****^M"

set txpace 0

Endproc


john poole
bellsouth business
columbia,sc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top