アスタリスクを使用したDigium電話のテストとスマートBLFのセットアップ

以前、当社の専門家は、 Switchvoxユニファイドコミュニケーションシステムと最も広く普及している無料のAsteriskNowディストリビューションの1つでDigium電話をテストしました。 そして最後に、「裸の」アスタリスクに到達しました。

このレビューでは、Asterisk-DPMA(Digium Phone Module for Asterisk)を使用してDigium電話とやり取りするためのモジュールの助けを借りてデバイスを構成し、スマートBLFを設定する方法を検討します。

猫に興味がある人は誰でも聞いてください。

それでは始めましょう。

まず、メーカーの公式WebサイトでDPMAライセンスを注文する必要があります: store.digium.com/productview.php?product_code=804-00032
ライセンスは無料ですが、それでも製品の登録が必要です。 数分で、Digiumからの手紙にアクティベーションコードが入ります。 当然、ライセンスを取得するには、サイトに登録する必要があります。

ライセンスを取得したら、登録ユーティリティをダウンロードする必要があります。

wget http://downloads.digium.com/pub/register/x86-32/register 


次に、登録ユーティリティの権限を変更します。

 chmod 500 /root/register 


そしてそれを実行します:

 /root/register 


さらに、ウィザードのプロンプトに従って、必要なすべての操作を実行します。

1、11の順に押します。

最後に、Digiumから送信されたキーを入力します。

ライセンス契約の条件を「読み」、登録に必要なデータを入力します。

そして、ライセンスが正常に記録されたという碑文が端末に表示されます。

ライセンスが正常にアクティブ化されるためには、サーバーが次のようにインターネットにアクセスできる必要があることに注意してください。 ユーティリティは、登録のためにDigiumサーバーにクロールします。

次のステップに進みます:DPMAモジュールをダウンロードします

 # cd /root # wget http://downloads.digium.com/pub/telephony/res_digium_phone/asterisk-11.0/x86-32/res_digium_phone-11.0_1.4.0.tar.gz 


res_digium_phone.soファイルを解凍して、アスタリスクモジュールがあるフォルダーにコピーします(デフォルトでは/ usr / lib / asterisk / modules /)。

 tar xzvf res_digium_phone-11.0_1.4.0.tar.gz # cp /root/res_digium_phone-11.0_1.4.0/res_digium_phone.so /usr/lib/asterisk/modules 


構成ファイルをアスタリスク構成フォルダーにコピーします(デフォルトでは/ etc /アスタリスク/):

 cp /root/res_digium_phone-11.0_1.4.0/res_digium_phone.conf.sample /etc/asterisk/res_digium_phone.conf 


モジュールをロードします。

 asterisk -rx "module load res_digium_phone.so" 


アスタリスクに接続し、ライセンスの有効性を確認します。

 #asterisk -rvvv *CLI> digium_phones license status OK, Valid product license found 


DPMAライセンスはネットワークカードのMACアドレスに関連付けられており、置き換えられた場合は、モジュールを再登録するか、新しいネットワークカードのMACアドレスを置き換える必要があります。

それでは、電話のセットアップに移りましょう。

sip.confでユーザーを作成します。
 [一般] 

 accept_outofcall_message = yes
 outofcall_message_context = dpma_message_context
 auth_message_requests = no
 callcounter = yes

 [000] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 000 
資格=はい 


 [111] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 111 
資格=はい 


 [222] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 222 
資格=はい 

 [333] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 333 
資格=はい 

 [444] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 444 
資格=はい 


 [555] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 555 
資格=はい 


 [666] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 666 
資格=はい 

 [777] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 777 
資格=はい 

 [888] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 888 
資格=はい 


 [999] 
タイプ=友人 
ホスト=動的 
コンテキスト= dpma_phones 
秘密= qwaszx 
メールボックス= 999 
資格=はい 


便宜上、電話番号と呼びました。

extensions.confで、これらのサブスクライバーのルールを作成します。
 [dpma_phones] 

 include = parkedcalls 
 exten => XXX、ヒント、SIP / $ {EXTEN}
 exten => XXX、1、Dial(SIP / $ {EXTEN}、20) 
同じ=> n、ボイスメール($ {EXTEN}、$ {IF($ ["{DIALSTATUS}" = "BUSY"]?b:u)}) 
同じ=> n、ハングアップ()



voicemail.confでサブスクライバーのメールボックスを設定します。
 [デフォルト] 
 000 => 1234,000 
 111 => 1234.111 
 222 => 1234,222 
 333 => 1234.333 
 444 => 1234,444 
 555 => 1234.555 
 666 => 1234,666 
 777 => 1234,777 
 888 => 1234,888 
 999 => 1234,999 



次に、res_digium_phone.conf構成ファイルに直接移動します。

ファイル構造は、いくつかの必須セクションに分かれています。


それぞれについて説明しましょう。

