Category: Asterisk


How to get DID from SIP header


To get DID from SIP header just add in /etc/asterisk/extensions_custom.conf new context:

;Get did from SIP Header
[custom-get-did-from-sip]
exten => _.,1,Noop(Fixing DID using information from SIP TO header)
exten => _.,n,Set(pseudodid=${SIP_HEADER(To)})
exten => _.,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => _.,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => _.,n,Goto(from-trunk,${pseudodid},1)

After that just add in sip trunk peer details your new context

context=custom-get-did-from-sip

And reload asterisk. fwconsole reload or amportal reload

Asterisk error Couldn’t create astdb table: disk I/O error


Asterisk couldn’t start with error:

Couldn’t create astdb table: disk I/O error

Solution:

Move astdb.sqlite3 & astdb.sqlite-journal into a backup location. FreePBX regenerated databases

cd /var/lib/asterisk/
mv astdb.* /home

And restart asterisk


Asterisk PBX Check DND


To check DND status use asterisk cli:

asterisk -rx ‘database show’ | grep DND


FreePBX pjsip trunk settings for Zadarma


Settings for chain pjsip for Zadarma on FreePBX ver 14

Настройки для провайдера Zadarma на FreePBX версия 14 с использованием chain pjsip

111111: Ваш sip-номер из личного кабинета.

Secret: Ваш пароль от sip-номера, из раздела “SIP-настройки” личного кабинета.

Раздел General

Read More »


как убить зависший канал в Asterisk


как убить зависший канал в Asterisk

# get channel CallerID from list of channels:
sip show channels

# get Owner channel ID from channel info:
sip show channel 80BDD706-AAB8-E (CallID from prev command)

# hangup channel by Owner channel ID:
channel request hangup SIP/225-0001c666 (Owner channel ID: SIP/225-0001c666 from prev command)