アスタリスク用のCisco 79XXシリーズ電話の設定





この記事では、例として7942Gを使用してCisco IP Phoneを構成する微妙な違いについて説明します。

Cisco 79XXシリーズVoIPデバイスをよく見ると、catへようこそ。





使用者:



Cisco VoIP電話7942G

アスタリスク1.4.39

TFTP-server-0.49

注意! このマニュアルは、すべてのCisco 79XX電話に適しているわけではありません。 こちらをご覧ください



カスタマイズ





Ciscoのキーボードショートカット


**#**-電話を再起動します(メニューから)

**#-設定をロック解除します(メニューからも)。 たとえば、DHCPクライアント設定を設定するには、ロック解除が必要です。



TFTP


最初に行う必要があるのは、tftpserverの構成です。 標準のLinuxを使用しました。 tftpリクエストがログファイル(デフォルトでは/ var / log / messages)に書き込まれるように、すぐに設定することをお勧めします。

cat /etc/xinetd.d/tftp:

...

server_args = -s /tftpboot -v

...







ファームウェア変更


そのため、最初にSIPで動作する適切なファームウェアを見つける必要があります。 デフォルトバージョンはSCCPです。 これにはグーグルやトレントがあります。



次に、有名なサイトvoip-info.orgにアクセスします。 リンクには、ファームウェアに関する情報が含まれています。 なぜなら アスタリスクバージョン1.4(tcpでの作業方法がわからない)があります。バージョン8.5.4を使用することをお勧めします。 このリンクには、他にも役立つ情報がたくさんあります。

したがって、cmterm-7942_7962-sip.8-5-4.zipファイルが必要です。 そこにあるすべてのファイルは、tftpサーバーのルートにダンプする必要があります。



ロシア語のロケール


それでも、ロシアのロケールは私たちを妨げなかったでしょう。 まあつまり 画面上のすべての碑文がロシア語であるように。

ファイルpo-locale-ru_RU-8.4.3.1000-1.exeから取得しました(インターネットにもあります)。 ここに1つのトリックがあります-プログラムを実行すると、エラーがスローされて閉じます。 ただし、ロケールファイルが必要なだけで、自分でインストールできます。

そのため、開始後、%TEMP%フォルダーに移動し(最初にクリーンアップすることをお勧めします)、プログラムがそこにダンプする内容を確認します。

そこには、とりわけ、Russian_Russian_Federationフォルダーがあります。 ここでは、tftpサーバーのルートに配置する必要があります。

ロケールバージョンは8.4.3.1000-1になります。



サイコフォン設定ファイル


それでは、構成ファイルに直接行きましょう。 ciscophoneは、tftpサーバからのみそれをダウンロードします。 最初は不便に思えますが、一方で、一度だけ設定する必要があり、それから少なくともこれらの電話を山で購入することができます-設定は似ており、最小限の時間しかかかりません。 さらに、シスコは「遊び心のあるペン」ユーザーから電話を保護しました。 メニューからはほとんど何もできません。

ファイルには、SEP <Cisco Phone MAC Address> .cnf.xmlという名前を付ける必要があります。

MACアドレスはデバイスの背面に記載されています。

いくつかの値を定義します。

$アスタリスク-アスタリスクのah-pi