一般セクション
server_uuid
ひも
サーバーの一意の名前。
ボイスメールで使用
加入者へのアクセスを提供する
メールボックス。 必要に応じて。
グローバルピン
数 例:10101019
電話で設定とファームウェアを受信するためのオプションのピンコード
userlist_auth
無効、globalpin
受信の認証方法を示します
連絡先リスト。 2つの値:無効、
またはグローバルPINコードによる承認。
config_auth
mac、pin、globalpin、無効
構成を取得する方法を示します。
MACアドレスによる認証
ピンまたはグローバルピンのいずれかで、
切断された携帯電話
任意の設定を取得できます
mdns_address
IPアドレスまたはホスト名
DPMAが受信するサーバーアドレス
mDNS経由の設定
mdns_port
ポート、デフォルト5060
DPMAによってノックされるポート
service_name
文字列(例:Digium Phones Config Server)
サーバー名
service_discovery_enabled
はい/いいえ
構成サーバーを検索する権限
file_directory
ディレクトリ、例:/ var / lib /アスタリスク/ digium_phones
連絡先xmlファイルが置かれているフォルダー


ネットワークセクション(DPMAバージョン1.2以前では不要、新しいバージョンでは必須)
別名
文字列(MyNetworkなど)
ネットワーク名
alternate_registration_address
IPアドレスまたはホスト名
代替登録アドレス(プライマリが利用できない場合)
alternate_registration_port
ポート、番号、例:5060
代替登録ポート(プライマリが利用できない場合)
cidr
CIDR、例:198.51.100.1/24
ネットワークアドレス、マスク
file_url_prefix
URL http : //10.10.10.10/file_package_directory
電話機がファームウェア情報を受信するURLプレフィックス、
ロゴ、着信音、スマートblf(必須!
適切な操作にはウェブサーバーが必要です(例:apache)
network_vlan_discovery_mode
なし、マニュアル、LLDP
VLAN情報
network_vlan_id
0-4095
VLAN番号を割り当てます(ある場合)
ntp_server
ホスト名、IPアドレス、例えばntp.mycompany.com
NTPサーバー
pc_qos
整数(0-7)
PCポートのQoS
pc_vlan_id
(整数(0-4095)
VLANをPCポートSに割り当てます
public_firmware_url_prefix
URL
パブリックURLプレフィックス
電話が情報を受信する場所
メインサーバーが利用できない場合のファームウェアについて、
Digiumサーバーにつながります。 次のようになります。
/VERSION/VERSION_MODEL_firmware.eff
登録アドレス
IPアドレスまたはホスト名
登録サーバーのアドレス
registration_port
整数としてのポート。 例5060
登録サーバーのポート
rtp_dscp
整数(0-63)
DSCP RTP
rtp_qos
整数(0-7)
RTP QoS
sip_dscp
整数(0-63)
SIP DSCP
sip_qos
整数(0-7)
SIP QoS
syslog_level
デバッグ、エラー、警告、情報
システムメッセージのログレベル
syslog_port
ポート514など
システムメッセージが送信されるポートは、デフォルトで514です。
syslog_server
ホスト名、IPアドレス(syslog.mycompay.comなど)
システムメッセージが送信されるサーバーアドレス
udp_ka_interval
秒単位の時間
電話機がキープアライブを送信する間隔を定義します
メッセージ、デフォルトは0、なし


電話セクション
ネットワーク
res_digium_phone.confの「ネットワーク」
前のセクションで指定されたネットワーク名
ファームウェア
res_digium_phone.confの「ファームウェア」
ファームウェア名
マック
MACアドレス(例:0123456789ab)
Macアドレス
ピン
番号例:10101019
設定を受信するためのPINコード
group_pin
番号例:101010109
グループ化された電話のPINコード

res_digium_phone.confの行
行(sip.confのユーザーと同じ名前を付ける必要があります)
external_line
res_digium_phone.confのexternal_line
アスタリスクサーバーに登録されていない外部回線
申込み
アプリ
アプリ
config_file
mycustomconfig.xmlのようなファイル
DPMAは、電話機に接続されている回線に基づいて各電話機の構成ファイルを自動的に生成しますが、個別の構成ファイルを作成できます。
氏名
文字列(例:Bob Johnson)
加入者のフルネーム
連絡先
ファイル、contacts.xmlなど
連絡先XMLファイル
contacts_display_rules
mydisplayrules.xmlのようなファイル
連絡先を表示するためのルールを含むfile_directoryのXMLファイル。
blf_contact_group
文字列、たとえば「office-contacts」
グループ。 必須フィールド
blf_items
ファイル(blfitems.xmlなど)
スピードダイヤルボタンの「動作」の設定を含むXMLファイル
contacts_max_subscriptions
番号、たとえば40
電話登録の最大数、デフォルトは40
タイムゾーン
タイムゾーン
アメリカ/シカゴ
タイムゾーン
ntp_resync
秒単位の時間
Ntp同期間隔
parking_exten
拡張子、たとえば700
駐車場番号
parking_transfer_type
盲目/出席済み
転送の種類
着メロ
着信音名
必要な着信音を携帯電話にダウンロードするオプション
active_ringtone
アラーム、チャイム、デジアム、GuitarStrum、ジングル、Office2、オフィス、RotaryPhone、SteelDrum、Techno、
テーマ、Tweedle、Twinkle、Vibe、または着信音名
アクティブな着信音
web_ui_enabled
いいえ/はい
電話Webインターフェースの可用性、DPMAを使用する場合のデフォルト
-Webインターフェイスfを介して電話にアクセスする機能を無効にしました
record_own_calls
いいえ/はい
独自の会話を記録するオプション。
アクティブな会話中にオプションを有効にすると、ディスプレイに「録音」ボタンが表示されます。デフォルトでは無効になっています
警戒

警告メッセージ名
blf_unused_linekeys
いいえ/はい
回線ボタンをスピードダイヤルボタンとして使用するオプション
send_to_vm
はい/いいえ
非アクティブの場合、電話から「メールボックスに送信」ボタンを削除するオプション
use_local_storage
はい/いいえ
このオプションを使用すると、連絡先は電話に直接保存されます
d40_logo_file
ひも
Digium D40のロゴ、PNG 150x45ピクセル、10kb
d50_logo_file
ひも
Digium D50のロゴ、PNG 150x45ピクセル、10kb
d70_logo_file
ひも
Digium D40のロゴ、PNG 205x85ピクセル、10kb
うん
auto、plantronics、jabra_iq
接続するヘッドセットのタイプを決定します。
lock_preferences
はい/いいえ
このオプションを使用すると、特定の電話に設定を割り当てることができます
login_password
番号例:789
Webインターフェースに入るためのパスワード
accept_local_calls
任意、ホスト
電話が登録されているSIPサーバーから、またはどこからでもコールを受信できます。
display_mc_notification
はい/いいえ
不在着信に関する情報の表示を定義するオプション
明るさ
番号、0-10
明るさ、デフォルト5
対比
番号、0-10
コントラスト、デフォルト5
dim_backlight
はい、いいえ
ブラックアウト画面
blink_timeout
秒単位の数値(0〜3200)
画面を暗くする時間
blink_dim_level
番号(0-10)
画面が暗くなったときの輝度レベル
active_locale
de_DE、en_AU、en_CA、en_GB、en_US、es_ES、es_MX、
fr_BE、fr_CA、fr_FR、it_IT、nl_BE、nl_NL、pt_BR、pt_PT
ローカリゼーション設定
ringer_volume
番号(0-10)
着信音量
speaker_volume
番号(0-10)
マイクの音量
handset_volume
番号(0-10)
スピーカーボリュームチューブ
ヘッドセットボリューム
番号(0-10)
ヘッドセットの音量
handset_sidetone_db
番号例:-25
チューブの信号の増加係数、dB
headset_sidetone_db
番号(例:-15)
ヘッドセット信号ゲイン、dB
reset_call_volume
はい/いいえ
オプションが有効になっているが、1つの会話中の音量設定が終了後に保存されない場合
headset_answer
はい/いいえ
ヘッドセットまたはハンドセットを使用するように設定します
name_format
first_last、last_first
連絡先の氏名を表示する設定
lan_port_mode
auto、10hd、10fd、100hd、100fd、1000fd
LANポートモード
pc_port_mode
自動、10hd、10fd、100hd、100fd、1000fd、オフ
PCポートモード
enable_check_sync
はい/いいえ
SIP同期要求に応答する権限


ラインセクション
エクステン
文字列(例:1000)
sip.confファイルの拡張子
digit_map
ひも
ダイヤル規則
line_label
ひも
電話に表示される回線の名前
メールボックス
voicemail.confのメールボックス
voicemail.confのメールボックス
voicemail_uri
株式、SIP形式:ユーザー@ホスト
「Msgs」ボタンを押してアクセスできるメールボックスのURI
outboundproxy_address
ホスト/ IPアドレス
SIPサーバーのアドレス
outboundproxy_port

SIPサーバーのポート
輸送
udp、tcp
輸送方法
reregistration_timeout
秒数
再登録までの秒数
registration_retry_interval
秒数
再登録許可リクエスト間の秒単位の間隔
registration_max_retries
秒数
登録試行の最大数
秘密
文字列、mymagicpassword
拡張情報がsip.confではなくARAにある場合に必要なパスワード
コンテキスト
アスタリスクダイヤルプランコンテキスト
コンテキスト。拡張情報がsip.confではなくARAにある場合に必要
呼び出し人
発信者ID文字列、たとえば「Bob Jones」<1234>
発信者ID。拡張情報がsip.confではなくARAにある場合に必要
購読する
アスタリスクダイヤルプランコンテキスト
ここで定義されたコンテキストは、コンテキストデータを上書きし、sip.confのデータを上書きします


外線セクション
server_address
文字列例:otherpbx.othercompany.com
SIPサーバーアドレス
server_port

SIPサーバーポート
輸送
tcpまたはudp
輸送方法
secondary_server_address
文字列例:backuppbx.othercompany.com
プライマリが利用できない場合に電話が連絡するSIPサーバーのアドレス
secondary_server_port

プライマリが利用できない場合に電話がアクセスするSIPサーバーのポート
secondary_server_transport
tcpまたはudp
輸送方法
ユーザーID
文字列(例:bob1234)
ユーザー名、デフォルト=行名
authname
文字列(例:bob1234)
SIP認証名。ユーザーIDと異なる場合、フィールドに入力する必要があります
秘密
ひも
パスワード
登録する
はい/いいえ
登録
呼び出し人
ひも
発信者ID



アプリケーション-アプリケーション構成セクションには、標準アプリケーションの両方が含まれており、アプリケーションを設定できます
キューアプリケーション

待ち行列
ひも
queues.confで定義されたキュー識別子
メンバー名
ひも
キューメンバー名、デフォルト= [phone]セクションのフルネーム
場所
ローカル/ 6002 @ ext-queue / nなどのアスタリスクキューメンバーの場所
与えられたパターンに従った場所
会員
はい/いいえ
会員/非会員
許可
ステータス、概要、詳細
キューへのユーザーアクセスレベル
login_exten
アスタリスク拡張@コンテキスト、たとえば* 451234 @ ext-queue
キューにログインするためにダイヤルする必要がある番号
logout_exten
アスタリスク拡張@コンテキスト、たとえば* 451234 @ ext-queue
キューからログアウトするためにダイヤルする必要がある番号


ステータス申請

状態
利用可能、dnd、離れて、xa、チャット
ステータスタイプ
サブステータス
ひも
追加します。 状態
send486
はい/いいえ
インストールされている場合-電話は486エラーをアスタリスクに返します


駐車場申し込み

駐車場
ひも
features.confファイルで指定された駐車場拡張の名前


ボイスメールアプリケーション(ボイスメールアプリケーション)

翻訳
タイプの識別子=ボイスメールセクション
ボイスメールのローカライズを設定します


カスタムアプリケーション(独自のJavaScriptアプリケーション)

お名前
ひも

ファイル名
ひも
file_url_prefixパラメーターで指定されたフォルダーにある、アプリケーションのアーカイブの.zipファイル。
自動起動
はい/いいえ
電話の起動時の起動

価値
アプリケーションに渡すことができるオプションのパラメーター


着信音セクション
別名
ひも
着信音の名前(例:FancyRinger)。
ファイル名
ひも
.wavではなく、16ビット16kHzモノラルの着信音の名前をfile_url_prefixに含める必要があります。


アラートセクション
alert_info
ひも
このオプションが使用されている場合、電話が待つべき警告メッセージのタイトル
リングタイプ
ノーマル、アンサー、リングアンサー、ビジュアル
コールタイプ
着メロ
アラーム、チャイム、デジウム、ギターストラム、ジングル、
Office2、Office、RotaryPhone、SteelDrum、Techno、Theme、Tweedle、
トゥインクル、バイブ、またはタイプ=着信音のコンテキスト名のいずれか
着メロ


ファームウェアセクション
モデル
D40、D50、D70
電話モデル
バージョン
ファームウェアのバージョン文字列識別子
ソフトウェアバージョン、拡張子「.eff」のファイル
ファイル
ひも
file_url_prefix networkで定義されたフォルダーにあるソフトウェアファイルの名前
public_firmware
はい、いいえ
サーバーが利用できない場合、パブリックDigiumサーバーでソフトウェアを使用する


翻訳セクション

ひも
指定した値に置き換えられる値を設定



例:
 [voicemail_de_DE] type=translation INBOX=INBOX Work=Arbeit Family=Familie Friends=Freunde Recordings=Aufnahmen 


したがって、res_digium_phone.conf構成ファイルのすべてのセクションをソートしました。

以下は私の使用された設定のリストです:
[一般]
server_uuid = abcdefg123
globalpin = 1234
userlist_auth =無効
config_auth =無効
mdns_address = 192.168.1.253
mdns_port = 5060
service_name = Go 4 Phones
service_discovery_enabled = yes
file_directory = / var / lib /アスタリスク/ digium_phones

[network1]
タイプ=ネットワーク
エイリアス= My Default Network
cidr = 192.168.1.0 / 24
登録アドレス= 192.168.1.253
registration_port = 5060
; alternate_registration_address = 192.168.50.1
; alternate_registration_port = 5080

file_url_prefix = http://192.168.1.253

; public_firmware_url_prefix = http://dphone.dl.digium.com/firmware/asterisk/
ntp_server = 0.digium.pool.ntp.org
network_vlan_discovery_mode = NONE
sip_qos = 3
rtp_qos = 6
network_vlan_id = 4
pc_vlan_id = 10
pc_qos = 2
sip_dscp = 24
rtp_dscp = 46
udp_ka_interval = 60

[000]
タイプ=電話
ネットワーク= network1
;ファームウェア= 1.1Firmware
; mac = 000fd306b59b
行= 000
行= 111
行= 222
行= 333
full_name =ミハイル
タイムゾーン=ヨーロッパ/モスクワ
ntp_resync = 86400
parking_exten = 700
parking_transfer_type = blind
着信音= FancyTone
active_ringtone = GuitarStrum
web_ui_enabled = yes
record_own_calls =はい
アラート=ファンシーリンガー
blf_unused_linekeys = no
send_to_vm = yes
use_local_storage = no
ehs = auto
lock_preferences = no
login_password = 1234
accept_local_calls = any
display_mc_notification = yes
明るさ= 5
コントラスト= 5
dim_backlight = yes
blink_timeout = 30
blink_dim_level = 2
active_locale = en_GB
ringer_volume = 5
speaker_volume = 5
handset_volume = 5
headset_volume = 5
reset_call_volume = no
headset_answer = no
name_format = last_first
lan_port_mode = auto
pc_port_mode = 100fd
enable_check_sync = yes
blf_items = blf_test.xml
contact = contacts_test.xml
blf_contact_group =オフィスの連絡先

[000]
タイプ=行
line_label = 000
エクステン= 000
outboundproxy_address = 192.168.1.253
outboundproxy_port = 5060
transport = udp
reregistration_timeout = 300
registration_retry_interval = 25
registration_max_retries = 5
メールボックス= 000

[111]
タイプ=行
line_label = 111
エクステン= 111
outboundproxy_address = 192.168.1.253
outboundproxy_port = 5060
transport = udp
reregistration_timeout = 300
registration_retry_interval = 25
registration_max_retries = 5
メールボックス= 111

[222]
タイプ=行
line_label = 222
エクステン= 222
outboundproxy_address = 192.168.1.253
outboundproxy_port = 5060
transport = udp
reregistration_timeout = 300
registration_retry_interval = 25
registration_max_retries = 5
メールボックス= 222

[333]
タイプ=行
line_label = 333
エクステン= 333
outboundproxy_address = 192.168.1.253
outboundproxy_port = 5060
トランスポート= udp
reregistration_timeout = 300
registration_retry_interval = 25
registration_max_retries = 5
メールボックス= 222

[444]
タイプ=電話
ネットワーク= network1
;ファームウェア= 1.1Firmware
; mac = 000fd306b59b
行= 444
行= 555
行= 666
行= 777
行= 888
full_name =ミハイル
タイムゾーン=ヨーロッパ/モスクワ
ntp_resync = 86400
parking_exten = 700
parking_transfer_type = blind
着信音= FancyTone
active_ringtone = GuitarStrum
web_ui_enabled = yes
record_own_calls =はい
アラート=ファンシーリンガー
blf_unused_linekeys = no
send_to_vm = yes
use_local_storage = no
ehs = auto
lock_preferences = no
login_password = 1234
accept_local_calls = any
display_mc_notification = yes
明るさ= 5
コントラスト= 5
dim_backlight = yes
blink_timeout = 30
blink_dim_level = 2
active_locale = en_GB
ringer_volume = 5
speaker_volume = 5
handset_volume = 5
headset_volume = 5
reset_call_volume = no
headset_answer = no
name_format = last_first
lan_port_mode = auto
pc_port_mode = 100fd
enable_check_sync = yes
blf_items = blf_test.xml
contact = contacts_test.xml
blf_contact_group =オフィスの連絡先

[444]
タイプ=行
line_label = 444
エクステン= 444
outboundproxy_address = 192.168.1.253
outboundproxy_port = 5060
トランスポート= udp
reregistration_timeout = 300
registration_retry_interval = 25
registration_max_retries = 5
メールボックス= 444

[555]
タイプ=行
line_label = 555
エクステン= 555
outboundproxy_address = 192.168.1.253
outboundproxy_port = 5060
トランスポート= udp
reregistration_timeout = 300
registration_retry_interval = 25
registration_max_retries = 5
メールボックス= 555

[666]
タイプ=行
line_label = 666
エクステン= 666
outboundproxy_address = 192.168.1.253
outboundproxy_port = 5060
トランスポート= udp
reregistration_timeout = 300
registration_retry_interval = 25
registration_max_retries = 5
メールボックス= 666

[777]
タイプ=行
line_label = 777
エクステン= 777
outboundproxy_address = 192.168.1.253
outboundproxy_port = 5060
トランスポート= udp
reregistration_timeout = 300
registration_retry_interval = 25
registration_max_retries = 5
メールボックス= 777

[888]
タイプ=行
line_label = 888
エクステン= 888
outboundproxy_address = 192.168.1.253
outboundproxy_port = 5060
トランスポート= udp
reregistration_timeout = 300
registration_retry_interval = 25
registration_max_retries = 5
メールボックス= 888


次に、連絡先を含むxmlファイルの構造を見てみましょう。

Digium電話には、短縮ダイヤル、blf、プレゼンスステータスが組み込まれた「連絡先」アプリケーションが装備されています。 連絡先アプリケーションはステータスアプリケーションに関連付けられています。これらのアプリケーションはどちらもユーザーのプレゼンスに関する情報に基づいて動作するためです。 「ステータス」アプリケーションはローカルユーザーの存在に関する情報のみに依存し、「連絡先」アプリケーションは他のユーザーのステータス(スピードダイヤルボタンに割り当てられている情報)も参照します。

プレゼンスステータスのない連絡先は、この電話の所有者が電話にローカルにダウンロードできますが、これは推奨されません。 統合には、管理者が構成したxmlファイルを使用することをお勧めします。

DPMA 1.3以降、Digium電話は、ユーザーがローカルに追加した連絡先をAsteriskサーバーに転送する機能をサポートしています。 この機能を有効にするには、「編集可能」オプションを1に設定し、連絡先に一意の識別子が必要です。

電話からサーバーに連絡先を追加できますが、サーバーで形成された連絡先は電話から編集されず、電話のメモリから削除されません。 したがって、Digiumは、電話帳の紛失を避けるために電話から連絡先を追加する可能性を控えることが良いことを示唆しています...

連絡先リストをダウンロード

電話でダウンロードする連絡先ファイルは、DPMAモジュールまたはメインの電話プロビジョニングXMLファイルで定義されています。

接触パラメータ

上記のように、要素のサブ要素であるいくつかの連絡先フィールドを指定できます
ラピッドダイヤルキーオプション

BLFはblf_contact_groupパラメーターによって設定されます(必須フィールド、BLFボタンには、XMLファイルでの宣言の順序に従って値が割り当てられます)。

連絡先ファイルの構造

連絡先とblfはXML構文を使用するという事実により、Digium電話にはXMLビルトインバリデータがなく、エラーメッセージが表示されないため、連絡先リスト構造を正しく構築することが非常に重要です。

連絡先ファイルの基本構造は次のとおりです。
 <phonebooks> <contacts> <contact> <emails> <email /> </emails> <actions> <action> <headers> <header /> </headers> </action> </actions> </contact> </contacts> </phonebooks> 


連絡先セクション
group_name
ひも
連絡先グループの名前
編集可能
論理的
電話から連絡先を変更する機能を決定します
id
ひも
グループの一意の識別子


連絡先:連絡先セクションの子
server_uuid
ひも
必要に応じて。 電話機がアクセスしているサーバーの一意の名前。 使用する場合
DPMA名はres_digium_phone.conf configと同じである必要があります。
id
ひも
blfに使用される一意の連絡先識別子。
プレフィックス
ひも
連絡先のプレフィックス。例:「ミスター」

ひも
連絡先
second_name
ひも
連絡先の2番目の名前(ロシアには関係ありません。ただし、このパラメーターにミドルネームを記述する場合を除きます)
last_name
ひも
連絡先の姓
接尾辞
ひも
連絡先の接尾辞。たとえば、「Jr。」
contact_type
一口、特別
連絡先のタイプ。 タイプが「特殊」の連絡先は、自分の連絡先のみを送信できます
プレゼンス状態
組織
ひも
連絡先の組織名
job_title
ひも

location


notes

.
account_id

SIP-, id sip.conf
subscribe_to
SIP URI
SIP URI


連絡先リストを表示するパラメータ「FIRST_NAME」と「LAST_NAME」空避ける間違ったままにしないでください
subscribe_to =«auto_hint_1234»:«auto_hint_を»フォーマット例をDPMAが正しいBLF-指示のためauto_hintパラメータを使用する必要があります使用しているときに

でDPMAのpropistyvatのヒントを使用した場合には
ダイヤルプランはオプションですDPMAを使用しない場合、subscribe_toパラメーターは次のとおりです。subscribe_to = "sip:500@my.pbx.com"ダイヤルプランに

ヒントを登録することも必要です。

 exten => 1234,hint,SIP/mypeer exten => 1234,1,NoOp() exten => 1234,n,Dial(SIP/mypeer,20) 


いずれの場合でも、DPMAを使用するかどうかにかかわらず、sip.confのcallcounterパラメーターが必要です
メールセクション


メール:子にメールを送信
address

e-mail
label

e-mail
primary

e-mail


アクションセクション


アクション:アクションの子
id

必須です。 , blf. id
"primary" .
dial

. ,
dial_prefix

. ,
app_id

. ( , )
label

必須です。 mandatory, . :
“” SIP-.
お名前

, action.


ヘッダー:アクションの子

ヘッダー:ヘッダーの子
key

,X-Digium-Call-Feature"
value

, feature_send_to_vm, (Wildcard Variables)


ワイルドカード変数(特殊文字)

%_ACCOUNT_USERNAME
_
%% _ACCOUNT_SERVER _ %% _ACCOUNT_PORT_%

表示ルール


ソフトウェアバージョン1.4以降、連絡先アプリケーションはBLF機能と連動します。連絡先情報を表示すると、連絡先に定義されたアクションがデフォルトで表示されます。

表示ルールのサンプルXMLファイル
 <display_rules>    <display_rule id="1" action_id="monitor" show="0"/>    <display_rule id="2" action_id="monitor" target_status="on_the_phone" show="1"/>    <display_rule id="3" action_id="intercom" show="0"/>    <display_rule id="4" action_id="intercom" target_status="idle" show="1"/>    <display_rule id="5" action_id="dial_vm" phone_state="idle" show="0"/>    <display_rule id="6" action_id="transfer_vm" show="0"/>    <display_rule id="7" action_id="transfer_vm" phone_state="transfer" show="1"/> </display_rules> 


id
id
, 0, 1, 2 .
action_id

, monitor, intercom, dial_vm, transfer_vm
phone_state
idle, hold, transfer, incoming/transfer, incoming,
connected, dialing, calling, failed

target_status
unknown, idle, on_hold, ringing, on_the_phone
. ,
見せる

/


以下は私の連絡先ファイルのリストです:
 <?xml version="1.0"?> <phonebooks> <contacts group_name="office-contacts" editable="0" id="0"> <contact first_name="Digium D50" last_name="Line 1" organization="TEST" contact_type="sip" account_id="000" id="000" subscribe_to="000" > <numbers> <number dial="000" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="000" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> <contact first_name="Digium D50" last_name="Line 2" organization="TEST" contact_type="sip" account_id="111" id="111" subscribe_to="111" > <numbers> <number dial="111" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="111" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> <contact first_name="Digium D50" last_name="Line 3" organization="TEST" contact_type="sip" account_id="222" id="222" subscribe_to="222" > <numbers> <number dial="222" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="222" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> <contact first_name="Digium D50" last_name="Line 4" organization="TEST" contact_type="sip" account_id="333" id="333" subscribe_to="333" > <numbers> <number dial="333" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="333" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> <contact first_name="Digium D70" last_name="Line 1" organization="TEST" contact_type="sip" account_id="444" id="444" subscribe_to="444" > <numbers> <number dial="444" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="444" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> <contact first_name="Digium D70" last_name="Line 2" organization="TEST" contact_type="sip" account_id="555" id="555" subscribe_to="555" > <numbers> <number dial="555" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="555" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> <contact first_name="Digium D70" last_name="Line 3" organization="TEST" contact_type="sip" account_id="666" id="666" subscribe_to="666" > <numbers> <number dial="666" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="666" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> <contact first_name="Digium D70" last_name="Line 4" organization="TEST" contact_type="sip" account_id="777" id="777" subscribe_to="777" > <numbers> <number dial="777" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="777" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> <contact first_name="Digium D70" last_name="Line 5" organization="TEST" contact_type="sip" account_id="888" id="888" subscribe_to="888" > <numbers> <number dial="888" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="888" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> <contact first_name="Linphone" last_name="" organization="TEST" contact_type="sip" account_id="999" id="999" subscribe_to="999" > <numbers> <number dial="999" label="Extension" primary="1" /> </numbers> <actions> <action id="primary" dial="999" dial_prefix="" label="Extension" name="Office" /> </action> </actions> </contact> </contacts> </phonebooks> 


スマートblfファイル構造

スマートBLFは、スピードダイヤルキーの動作を説明します(ファームウェアバージョン1.4以降)。BLFは、スピードダイヤルボタンの位置を決定し、ページの固定レイアウト(D70に関連)、スピードダイヤルボタンの動作、短押しおよび長押しのアクション、特別な連絡先着信音を設定できます。スピードダイヤルボタンの動作のルールは、http経由で受信した個別のxmlファイルで設定されます。

連絡先とblfはxml構文を使用するという事実により、Digium電話にはXML検証機能が組み込まれておらず、エラーメッセージが表示されないため、連絡先リストの構造を正しく構築することが非常に重要です。

blfファイルの基本構造は次のとおりです。


 <smart_blf>    <blf_items>        <blf_item>            <behaviors>                <behavior />            </behaviors>            <indicators>                <indicator />            </indicators>        </blf_item>    </blf_items> </smart_blf> 


構成のより詳細な例:

 <smart_blf>    <blf_items>        <blf_item location="side" index="0" paging="1" contact_id="101">            <behaviors>                <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" />                <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" />                <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" />            </behaviors>            <indicators>                <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" />                <indicator target_status="ringing" ring="1" ringtone_id="Techno" led_color="red" led_state="fast" />            </indicators>        </blf_item>    </blf_items> </smart_blf> 


BLFアイテム
location
main, side
:
( ) .
D40 “main” .
D70 , .
“main”, index 1, .. 0
.
インデックス

, “0”
paging
, 0, 1
1. 0,
.
contact_id

"id"
app_id


(contacts, voicemail, parking, status, queues)
.
contact_id, .
blank
, 0,1




動作:blf_itemの子


行動:行動の子
behavior . . .

phone_state
, phone state

target_status
unknown, idle, on_hold, ringing, on_the_phone

press_action
id
id .
press_function
dial, info, show_app, transfer, send_dtmf, none

long_press_action
An action id from the loaded contacts file
id ,
2
long_press_function
dial, info, show_app, transfer, send_dtmf, none
,
2


電話の状態
, :

idle

hold

hold/transfer
,
, “Transfer“ “Hold” “Transfer”.
hold/preconference
,
hold/conference
,
incoming
, , .
incoming/transfer
, ,
“transfer” ,
connected
,
connected/conference

calling
,
dial
, ,
dialing
,
failed
, -
all



指標:子blf_item


インジケーター:子インジケーター
target_status
unknown, idle, on_hold, ringing, on_the_phone

ring

“true”,
ringtone_id
Alarm, Chimes, Digium, GuitarStrum, Jingle, Office2, Office,
RotaryPhone, SteelDrum, Techno, Theme,
Tweedle, Twinkle, Vibe, or one of ids from a custom-loaded ringtone

led_color
amber, green, red

led_state
off, on, slow, fast

(, , / )


以下は私のスマートBLFファイルのリストです
 <?xml version="1.0"?> <config> <smart_blf> <blf_items> <blf_item location="side" index="0" paging="1" contact_id="000"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> <blf_item location="side" index="1" paging="1" contact_id="111"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> <blf_item location="side" index="2" paging="1" contact_id="222"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> <blf_item location="side" index="3" paging="1" contact_id="333"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> <blf_item location="side" index="4" paging="1" contact_id="444"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> <blf_item location="side" index="5" paging="1" contact_id="555"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> <blf_item location="side" index="6" paging="1" contact_id="666"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> <blf_item location="side" index="7" paging="1" contact_id="777"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> <blf_item location="side" index="8" paging="1" contact_id="888"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> <blf_item location="side" index="9" paging="1" contact_id="999"> <behaviors> <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" /> <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" /> <behavior phone_state="idle" target_status="idle" long_press_action="anintercom" long_press_function="dial" /> </behaviors> <indicators> <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" /> <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" /> </indicators> </blf_item> </blf_items> </smart_blf> </config> 


連絡先スマートblfを使用してxmlファイルを構築するためのすべてのオプションとルールの詳細な説明は、アスタリスクwikiにあります。

上記のように、短縮ダイヤルボタンの動作を伴うファイルはhttp経由でダウンロードされます。

これらの目的でapache2を選択しました。

テストはCentos 6.3で実施されました。インストール例:

 yum install httpd 


構成ファイルに移動します。

 vim /etc/httpd/conf/httpd.conf 


「ServerName」パラメーターには、電話が設定を受信するサーバーのIPアドレスまたはドメイン名を入力します。私の場合:(ServerName 192.168.1.253
行の先頭にあるコメントを削除することを忘れないでください)。

Digiml-phonesからXmlファイルを受信する要求があるかどうかを確認するには、次のコマンドを使用します。

 tail -f /var/log/httpd/* 


電話が設定のためにapacheを呼び出すと、コンソールに次のようなものが表示されます。

 192.168.1.143 - - [29/Jan/2014:18:39:15 +0400] "GET /blf_test.xml HTTP/1.1" 200 8564 "-" "Digium-D50/1_4_0_0_57389" 192.168.1.140 - - [29/Jan/2014:18:39:37 +0400] "GET /blf_test.xml HTTP/1.1" 200 8564 "-" "Digium-D70/1_4_0_0_57389" 


すべてが正しく構成されている場合、Asteriskカーネルを再起動すると、Digiumの電話は緑と赤のダイオードで暖かく点滅します:)









そして、Digiumの人たちは、灰色の日常生活を多様化するためにそのようなことをすることがあります:)



上記のすべてをまとめると、初期設定はかなり複雑に見えるかもしれませんが、管理者が20台以上の電話を所有している場合、このプロビジョニングオプションは電話の設定作業を大幅に促進します。幅広い選択肢、柔軟なカスタマイズ、自動構成のための標準サービスの使用、それに基づくアスタリスクとディストリビューションの緊密な統合により、Digium電話は、IPテレフォニーおよびユニファイドコミュニケーション市場における最高のソリューションです。

Source: https://habr.com/ru/post/J211464/


All Articles