Настройка IP-телефонов Cisco 79 серии для работы за NAT и отладка
Телефоны Cisco 79 серии могут работать за NAT. Но всё не так просто. Через веб-интерфейс телефон не настроить, это связано с тем что данные телефоны предназначены для работы с АТС Cisco и автоматически настраиваются через интерфейс данной АТС, всё остальное это «танцы с бубном» и «колхоз». Но так как телефоны очень хорошие, имеет смысл это сделать.
Пример ниже, написан для телефона Cisco 7945, но также подойдёти для остальных телефонов серии, например Cisco 7942, Cisco 7940 и т.д. Итак проблемы с которыми придётся столкнуться при настройке телефона:
- Отсутствие веб-интерфейса(он есть но в нём ничего не настроить)
- Необходимость использовать TFTP сервер и написать конфигурацию в формате xml.
- Есть особенности настройки телефона за NAT
- Нужно знать как посмотреть состояние телефона и включить отладку
Сначала нужно обновить телефон правильной версии SIP-прошивки(cmterm-7945_7965-sip.8-5-4.zip), инструкция находится здесь.http://www.ucexpert.ru/archives/5468
У нас будет две линии. Ниже приводится пример настройки для оператора Telphin.
Линия L1: userid/auth=000155555 pass=ClasddfH 812 3090000
Линия L2: userid/auth=000155556 pass=ddfHClas 812 3090001 server=voice.telphin.com port=5068
Внешний IP и порт маршрутизатора(да это IP-адрес DNS-сервера Google, просто для примера:)):
8.8.8.8:5068
Тут важный момент, что мы указывает для первой и второй линии один и тот же входящий порт 5068(теги <sipPort> на 1 и второй линиях), хотя можно использовать любой другой порт. На маршрутизаторе с внешним IP(8.8.8.8) нужно его прокинуть на IP-адрес телефона (192.168.2.5) и порт (5068). В нашем примере это 192.168.2.5 порт 5068 Также мы указываем телефону, что он находится за NAT и указываем внешний IP-адрес который будет поставляться в тегах SIP сообщений.
<natEnabled>true</natEnabled> <natAddress>8.8.8.8</natAddress>
Для отладки телефона нужен доступ к его консоли по ssh, для этого нужно указать логин и пароль для доступа при помощи следующих тегов:
<sshUserId>cisco</sshUserId> <sshPassword>badpassword</sshPassword>
В примере 192.168.2.5 это IP-адрес телефона Cisco 7945. Пишем конфигуращи и загружаем её в телефон (подробности как это сделать в предыдущей инструкции http://www.ucexpert.ru/archives/5468 ):
cat SEP00235E186B89.cnf.xml
<?xml version="1.0" encoding="UTF-8"?>
<device xsi:type="axl:XIPPhone" ctiid="966" uuid="{ec039a47-2b24-d05b-6ae3-2c18e269a9df}">
<fullConfig>true</fullConfig>
<deviceProtocol>SIP</deviceProtocol>
<sshUserId>cisco</sshUserId>
<sshPassword>56awesZ</sshPassword>
<devicePool>
<revertPriority>0</revertPriority>
<name>Default</name>
<dateTimeSetting>
<name>CMLocal</name>
<dateTemplate>D.M.Y</dateTemplate>
<timeZone>Saudi Arabia Standard Time</timeZone>
<ntps>
<ntp>
<name>192.168.2.5</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<name>Default</name>
<tftpDefault>false</tftpDefault>
<members>
<member priority="0">
<callManager>
<name>Telphin</name>
<description>ucexpert.ru</description>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
<sipPort>5068</sipPort>
<securedSipPort>5061</securedSipPort>
<mgcpPorts>
<listen>2427</listen>
<keepAlive>2428</keepAlive>
</mgcpPorts>
</ports>
<processNodeName>127.0.0.1</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo>
<name>Disable</name>
<srstOption>Disable</srstOption>
<userModifiable>false</userModifiable>
<ipAddr1></ipAddr1>
<port1>2000</port1>
<ipAddr2></ipAddr2>
<port2>2000</port2>
<ipAddr3></ipAddr3>
<port3>2000</port3>
<sipIpAddr1></sipIpAddr1>
<sipPort1>5068</sipPort1>
<sipIpAddr2></sipIpAddr2>
<sipPort2>5068</sipPort2>
<sipIpAddr3></sipIpAddr3>
<sipPort3>5068</sipPort3>
<isSecure>false</isSecure>
</srstInfo>
<mlppDomainId>-1</mlppDomainId>
<mlppIndicationStatus>Default</mlppIndicationStatus>
<preemption>Default</preemption>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<sipProfile>
<sipProxies>
<registerWithProxy>true</registerWithProxy>
</sipProxies>
<sipCallFeatures>
<cnfJoinEnabled>true</cnfJoinEnabled>
<callForwardURI>x-cisco-serviceuri-cfwdall</callForwardURI>
<callPickupURI>x-cisco-serviceuri-pickup</callPickupURI>
<callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI>
<callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI>
<meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI>
<abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI>
<rfc2543Hold>false</rfc2543Hold>
<callHoldRingback>2</callHoldRingback>
<localCfwdEnable>true</localCfwdEnable>
<semiAttendedTransfer>true</semiAttendedTransfer>
<anonymousCallBlock>2</anonymousCallBlock>
<callerIdBlocking>2</callerIdBlocking>
<dndControl>0</dndControl>
<remoteCcEnable>true</remoteCcEnable>
<retainForwardInformation>false</retainForwardInformation>
</sipCallFeatures>
<sipStack>
<sipInviteRetx>6</sipInviteRetx>
<sipRetx>10</sipRetx>
<timerInviteExpires>180</timerInviteExpires>
<timerRegisterExpires>300</timerRegisterExpires>
<timerRegisterDelta>5</timerRegisterDelta>
<timerKeepAliveExpires>120</timerKeepAliveExpires>
<timerSubscribeExpires>120</timerSubscribeExpires>
<timerSubscribeDelta>5</timerSubscribeDelta>
<timerT1>500</timerT1>
<timerT2>4000</timerT2>
<maxRedirects>70</maxRedirects>
<remotePartyID>true</remotePartyID>
<userInfo>None</userInfo>
</sipStack>
<autoAnswerTimer>1</autoAnswerTimer>
<autoAnswerAltBehavior>false</autoAnswerAltBehavior>
<autoAnswerOverride>true</autoAnswerOverride>
<transferOnhookEnabled>false</transferOnhookEnabled>
<enableVad>false</enableVad>
<preferredCodec>none</preferredCodec>
<dtmfAvtPayload>101</dtmfAvtPayload>
<dtmfDbLevel>3</dtmfDbLevel>
<dtmfOutofBand>avt</dtmfOutofBand>
<kpml>3</kpml>
<natEnabled>true</natEnabled>
<natAddress>8.8.8.8</natAddress>
<phoneLabel>Some Label</phoneLabel>
<stutterMsgWaiting>2</stutterMsgWaiting>
<callStats>true</callStats>
<offhookToFirstDigitTimer>15000</offhookToFirstDigitTimer>
<silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
<disableLocalSpeedDialConfig>true</disableLocalSpeedDialConfig>
<poundEndOfDial>false</poundEndOfDial>
<startMediaPort>16384</startMediaPort>
<stopMediaPort>32766</stopMediaPort>
<sipLines>
<line button="1" lineIndex="1">
<featureID>9</featureID>
<featureLabel>812 3090000</featureLabel>
<proxy>voice.telphin.com</proxy>
<port>5068</port>
<name>000155555</name>
<displayName>000155555</displayName>
<autoAnswer>
<autoAnswerEnabled>2</autoAnswerEnabled>
</autoAnswer>
<callWaiting>3</callWaiting>
<authName>000155555</authName>
<authPassword>ClasddfH</authPassword>
<sharedLine>false</sharedLine>
<messageWaitingLampPolicy>3</messageWaitingLampPolicy>
<messageWaitingAMWI>0</messageWaitingAMWI>
<messagesNumber></messagesNumber>
<ringSettingIdle>4</ringSettingIdle>
<ringSettingActive>5</ringSettingActive>
<contact>000155555</contact>
<forwardCallInfoDisplay>
<callerName>true</callerName>
<callerNumber>false</callerNumber>
<redirectedNumber>false</redirectedNumber>
<dialedNumber>true</dialedNumber>
</forwardCallInfoDisplay>
</line>
<line button="2" lineIndex="2">
<featureID>9</featureID>
<featureLabel>812 3090001</featureLabel>
<proxy>voice.telphin.com</proxy>
<port>5068</port>
<name>000155556</name>
<displayName>000155556</displayName>
<autoAnswer>
<autoAnswerEnabled>2</autoAnswerEnabled>
</autoAnswer>
<callWaiting>3</callWaiting>
<authName>000155556</authName>
<authPassword>ddfHClas</authPassword>
<sharedLine>false</sharedLine>
<messageWaitingLampPolicy>3</messageWaitingLampPolicy>
<messageWaitingAMWI>0</messageWaitingAMWI>
<messagesNumber></messagesNumber>
<ringSettingIdle>4</ringSettingIdle>
<ringSettingActive>5</ringSettingActive>
<contact>000155556</contact>
<forwardCallInfoDisplay>
<callerName>true</callerName>
<callerNumber>false</callerNumber>
<redirectedNumber>false</redirectedNumber>
<dialedNumber>true</dialedNumber>
</forwardCallInfoDisplay>
</line>
</sipLines>
<externalNumberMask></externalNumberMask>
<voipControlPort>5068</voipControlPort>
<dscpForAudio>184</dscpForAudio>
<dscpVideo>136</dscpVideo>
<ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
<dialTemplate>dialplan.xml</dialTemplate>
<alwaysUsePrimeLine>false</alwaysUsePrimeLine>
<alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
</sipProfile>
<MissedCallLoggingOption>10</MissedCallLoggingOption>
<commonProfile>
<phonePassword></phonePassword>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<loadInformation>SIP45.8-5-4S</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker><disableSpeakerAndHeadset>false</disableSpeakerAndHeadset><forwardingDelay>1</forwardingDelay><pcPort>0</pcPort><settingsAccess>1</settingsAccess><garp>1</garp><voiceVlanAccess>0</voiceVlanAccess><videoCapability>0</videoCapability><autoSelectLineEnable>0</autoSelectLineEnable><webAccess>0</webAccess><daysDisplayNotActive></daysDisplayNotActive><displayOnTime></displayOnTime><displayOnDuration></displayOnDuration><displayIdleTimeout>01:00</displayIdleTimeout><spanToPCPort>1</spanToPCPort><loggingDisplay>1</loggingDisplay><loadServer></loadServer><recordingTone>0</recordingTone><recordingToneLocalVolume>100</recordingToneLocalVolume><recordingToneRemoteVolume>50</recordingToneRemoteVolume><recordingToneDuration></recordingToneDuration><displayOnWhenIncomingCall>0</displayOnWhenIncomingCall><rtcp>0</rtcp><moreKeyReversionTimer>5</moreKeyReversionTimer><autoCallSelect>1</autoCallSelect><logServer></logServer><g722CodecSupport>0</g722CodecSupport><headsetWidebandUIControl>0</headsetWidebandUIControl><headsetWidebandEnable>0</headsetWidebandEnable><peerFirmwareSharing>0</peerFirmwareSharing><enableCdpSwPort>1</enableCdpSwPort><enableCdpPcPort>1</enableCdpPcPort><enableLldpSwPort>1</enableLldpSwPort><enableLldpPcPort>1</enableLldpPcPort><lldpAssetId></lldpAssetId><powerPriority>0</powerPriority><ehookEnable>0</ehookEnable><detectCMConnectionFailure>0</detectCMConnectionFailure><minimumRingVolume>0</minimumRingVolume><handsetHeadsetMonitor>1</handsetHeadsetMonitor><useEnblocDialing>1</useEnblocDialing><SWRemoteConfig>0</SWRemoteConfig><PCRemoteConfig>0</PCRemoteConfig><PortAutoLinkSync>0</PortAutoLinkSync></vendorConfig>
<userLocale>
<name>English_United_States</name>
<uid>1</uid>
<langCode>en_US</langCode>
<version></version>
<winCharSet>UTF-8</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<uid>64</uid>
<version></version>
</networkLocaleInfo>
<deviceSecurityMode>1</deviceSecurityMode>
<idleTimeout>0</idleTimeout>
<authenticationURL>http://ucexpert.ru/ccmcip/authenticate.jsp</authenticationURL>
<directoryURL>http://ucexpert.ru/xmldirectory.xml</directoryURL>
<idleURL></idleURL>
<informationURL>http://ucexpert.ru/GetTelecasterHelpText.jsp</informationURL>
<messagesURL></messagesURL>
<proxyServerURL></proxyServerURL>
<servicesURL>http://ucexpert.ru/xmldirectory.xml</servicesURL>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>96</dscpForCm2Dvce>
<transportLayerProtocol>4</transportLayerProtocol>
<dndCallAlert>5</dndCallAlert>
<phonePersonalization>0</phonePersonalization>
<singleButtonBarge>0</singleButtonBarge>
<joinAcrossLines>0</joinAcrossLines>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
<processNodeName>ucexpert.ru</processNodeName>
</capf>
</capfList>
<certHash></certHash>
<encrConfig>false</encrConfig>
<advertiseG722Codec>1</advertiseG722Codec>
<mobility>
<handoffdn></handoffdn>
<dtmfdn></dtmfdn>
<ivrdn>3999</ivrdn>
<dtmfHoldCode>*81</dtmfHoldCode>
<dtmfExclusiveHoldCode>*82</dtmfExclusiveHoldCode>
<dtmfResumeCode>*83</dtmfResumeCode>
<dtmfTxfCode>*84</dtmfTxfCode>
<dtmfCnfCode>*85</dtmfCnfCode>
</mobility>
</device>
Загрузили всё в телефон и нет регистрации, что делать? Как понять что происходит, посмотреть состояние телефона?Телефон представляет из себя маленький компьютер куда установлена операционная система, а в качестве систем ввода вывода используется клавиатура, экран и трубка. К телефону можно подключиться по SSH, а затем посмотреть его логи, проверить состояние и прочее. Единственное что я не смог сделать — это перезагрузить телефон удалённо.
Итак, в загруженной нами конфигурации мы указали логин и пароль cisco badpassword
Открываем любой ssh клиент, на пример putty, используя логин и пароль выше подключаемся.
Сразу после ввода учётных данных нужно будет снова ввести логин и пароль пользователя под которым мы будем выполнять далнейшие действия.
Доступны следующие варианты, если посмотреть /etc/passwd:
$ cat /etc/passwd root:8:0:0:Superuser:/:/bin/nologin syslog:8:1:0:System Logging:/usr:/bin/nologin netwk:8:2:0:Network Admin:/etc/inetd:/bin/nologin security:8:3:1:Security Processes:/usr:/bin/nologin debug:BQTMQYWL:4:256:Debug Shell:/usr/local:/bin/debugsh log:OYPTEZXR:5:256:trace shell:/var:/sbin/strace default:MZPUHGQY:256:256:Default User:/home/default:/bin/sh
Как видно, есть три реальных пользователя под которыми мы можем залогиниться на телефон:
debug:BQTMQYWL:4:256:Debug Shell:/usr/local:/bin/debugsh log:OYPTEZXR:5:256:trace shell:/var:/sbin/strace default:MZPUHGQY:256:256:Default User:/home/default:/bin/sh
default — это пользователь, для готорого загружается шелл операционной системы телефона под названием CNU-OS debugsh — под этим пользователем запускается дебаг шелл с несколькими полезными коммандами. log — под этим пользователем мы не можем вводить комманды, но увидим все журналы которые включили под пользователем debugsh.
Логинимся под default со стандратным паролем user, попадаем в shell. Например, пропингуем хост ya.ru:
$ ping ya.ru ping: reply received from 87.250.250.242, time = 2ms ping: reply received from 87.250.250.242, time = 1ms ping: reply received from 87.250.250.242, time = 1ms ^C $
Кстати voice.telphin.com на ping не отвечает.
Дальше мы будем смотреть состояние телефона и включать нужные журналы под пользователем debugsh, для его запуска просто выполним команду:
$ /bin/debugsh 00235E186B89>
Для вывода полного списка комманд:
00235E186B89> ?
Вот некоторые полезные комманды: Информация о SIP-регистрациях
00235E186B89> show register 00235E186B89> LINE REGISTRATION TABLE Proxy Registration: ENABLED, state: REGISTERED line APR state timer expires proxy:port ---- --- ------------- ---------- ---------- ---------------------------- 1 .11 REGISTERED 55 37 voice.telphin.com:5068 2 .11 REGISTERED 55 37 voice.telphin.com:5068 3 ... NONE 0 0 undefined:0 4 ... NONE 0 0 undefined:0 5 ... NONE 0 0 undefined:0 6 ... NONE 0 0 undefined:0
Вся информация по настройкам SIP, ниже часть вывода комманды:
00235E186B89> show tech-sip 00235E186B89> --------------- Show Tech Sip ----------------- ------------- Show config-cache -------------- ------ Current *Cache* Configuration ------ startMediaPort : 16384 endMediaPort : 32766 callerIdBlocking : 0 anonymousCallBlock : 0 dndCallAlert : 5 preferredCodec : none dtmfOutofBand : avt dtmfAvtPayload : 101 dtmfDbLevel : 3 sipRetx : 10 sipInviteRetx : 6 timerT1 : 500 timerT2 : 4000 timerInviteExpires : 180 timerRegisterExpires : 300 registerWithProxy : 1 backupProxy : backupProxyPort : 5060 emergencyProxy : emergencyProxyPort : 5060 outboundProxy : outboundProxyPort : 5060 natReceivedProcessing : 0 userInfo : none cnfJoinEnabled : 1 remotePartyID : 1 semiAttendedTransfer : 1 callHoldRingback : 0 stutterMsgWaiting : 0 cfwd_URL : callStats : 1 autoAnswer : 0 localCfwdEnable : 1 timerRegisterDelta : 5 MaxRedirects : 70 rfc2543Hold : 0 ccm1_address : 127.0.0.1 ccm2_address : ccm3_address : ccm1_sipPort : 0 ccm2_sipPort : 0 ccm3_sipPort : 0 ccm1_securityLevel : 0 ccm2_securityLevel : 0 ccm3_securityLevel : 0 ccm1_isValid : 0 ccm2_isValid : 0 ccm3_isValid : 0 ccmTftp_ipAddr : ccmTftp_port : 0 ccmTftp_isValid : 0 ccmTftp_securityLevel : 0 ccmSrst_sipIpAddr1 : ccmSrst_sipPort1 : 5060 ccmSrst_isValid : 0 ccmSrst_securityLevel : 0 ccmSrst_isSecure : 0 connectionMonitorDuration : 120 callPickupURI : x-cisco-serviceuri-pickup callPickupListURI : x-cisco-serviceuri-opickup callPickupGroupURI : x-cisco-serviceuri-gpickup meetMeServiceURI : x-cisco-serviceuri-meetme callForwardUri : x-cisco-serviceuri-cfwdall abbreviatedDialURI : x-cisco-serviceuri-abbrdial callLogBlfEnabled : 1 remoteCcEnabled : 1 timerKeepaliveExpires : 120 timerSubscribeExpires : 120 timerSubscribeDelta : 5 transportLayerProtocol : 4 kpml : 3 natEnabled : 1 natAddress : 8.8.8.8 voipControlPort : 5068 myIpAddr : 192.168.2.5 myMacAddr : 0023:5e18:6b89 enableVad : 0 autoAnswerAltBehavior : 0 autoAnswerTimer : 1 autoAnswerOverride : 1 offhookToFirstDigitTimer : 15000 silentPeriodBetweenCallWaitingBursts : 10 ringSettingBusyStationPolicy : 0 dscpForCm2Dvce : 96 speakerEnabled : 1 transferOnhookEnabled : 0 retainForwardInformation : 0 dndReminderTimer : 0 rollover : 2 joinAcrossLines : 0 blfAlertToneIdle : 0 blfAlertToneBusy : 0 autoPickupEnabled : 0 loadFileName : SIP45.8-5-4S interDigitTimer : 15000 line1_featureID : 9 line2_featureID : 9 line3_featureID : 0 line4_featureID : 0 line5_featureID : 0 line6_featureID : 0 line7_featureID : 0
Регистрация 1 линии:
00235E186B89> register line 1 1 00235E186B89> Registering line 1
Есть множество комманд для включение отладки, вот их список:
00235E186B89> ?
alias
Creates a pseudonym or shorthand for a command
clear cpr-memory
cpr-memory
clear mwi
mwi
cfg ui prompt
Change prompt to a specified string
exit
Exit the shell
help
Display help for a command
help commands
Display this list
debug all
Enable/Disable all debugging
debug cc
cc
debug auth
auth
debug config-app
config-app
debug cdp
Enable cdp process debug settings
debug cc-msg
cc-msg
debug cpr-memory
cpr-memory
debug cpr-info
cpr-info
debug config-cache
config-cache
debug dialplan
dialplan
debug dsp
Enable dsp process debug settings
debug dns
Enable dns process debug settings
debug fim
fim
debug gsm
gsm
debug fsm
fsm
debug flashfs
Enable flashfs process debug settings
debug dtmf
dtmf
debug dhcp
Enable dhcp process debug settings
debug inetd
Enable inetd process debug settings
debug jvm ALL
NOTICE
debug jvm AppStatus
NOTICE
debug jvm AutoService
NOTICE
debug jvm Application
NOTICE
debug jvm CallUI
NOTICE
debug jvm Go4
NOTICE
debug jvm Config
NOTICE
debug jvm Component
NOTICE
debug jvm CallAgent
NOTICE
debug jvm Http
NOTICE
debug jvm MediaManager
NOTICE
debug jvm Localization
NOTICE
debug jvm MIDP-LCDUI
NOTICE
debug jvm MIDP-MIDlet
NOTICE
debug jvm MIDP-Media
NOTICE
debug jvm MIDP-RMS
NOTICE
debug jvm MIDP-PushRegistry
NOTICE
debug jvm MIDP-MIDletSuite
NOTICE
debug jvm MIDP-IO
NOTICE
debug jvm Graphics
NOTICE
debug jvm PushService
NOTICE
debug jvm Services
NOTICE
debug jvm Security
NOTICE
debug jvm SIPCC
NOTICE
debug jvm SideCar
NOTICE
debug jvm Settings
NOTICE
debug jvm SubscriptionFramework
NOTICE
debug jvm Tftp
NOTICE
debug jvm System
NOTICE
debug jvm Util
NOTICE
debug jvm XML
NOTICE
debug jvm Video
NOTICE
debug jvm UserIO
NOTICE
debug jvm StartUp
NOTICE
debug jvm Properties
NOTICE
debug lsm
lsm
debug kpml
kpml
debug init
Enable init process debug settings
debug ntp
Enable ntp process debug settings
debug remote-cc
remote-cc
debug process
Enable process process debug settings
debug netkern
Enable netkern process debug settings
debug sip-adapter
sip-adapter
debug sip-dnd
sip-dnd
debug sip-dm
sip-dm
debug sip-presence
sip-presence
debug sip-reg-state
sip-reg-state
debug sip-messages
sip-messages
debug sip-trx
sip-trx
debug sip-task
sip-task
debug timers
timers
debug vcm
vcm
debug ui
Enable UI debug setting
debug tftpClient
Enable tftpClient process debug settings
debug sip-state
sip-state
debug secd
Enable secure daemon debug settings
debug imageauth
Debug imgauthd process
jvm logging level
Enable jvm process to allow individual module debugging
register bulk
bulk
register line
line
quit
Alias for 'exit'
test hide
hide
test close
close
test show
show
test open
open
test key
key
store sip-debugs
sip-debugs
show bulkreginfo
bulkreginfo
show cdp
Show cdp configuration information
show cpr-memory
cpr-memory
show cpr-msgq
cpr-msgq
show config-cache
config-cache
show dialplan
dialplan
show dhcp
Show dhcp configuration information
show dnd-settings
dnd-settings
show fim
fim
show driver
Shows loaded drivers in the system
show diskspace
Displays disk usage statistics
show fsmcnf
fsmcnf
show fsmb2bcnf
fsmb2bcnf
show fsmicom
fsmicom
show fsmxfr
fsmxfr
show fsmrelay
fsmrelay
show fsmdef
fsmdef
show fsm
fsm
show debug
debug
show inventory
shows unique device identifier
show kpml
kpml
show jvm Config
show ipc stat
shows ipc statistics
show lsm
lsm
show memory
show memory usage
show load history
shows load/image history
show register
register
show sip-subscription-statistics
sip-subscription-statistics
show sip-publish-statistics
sip-publish-statistics
show remote-cc
remote-cc
show strpool
strpool
show tech
Shows tech support related information
show version
Display current CNU version
show tech-sip
tech-sip
show socket
show socket information
show process
shows process information
show inetd
Show inetd configuration information
history
Displays the command history list
На интересует SIP:
debug sip-reg-state debug sip-messages debug sip-adapter
Теперь можно посмотреть включенные журналы по комманде debug, выходим из оболочки:
00235E186B89> exit Exiting shell... Logging out...
Комманда: $ /sbin/strace запускает просмотр включенных ранее трейсов.
Также в телефоне есть оболочка cnush для для работы с файлами телефона запускается она $ /bin/cnush
В списке комманд:
% help alias [name [command]] unalias name cd [dirname] clear exec filename [args] exit groups help [args] ... id load svrIPaddr filename limit [-h] [resource [limit]] unlimit [resource] logout pwd quit resume set [-r] var = value unset var setnet shownet setenv name value printenv shpri priority size file ... . filename source filename sync touch filename umask [mask] ver file ... where program whoami
Если не получается зайти в оболочку или включить трейсеровку с причиной то, скорее всего в системе завис процесс, например, /bin/debugsh:
$ /bin/debugsh Another debugsh session active. Exiting... $
его легко можно удалить вот так:
$ ps -a pid %cpu state tty command 24 0.0 run 0 /bin/login 5 0.0 run 0 /sbin/espd 2 0.1 run 0 /sbin/syslogd 3 3.9 run 0 /bin/sshd 1 0.0 run 0 /sbin/init 19 0.0 run 0 /bin/tftpClient 27 0.0 run 0 /sbin/rtsold 22 1.5 run 0 /bin/sshd 6 0.2 run 0 /sbin/strace 4 0.0 run 0 /sbin/dhcp6 10 0.0 run 0 /sbin/pae 8 0.0 run 0 /sbin/imgauthd 30 0.0 run 0 /sbin/inetd 0 92.5 run 0 sysIdle 9 0.0 run 0 /ubin/vieo 18 0.0 run 0 /bin/ps 11 0.5 run 0 /ubin/dsp 16 8.3 run 0 /tmp/sunvm.unzip/sunvm.cnu 20 0.0 run 0 /sbin/dhcp 21 0.1 run 0 /sbin/dns 29 0.0 run 0 /bin/secd 28 0.5 run 0 /bin/sshd 15 0.0 run 0 /bin/sh 13 0.2 run 0 /sbin/strace 31 0.0 run 0 /bin/ntp 14 0.0 run 0 /bin/sh 12 0.0 run 0 /bin/debugsh 26 0.0 run 0 /sbin/cdp 7 0.0 run 0 /bin/sh $ kill 12
Вооружившись данными знаниями без проблем можно настроить телефон Cisco за NAT.
Похожие материалы:
Tags: Cisco, IP-телефон, IP-телефония, NAT

kuda kopat’ ?
$ ssh ip-cisco-phone
Bad packet length 1952605032.
ssh_dispatch_run_fatal: Connection to ip port 22: message authentication code incorrect