$ SERVICESURL-アドレス帳を生成するスクリプトへのフルパス(たとえば、 192.168.0.22 / asterisk / directory.php

$ ACCOUNT-ユーザー/アスタリスクアカウントの番号。 一致する番号<=>ユーザーがいない場合、それに応じて設定を変更する必要があります。

$ ACCOUNT_PASS-SIPアカウントのパスワード

 <device> <fullConfig>true</fullConfig> <deviceProtocol>SIP</deviceProtocol> <devicePool> <dateTimeSetting> <dateTemplate>DMY</dateTemplate> <timeZone>Ekaterinburg Standard Time</timeZone> <ntps> <ntp> <name>$ASTERISK</name> <ntpMode>Unicast</ntpMode> </ntp> </ntps> </dateTimeSetting> <callManagerGroup> <tftpDefault>true</tftpDefault> <members> <member priority="0"> <callManager> <name>$ASTERISK</name> <description>CallManager 5.0</description> <ports> <ethernetPhonePort>2000</ethernetPhonePort> <sipPort>5060</sipPort> <securedSipPort>5061</securedSipPort> </ports> <processNodeName>$ASTERISK</processNodeName> </callManager> </member> </members> </callManagerGroup> </devicePool> <commonProfile> <phonePassword></phonePassword> <backgroundImageAccess>true</backgroundImageAccess> <callLogBlfEnabled>0</callLogBlfEnabled> </commonProfile> <loadInformation>SIP42.8-5-4S</loadInformation> <loadInformation434 model="Cisco 7942">SIP42.8-5-4S</loadInformation434> <vendorConfig> <disableSpeaker>false</disableSpeaker> <disableSpeakerAndHeadset>false</disableSpeakerAndHeadset> <pcPort>0</pcPort> <settingsAccess>1</settingsAccess> <garp>0</garp> <voiceVlanAccess>0</voiceVlanAccess> <videoCapability>0</videoCapability> <autoSelectLineEnable>0</autoSelectLineEnable> <daysDisplayNotActive>1,7</daysDisplayNotActive> <displayOnTime>10:30</displayOnTime> <displayOnDuration>06:05</displayOnDuration> <displayIdleTimeout>00:05</displayIdleTimeout> <webAccess>1</webAccess> <spanToPCPort>1</spanToPCPort> <loggingDisplay>1</loggingDisplay> <loadServer></loadServer> </vendorConfig> <userLocale> <name>Russian_Russian_Federation</name> <uid></uid> <langCode>ru_RU</langCode> <version>8.4.3.1000-1</version> <winCharSet>utf-8</winCharSet> </userLocale> <networkLocale>Russian_Federation</networkLocale> <networkLocaleInfo> <name>Russian_Federation</name> <uid></uid> <version>8.4.3.1000-1</version> </networkLocaleInfo> <deviceSecurityMode>1</deviceSecurityMode> <idleTimeout>0</idleTimeout> <directoryURL></directoryURL> <servicesURL>$SERVICESURL</servicesURL> <idleURL></idleURL> <messagesURL></messagesURL> <proxyServerURL></proxyServerURL> <dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig> <dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices> <dscpForCm2Dvce>96</dscpForCm2Dvce> <transportLayerProtocol>2</transportLayerProtocol> <capfAuthMode>0</capfAuthMode> <capfList> <capf> <phonePort>3804</phonePort> </capf> </capfList> <certHash></certHash> <encrConfig>false</encrConfig> <sipProfile> <sipProxies> <backupProxy>$ASTERISK</backupProxy> <backupProxyPort>5060</backupProxyPort> <emergencyProxy>$ASTERISK</emergencyProxy> <emergencyProxyPort>5060</emergencyProxyPort> <outboundProxy>$ASTERISK</outboundProxy> <outboundProxyPort>5060</outboundProxyPort> <registerWithProxy>true</registerWithProxy> </sipProxies> <sipCallFeatures> <cnfJoinEnabled>true</cnfJoinEnabled> <callForwardURI>x--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> </sipCallFeatures> <sipStack> <sipInviteRetx>6</sipInviteRetx> <sipRetx>10</sipRetx> <timerInviteExpires>180</timerInviteExpires> <timerRegisterExpires>3600</timerRegisterExpires> <timerRegisterDelta>5</timerRegisterDelta> <timerKeepAliveExpires>120</timerKeepAliveExpires> <timerSubscribeExpires>120</timerSubscribeExpires> <timerSubscribeDelta>5</timerSubscribeDelta> <timerT1>500</timerT1> <timerT2>4000</timerT2> <maxRedirects>70</maxRedirects> <remotePartyID>false</remotePartyID> <userInfo>None</userInfo> </sipStack> <autoAnswerTimer>1</autoAnswerTimer> <autoAnswerAltBehavior>false</autoAnswerAltBehavior> <autoAnswerOverride>true</autoAnswerOverride> <transferOnhookEnabled>false</transferOnhookEnabled> <enableVad>false</enableVad> <preferredCodec>g711alaw</preferredCodec> <dtmfAvtPayload>101</dtmfAvtPayload> <dtmfDbLevel>3</dtmfDbLevel> <dtmfOutofBand>avt</dtmfOutofBand> <alwaysUsePrimeLine>false</alwaysUsePrimeLine> <alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail> <kpml>3</kpml> <stutterMsgWaiting>1</stutterMsgWaiting> <callStats>true</callStats> <silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts> <disableLocalSpeedDialConfig>true</disableLocalSpeedDialConfig> <startMediaPort>10100</startMediaPort> <stopMediaPort>10300</stopMediaPort> <voipControlPort>5060</voipControlPort> <dscpForAudio>184</dscpForAudio> <ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy> <dialTemplate>dialplan.xml</dialTemplate> <phoneLabel>Cisco</phoneLabel> <natReceivedProcessing>false</natReceivedProcessing> <natEnabled>false</natEnabled> <natAddress></natAddress> <sipLines> <line button="1"> <featureID>9</featureID> <featureLabel>$ACCOUNT</featureLabel> <proxy>$ASTERISK</proxy> <port>5060</port> <name>$ACCOUNT</name> <displayName>$ACCOUNT</displayName> <autoAnswer> <autoAnswerEnabled>2</autoAnswerEnabled> </autoAnswer> <callWaiting>3</callWaiting> <authName>$ACCOUNT</authName> <authPassword>$ACCOUNT_PASS</authPassword> <sharedLine>false</sharedLine> <messageWaitingLampPolicy>3</messageWaitingLampPolicy> <messagesNumber></messagesNumber> <ringSettingIdle>4</ringSettingIdle> <ringSettingActive>5</ringSettingActive> <contact>$ACCOUNT</contact> <forwardCallInfoDisplay> <callerName>true</callerName> <callerNumber>false</callerNumber> <redirectedNumber>false</redirectedNumber> <dialedNumber>true</dialedNumber> </forwardCallInfoDisplay> </line> <line button="2"> <featureID></featureID> <featureLabel></featureLabel> <speedDialNumber></speedDialNumber> </line> </sipLines> </sipProfile> </device>
      
      







ここでコメントします。



 <timeZone>Ekaterinburg Standard Time</timeZone> -   ,        NTP- (    ).
      
      





すべてのタイムゾーンは、たとえばここにあります



 <loadInformation>SIP42.8-5-4S</loadInformation> -  ,   
      
      







ロケールを構成するには、次の設定が必要です。

 <userLocale> <name>Russian_Russian_Federation</name> <uid></uid> <langCode>ru_RU</langCode> <version>8.4.3.1000-1</version> <winCharSet>utf-8</winCharSet> </userLocale> <networkLocale>Russian_Federation</networkLocale> <networkLocaleInfo> <name>Russian_Federation</name> <uid></uid> <version>8.4.3.1000-1</version> </networkLocaleInfo>
      
      







 <servicesURL>$SERVICESURL</servicesURL> -    XML   (       ).
      
      







 <dialTemplate>dialplan.xml</dialTemplate> -    ,    .
      
      







 <line button="2"> -   , ..   SIP-.
      
      







 <preferredCodec>g711alaw</preferredCodec> -  G711 alaw    .
      
      







アスタリスクsip.confの構成


 ... [$ACCOUNT] deny=0.0.0.0/0.0.0.0 permit=192.168.0.0/255.255.255.0 type=friend host=dynamic context=_ dtmfmode=rfc2833 disallow=all allow=alaw allow=ulaw allow=gsm username=$ACCOUNT secret=$ACCOUNT_PASS call-limit=2 ...
      
      





ここで最も興味深いのはcall-limit = 2です。 一番下の行は、1つまたは2つのコールを受信することが可能であることです(3つのコールはtsiskaに行きません-なぜそれを緊張させますか?)、それらを電話で処理し、それらを切り替えます。 このデバイスでの3つ以上の呼び出しはサポートされていません(おそらく新しいファームウェアでサポートされます)が、3つの呼び出しの処理は既にかなり高価です。



ciscophoneのダイアログ設定


シスコは非常に賢いため、独自のダイヤルプランを使用できます。 しかし、コインには裏返しがあります。 このダイヤルプランが指定されていない場合、発信コールはまったく行われません。 より正確には、ただし0から9までの数字のみ=)。

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





