среда, 27 марта 2013 г.

Мигаем диодами BLF на Linksys Cisco

Цветовые кнопки на терминалах Linksys и Cisco позволяют наблюдать за локальными и удаленными событиями.
Все в основном сперто отсюда
http://sbkb.cisco.com/CiscoSB/GetArticle.aspx?docid=e2a5d4a40d1e4e0291cadd5153ee7cf8_Configure_Line_Key_LED_Pattern_on_SPA300_SPA500_Series_IP_Ph.xml&pid=2&converted=0

http://www.smartvox.co.uk/astfaq_asterisk_sla.htm

http://www.cisco.com/en/US/products/ps10033/products_qanda_item09186a0080a35e40.shtml

настройка spa932
http://www.cisco.com/en/US/products/ps10033/products_qanda_item09186a0080a36aa9.shtml


Цветов немного, либо red либо green, но можно мигать с разной скоростью.(а вот недавно нашел оранжевый)
Настройка событий находится в закладке "PHONE"



p=fb, p=sb - мигать быстро, медленно     p=d     двойное мигание
c=r, c=g  - цвет красный , зеленый,   c=a    оранжевый,     с=o  выключить 

О чем мигают кнопки BLS (Busy Lamp Field)

fnc=blf+sd;sub=204@$PROXY;ext=204@$PROXY;vid=1; usr=    ; nme=   ???



1)    Idle LED Appears when the line is idle.  Defaults to blank (c=r). 
Режим ожидания.

2)   Remote Undefined LED LED pattern during the Remote Undefined state, where the shared call state is undefined (the station is still waiting for the state information from the application server). Not applicable if 
the call appearance is not shared. Leaving this entry blank indicates the default value of c=r;p=d. 
Неопределенное состояние - станция ожидает ответа от сервера приложений.

3) Local Seized LED Appears when this station seizes the call appearance to prepare for a new outbound call. Defaults to blank (c=r).
Локальное состояние. Отображает готовность к новому вызову.

4) Remote Seized LED (applicable only to  shared call appearance) Appears when the shared call ppearance is seized by another station. Defaults to blank (c=r; p=d). 
Удаленная готовность


5)Local Progressing LED Appears when this station attempts an outgoing call on this call appearance (the called number is ringing). Defaults to blank (c=r). 
Локальный набор номера.

6)Remote Progressing LED(applicable only to shared call appearance) Appears when another station attempts an outbound call on  this shared call appearance. Defaults to blank (c=r; p=d). 
Удаленный набор номера.

7)Local Ringing LED Appears when the call appearance is ringing. Defaults to blank (c=r;p=f). 
Локальный Сигнал вызова.

8) Remote Ringing LED (applicable only to shared call appearance) Appears when the shared call appearance is in ringing on another station. Defaults to blank (c=r;p=d). 
Удаленный сигнал вызова.

9)Local Active LED Appears when the call appearance is engaged in an active call. 
Defaults to blank (c=r).
Локальный активный вызов.
10) Remote Active LED
(applicable only to shared call appearance) Appears when another station is engaged in an active call on 
this shared call appearance. Defaults to blank (c=r;p=d). 
Удаленный активный  вызов.

11)Local Held LED Appears when the call appearance is held by this station. Defaults to blank (c=r;p=s). 
Локальное удержание

12)Remote Held LED
(applicable only to shared call appearance) Appears when another station places this call appearance on 
hold.Defaults to blank (c=r,p=s).
Удаленное удержание

13) Register Failed LED LED pattern when the corresponding extension has failed to 
register with the proxy server. Leaving this entry blank 
indicates the default value of c=a. 
14) Disabled LED LED pattern when the Call Appearance is disabled (not 
available for any incoming or outgoing call). Leaving this entry 
blank indicates the default value of c=o. 
15) Registering LED Appears when the corresponding extension tries to register 
with the proxy server. 
Defaults to blanks (c=r;p=s). 
16) Call Back Active LED Indicates Call Back operation is currently active on this call.
defaults to blank (c=r;p=s)



пятница, 22 марта 2013 г.

SMPP SNMP SMTP

SMTP  - простой протокол передачи почты
SMPP  - протокол передачи коротких сообщений
SNMP  - простой протокол управления сетевыми устройствами

Postfix шлем факсы и прочее

1) Поменять первоначальные настройки postfix

dpkg-reconfigure postfix

выбрать режим "site-satelite"
указать домен, SMTP

2) Проверить посылку

echo "something" | mailx -s "subject" testdestination@gmail.com

3) Результат смотреть  

tail /var/log/mail.log

понедельник, 18 марта 2013 г.

Munin+PyMunin - наблюдаем за Asterisk

1) Ставим munin-node для клиента и сервера
apt-get install munin-node

2) ставим PIP installer из под рута
curl https://bootstrap.pypa.io/get-pip.py | python

3) ставим Pymunin
pip install  Pymunin

4) делаем  символьную сылку
ln -s /usr/share/munin/plugins/asteriskstats   /etc/munin/plugins/

5) Включаем и настраиваем AMI (Asterisk management interface)
/etc/asterisk/manager.conf

 [general]
enabled = yes
port = 5038
bindaddr = 127.0.0.1
displayconnects=no ;only effects 1.6+

[admin]
secret = password
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.255
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr

6) Перегружаем модуль AMI в астериске
asterisk -rx  "manager reload"

7) Правим параметры астериска в нашем случае
  /etc/munin/plugin-conf.d/munin-node

[asteriskstats]
#здесь параметры доступа к менеджеру астериска
env.amihost 123.123.123.123                                                                                                                                    env.amiport 5038
env.amiuser admin
env.amipass password
#список отображаемых графиков через запятую
env.include_graphs asterisk_calls,asterisk_channels,asterisk_peers_sip,asterisk_queue_calls,asterisk_queue_len,asterisk_queue_avg_hold,asterisk_queue_avg_tal
k,asterisk_queue_abandon_pcent,asterisk_fax_stats,asterisk_trunks,asterisk_conferences,asterisk_voicemail
#список отключеных графиков
env.exclude_graphs asterisk_peers_iax2
# список наблюдаемых каналов SIP, IAX2, dahdi, local
env.list_channels sip,local
#кодеки  alaw, ulaw
env.list_codecs
#наблюдаемые транки, называемые также как
env.list_trunks PSTN=Zap\/(?P<num>\d+)=1-3,VoIP=SIP\/(net2phone|skype)
env.include_queues NAME_queue    # Comma separ
ated list of queues to include in  graphs.(All queues included by default.)
env.exclude_queues # Comma separated list of queues to exclude from graphs.

8) перегружаем
/etc/init.d/munin-node restart

Почему на графиках десятичные числа?
Дело в том что RRDTool берет среднее значение между данными которые он периодически получает, потому получаются дробные числа.
Чтобы округлить значения до целых, можно использовать
graph_printf %.0lf
в munin.conf