Posts Tagged ‘ voip

Asterisk 13 + chan_dongle. Уточнения

По следам заметки chan_dongle + asterisk 10
Текущая версия dongle уже не поддерживается на сайте google
Форк можно взять тут https://github.com/bg111/asterisk-chan-dongle
Особо ничего не поменялось.
Собирать будем под Asterisk 13.7

Asterisk 13.7.0, Copyright (C) 1999 - 2014, Digium, Inc. and others

Read more

Cisco 7940 за NAT

http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cuipph/7960g_7940g/5_0/sip/english/administration/guide/5_0/7960setS.html

Some general advice on how to get 7940/7960 going in standalone SIP via NAT.

1. Give your 7940 a static IP.
2. Forward ports 5060-5062 TCP and UDP and 16384 to 16399 UDP to the static IP of the 7940.
3. Make configuration file adjustments as follows:

Set voip_control_port: 5061

; NAT/Firewall Traversal- 0=Disabled, 1=Enabled
nat_enable: 1
nat_address: “”
nat_received_processing: 1

; Start RTP range for media (default – 16384)
Start_media_port: 16384

; End RTP range for media (default – 32766)
end_media_port: 16399

; Register or Not
proxy_register: 1

Драйвер для Tormenta2 в Asterisk

Чтоб не искать каждый раз заново.
Драйвер для ISDN PRI карты Tormenta2 от украинской компании Nika нужно подкинуть в каталог с оригинальными
dahdi-linux-complete-2****/linux/drivers/dahdi/
И заменить в нем тот драйвер который уже есть tormenta2.rbt
Сам фай можно скачать по это ссылке tormenta2.rbt

Asterisk: список стандартных переменных

Variables present in Asterisk 1.8 and forward:

${CDR(accountcode)} * – Account code (if specified)
${BLINDTRANSFER} – The name of the channel on the other side of a blind transfer
${BRIDGEPEER} – Bridged peer
${BRIDGEPVTCALLID} – Bridged peer PVT call ID (SIP Call ID if a SIP call)
${CALLERID(ani)} * – Caller ANI (PRI channels)
${CALLERID(ani2)} * – ANI2 (Info digits) also called Originating line information or OLI
${CALLERID(all)} * – Caller ID
${CALLERID(dnid)} * – Dialed Number Identifier
${CALLERID(name)} * – Caller ID Name only
${CALLERID(num)} * – Caller ID Number only
${CALLERID(rdnis)} * – Redirected Dial Number ID Service
${CALLINGANI2} * – Caller ANI2 (PRI channels)
${CALLINGPRES} * – Caller ID presentation for incoming calls (PRI channels)
${CALLINGTNS} * – Transit Network Selector (PRI channels)
${CALLINGTON} * – Caller Type of Number (PRI channels)
${CHANNEL} * – Current channel name
${CONTEXT} * – Current context
${DATETIME} * – Current date time in the format: DDMMYYYY-HH:MM:SS (Deprecated; use ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)})
${DB_RESULT} – Result value of DB_EXISTS() dial plan function
${EPOCH} * – Current unix style epoch
${EXTEN} * – Current extension
${ENV(VAR)} – Environmental variable VAR
${GOTO_ON_BLINDXFR} – Transfer to the specified context/extension/priority after a blind transfer (use ^ characters in place of | to separate context/extension/priority when setting this variable from the dialplan)
${HANGUPCAUSE} * – Asterisk cause of hangup (inbound/outbound)
${HINT} * – Channel hints for this extension
${HINTNAME} * – Suggested Caller*ID name for this extension
${INVALID_EXTEN} – The invalid called extension (used in the “i” extension)
${LANGUAGE} * – Current language (Deprecated; use ${CHANNEL(language)})
${LEN(VAR)} – String length of VAR (integer)
${PRIORITY} * – Current priority in the dialplan
${PRIREDIRECTREASON} – Reason for redirect on PRI, if a call was directed
${TIMESTAMP} * – Current date time in the format: YYYYMMDD-HHMMSS (Deprecated; use ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
${TRANSFER_CONTEXT} – Context for transferred calls
${FORWARD_CONTEXT} – Context for forwarded calls
${DYNAMIC_PEERNAME} – The name of the channel on the other side when a dynamic feature is used.
${DYNAMIC_FEATURENAME} The name of the last triggered dynamic feature.
${UNIQUEID} * – Current call unique identifier
${SYSTEMNAME} * – value of the systemname option of asterisk.conf
${ENTITYID} * – Global Entity ID set automatically, or from asterisk.conf

Variables present in Asterisk 11 and forward:

${AGIEXITONHANGUP} – set to 1 to force the behavior of a call to AGI to behave as it did in 1.4, where the AGI script would exit immediately on detecting a channel hangup
${CALENDAR_SUCCESS} * – Status of the CALENDAR_WRITE function. Set to 1 if the function completed successfully; 0 otherwise.
${SIP_RECVADDR} * – the address a SIP MESSAGE request was received from
${VOICEMAIL_PLAYBACKSTATUS} * – Status of the VoiceMailPlayMsg application. SUCCESS if the voicemail was played back successfully, {{FAILED} otherwise

Кодек g729 в Asterisk 13

Ставимо bcg729
Bcg729 – програмна бібліотека кодера і декодера G729A, написана на C та розроблена в Belledonne Communications, компанії яка підтримує проект Linphone. Вона була написана з нуля і не є похідним від кодів ITU.

git clone git://git.linphone.org/bcg729.git
cd bcg729-1.0.0
./configure
make
make install

Ставимо Mercurial

apt-get install mercurial

Read more

Asterisk: логируем cel и cdr в mysql через odbc

Устанавливаем недостающие пакеты unixODBC

apt-get install unixODBC unixODBC-dev libmyodbc

Настройки ODBC:

cat /etc/odbcinst.ini 
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
cat /etc/odbc.ini 
[asterisk-connector]
Description = MySQL connection to 'asterisk' database
Driver = MySQL
Database = ast
Server = localhost
UserName = user
Password = pass
Port = 3306

Read more

Cisco 7941 ssh доступ

ssh roo@ip
password - cisco
login: default
password: user

Read more

Отправка sms через gsm-шлюз Openvox

Первым делом заходим в сам gsm-шлюз
Открываем возможность управления астериском через AMI

OpenVox web

OpenVox web


Read more

Установка Asterisk 12 в Debian 7

Вырезка из bash history по установке Asterisk 12 в дебине. Тут ничего нового или загадочного, просто все пакеты и команды в одном месте.
Read more

ошибка modules.link при сборке Asterisk из исходных кодов

Сия ошибка вылазит при сборке Asterisk 12 в Debian

make[1]: *** No rule to make target `../main/modules.link', needed by `asterisk'.  Stop

Самый простой способ избавится от этой ошибки – отключить embed из конфигурации
embed

Не верю я в чудеса

Давеча прочитал статейку Битва титанов FreeSwitch vs. Asterisk — Тест производительности
Ну тест да и тест… мне то что…. я равнодушен к FS и Asterisk … каждый юзает что ему нравится и нужно.
Но вот разница в производительности в 6 и более раз – насторожило, при том, что оба основаны на одном проекте.
Решил прогнать тест у себя…
Удивился….
Read more