この設定では、基本的にすべての責任をアスタリスクに移します-つまり 3秒後に番号を渡します。 よりエレガントな番号計画はvoip-info.orgで見つけることができます。



加入者アドレス帳


LDAP(sambaと組み合わせて)があり、ユーザーの電話に関する情報があります。 では、これを活用してみませんか?

LDAPサーバー、検索フィルターを設定に変更する必要があります。

directory.php:

 <? header("Content-type: text/xml"); header("Connection: close"); header("Expires: -1"); $page=1; if(isset($_GET['page'])) { $page = $_GET['page']; if(settype($page,"integer") == false) die("<b>BAD REQUEST (invalid type)</b>"); } echo '<?xml version="1.0" encoding="UTF-8"?>'."\n"; $ldapconfig['host'] = '192.168.0.8'; $ldapconfig['port'] = NULL; $ldapconfig['basedn'] = 'ou=users,dc=MyCompany,dc=ru'; $ldapconfig['filter'] = "(&(uid=*)(objectClass=sambaSamAccount)(objectClass=inetOrgPerson))"; print("<CiscoIPPhoneDirectory>\n"); print("\t<Title> </Title>\n"); print("\t<Prompt> </Prompt>\n"); $DS = @ldap_connect($ldapconfig['host'], $ldapconfig['port']); if ( $DS === false ) exit("ldap_connect problem: ".ldap_error($DS)); $SRes = @ldap_search($DS, $ldapconfig['basedn'], $ldapconfig['filter']); if ( $SRes === false ) exit("ldap_search problem: ".ldap_error($DS)); $res = @ldap_get_entries($DS, $SRes); if ( $res === false ) exit("ldap_get_entries problem: ".ldap_error($DS)); $results = array(); for ($i = 0; $i < $res["count"]; $i++) { if (!isset($res[$i]["telephonenumber"])) continue; if (!isset($res[$i]["displayname"])) continue; $r_ar = array(); $r_ar['displayname']=$res[$i]["displayname"][0]; $r_ar['telephonenumber']=$res[$i]["telephonenumber"][0]; array_push($results, $r_ar); } for ($i = 0; $i < (count($results)-1); $i++) for ($k = $i+1; $k < count($results); $k++) { if (strcmp($results[$i]['displayname'],$results[$k]['displayname']) > 0) { $r_tmp = array(); $r_tmp = $results[$i]; $results[$i] = $results[$k]; $results[$k] = $r_tmp; } } for ($i = (32*($page-1)); $i < (32*$page); $i++) { if ($i == count($results)) break; print("\t<DirectoryEntry>\n"); print("\t\t<Name>"); print($results[$i]['displayname']); print("</Name>\n"); print("\t\t<Telephone>"); print($results[$i]['telephonenumber']); print("</Telephone>\n"); print("\t</DirectoryEntry>\n"); } print("<SoftKeyItem>"); print("<Name>Dial</Name>"); print("<URL>SoftKey:Dial</URL>"); print("<Position>1</Position>"); print("</SoftKeyItem>"); if ($page > 1) { print("<SoftKeyItem>"); print("<Name>Prev</Name>"); print("<URL>http://".$_SERVER['SERVER_NAME']."/asterisk/directory.php?page=".($page-1)."</URL>"); print("<Position>2</Position>"); print("</SoftKeyItem>"); } $count_pages = (int) (count($results) / 32); if ((count($results) % 32) !=0) $count_pages++; if ($page < $count_pages) { print("<SoftKeyItem>"); print("<Name>Next</Name>"); print("<URL>http://".$_SERVER['SERVER_NAME']."/asterisk/directory.php?page=".($page+1)."</URL>"); print("<Position>3</Position>"); print("</SoftKeyItem>"); } print("<SoftKeyItem>"); print("<Name>Exit</Name>"); print("<URL>SoftKey:Exit</URL>"); print("<Position>4</Position>"); print("</SoftKeyItem>"); print("</CiscoIPPhoneDirectory>\n"); ?>
      
      





