Wednesday, March 30, 2011

Cisco router as dhcp client

Sometimes ISP provide only dhcp ip for branch offices.  When you use firewall, I hope you use it Smile, you need use rule for open dhcp traffic  in your firewall.



interface FastEthernet0/0
ip address dhcp
ip access-group ISP in


ip access-list extended ISP
permit udp any eq bootps any eq bootpc

Sunday, March 13, 2011

Bat file for reboot PC remotely

Sometimes you need reboot pc at night. It help you.

@echo off 
dsquery computer ou=workstations,dc=contoso,dc=com -o rdn > pc_workstations.txt
for /F "tokens=*" %%i in (pc_workstations.txt) do call :reboot %%i%
goto Ready

:Reboot
set remotepc=%1%
set remotepc=%remotepc:~1,-1%
shutdown /f /r /c "Reboot by administrator" /m \\%remotepc%
goto :EOF

:Ready

 

Thursday, March 10, 2011

Connect Cisco IP Phone 7960 to Asterisk

Previous post was about upgrade cisco ip phone to SIP version firmware.

Now short post how to setup asterisk

Example sip.conf

[550]
host=dynamic
context = office-all
type=friend
username = 550
secret = secret550
callerid = cisco550 <550>

[551]
host=dynamic
context = office-all
type=friend
username = 551
secret = secret551
callerid = cisco551 <551>

 

 

for reload config run asterisk console and run command

unknown*CLI> config reload /etc/asterisk/sip.conf

 

Cisco 7960 upgrade to SIP firmware

I bought one ip phone cisco 7960 on ebay it was with SCCP firmware. I use asterisk so need upgrade firmware.

Step by step.

1. Download and setup SolarWinds TFTP Server. It is free and works well.

2. Need SIP firmware from cisco site. I downloaded last version P0S3-08-8-00.zip . Unzip it to TFTP directory.

3. We need additional 5 files. I used notepad for it.

3.1 SIP<MAC adresse>.cnf

Example for two lines :


line1_name : 550
line1_authname : 550 ;user name registered in your Asterisk PBX
line1_password : secret550 ;password registered in your Asterisk PBX
line2_name : 551
line2_authname : 551
line2_password : secret551


3.2 SIPDefault.cnf

Example:



#Image Version
image_version:P0S3-08-8-00 ;
#Proxy server address
proxy1_address: 192.168.10.1 ;
proxy_register: 1;


3.3 xmlDefault.CNF.XML

Example:



<loadInformation7 model="IP Phone 7960">P0S3-08-8-00</loadInformation7>


3.4 RINGLIST.DAT

Example:



Piano 1  Piano1.raw
Piano 2 Piano2.raw
Pop Pop.raw
Pulse Pulse1.raw
Old Style ringer1.pcm
Synth Low ringer2.pcm



3.5 dialplan.xml

Example:



<DIALTEMPLATE>

<TEMPLATE MATCH="*" Timeout="5"/> <!-- Anything else -->

</DIALTEMPLATE>


4. Copy all files to TFTP directory. As result we get 10 files.
5. Run TFTP server.
6. Erase cisco ip phone old config.
6.1 Disconnect network cable, power on phone.
6.2 Unlock configuration., go to settings-Network configuration-Erase configuration-yes
6.3 SaveCancel-Exit.
7. Unlock configuration., go to settings-Network configuration-TFTP server. Enter new TFTP server, Save-Exit.

8. Power off, connect network cable, power on phone.

As result you will see tftp server logs and your ip phone will get SIP firmware.

7960_tftp