更新します 。 ページには32の連絡先しかないことに注意してください。 なぜそう これを説明する方法はわかりませんが、ファームウェアに実装されています。32を超える連絡先はサポートされていません。 ただし、これは重要ではありません。 前にソフトキー表示メカニズムを使用して実装できます。 そしてトレース。 ページ。



ロゴの設定を行います


まず、ciscoがこの図を探しているtftpログを調べます。 これは、背景画像を選択すると発生します。

電話メニューから(メニューのロックを解除する方法は上に書かれています)。

メニューの画像

/tftpboot/Desktops/320x196x4/List.xml:

 <CiscoIPPhoneImageList> <ImageItem Image="TFTP:Desktops/320x196x4/Logo-TN.png" URL="TFTP:Desktops/320x196x4/Logo.png"/> </CiscoIPPhoneImageList>
      
      





320x196の画像を1つ作成し、4分の1(80x49)の画像を1つ作成する必要があります。

Logo-TN.png-スケッチ。

Logo.png-完全な画像。

電話メニューからロゴを変更する必要があります。



記事に含まれていないもの



-呼び出しトーンを設定します。 はい、これも行うことができます。 別のこと-なぜですか? それがあなたにとって理にかなっているなら、それのために行きなさい。

-ディレクトリのセットアップ。 たとえば、携帯電話からRSSを読み取り、一般にさまざまなコンテンツディレクトリを追加できます。



セットアップ中に発生した問題



1. SIPのファームウェアが必要でした(デフォルトのSCCP)

2.電話が登録されていません(TCP上でのみ動作するファームウェア9.0.3をインストールしました)

3.発信コールが送信されませんでした(dialplan.xmlを参照)

4.アドレス帳の32の連絡先のみが表示されます(ファームウェアの制限)



参照資料



www.voip-info.org/wiki/view/Asterisk+phone+cisco+79x1+xml+configuration+files+for+SIP

www.voip-info.org/wiki/view/Asterisk+phone+cisco+7970+SIP

www.asteriskguru.com/tutorials/cisco_7960_ip_phone_configuration.html

セットアップエクスペリエンス:

3090607.ru/note/27-cisco-ip-phone-locale

forum.sysadmins.su/index.php?showtopic=20489

www.voipstore.com/configuring-cisco-7975-ip-phones-for-sip

asteriskpbx.ru/display/Asterisk/CISCO+7911

www.gho.no/2009/05/cisco-ip-phone-configuration-with-asterisk

役員 マニュアル:

www.cisco.com/en/US/docs/voice_ip_comm/cuipph/7960g_7940g/sip/2_0/english/administration/guide/admin2.pdf

www.cisco.com/en/US/docs/voice_ip_comm/cuipph/7962g_7942g/6_0/english/administration/guide/7962G-Admin-Book-Wrapper.html

XMLオブジェクト:

www.cisco.com/univercd/cc/td/doc/product/voice/vpdd/cdd/5_0/5_0_1/ipphsv/ip503ch2.htm#wp1033491

www.ibm.com/developerworks/wireless/library/wi-voip

webmaxtor.blogspot.com/2009/04/cisco-ipphonedirectory-exit-softkey.html

www.cisco.com/univercd/cc/td/doc/product/voice/vpdd/cdd/5_0/5_0_1/ipphsv/ip503ch2.htm

docstore.mik.ua/univercd/cc/td/doc/product/voice/vpdd/cdd/5_0/ipphsv/ip502apa.htm#wp1007090

my.safaribooksonline.com/book/telephony/1587050609/using-cisco-ip-phone-xml-objects-and-tags/ch04#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTEtNTg3MDUtMDYtWDVtJDVtjDwtDDtt



All Articles