User Tools

Site Tools


сервис_asterisk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
сервис_asterisk [2022/04/13 13:59]
val [Использование хешей паролей для каналов типа user]
сервис_asterisk [2022/04/17 19:01]
val [Использование шаблонов в именах CHAN_SIP каналов]
Line 93: Line 93:
 ==== Использование шаблонов в именах CHAN_SIP каналов ==== ==== Использование шаблонов в именах CHAN_SIP каналов ====
 <​code>​ <​code>​
-root@server# cat /​etc/​asterisk/​sip.conf+server# cat /​etc/​asterisk/​sip.conf
 </​code><​code>​ </​code><​code>​
 ... ...
-;[office](!) +[office](!) 
-;type=friend +type=friend 
-;host=dynamic +host=dynamic 
-;deny=0.0.0.0/​0.0.0.0 +deny=0.0.0.0/​0.0.0.0 
-;permit=192.168.X.0/​255.255.255.0+permit=192.168.X.0/​255.255.255.0 
 + 
 +[internet](!) 
 +type=friend 
 +host=dynamic 
 +permit=0.0.0.0/​0.0.0.0 
 +nat=force_rport,​comedia 
 +qualify=yes 
 +directmedia=no 
 +;​call-limit=1 
 + 
 +[401](office) 
 +secret=tpassword401 
 + 
 +[402](internet) 
 +secret=tpassword402
  
-;[403](office) +[403](office) 
-;secret=tpassword403+secret=tpassword403
  
-;[404](office) +[404](office) 
-;secret=tpassword404+secret=tpassword404
 ... ...
 </​code>​ </​code>​
Line 1776: Line 1791:
 ... ...
  
-;For IMAP/SMTP+;;;For IMAP/SMTP
 ;​charset=UTF-8 ;​charset=UTF-8
 ;​locale=ru_RU.UTF-8 ;​locale=ru_RU.UTF-8
Line 1785: Line 1800:
 ... ...
  
-;For IMAP +;;;For IMAP 
-;debian# apt install asterisk-voicemail-imapstorage +;;;debian# apt install asterisk-voicemail-imapstorage 
-;debian# cp /​etc/​dovecot/​private/​dovecot.pem /​usr/​local/​share/​ca-certificates/​dovecot.crt +;;;debian# cp /​etc/​dovecot/​private/​dovecot.pem /​usr/​local/​share/​ca-certificates/​dovecot.crt 
-;debian# update-ca-certificates +;;;debian# update-ca-certificates 
-;debian# service asterisk restart+;;;debian# service asterisk restart
 ;​imapserver=server.corpX.un ;​imapserver=server.corpX.un
 ;​imapfolder=INBOX ;​imapfolder=INBOX
  
-;For SMTP+;;;For SMTP
 ;debian# apt install postfix mailutils ;debian# apt install postfix mailutils
  
Line 1918: Line 1933:
  
 <​code>​ <​code>​
-server# cat 1.call+# cat call.txt
 </​code><​code>​ </​code><​code>​
-Channel: ​sip/401 +Channel: ​Local/voip1_00000X@default 
-Extension: ​601+Extension: ​89161234567
 Context: default Context: default
-CallerId: ​Conferencia ​<601>+CallerId: ​CorpX<84992636363>
 </​code><​code>​ </​code><​code>​
-server# ​cat 2.call +server# ​cp call.txt /​var/​spool/​asterisk/​outgoing/​
-</​code><​code>​ +
-Channel: sip/402 +
-Extension: 601 +
-Context: default +
-CallerId: Conferencia <​601>​ +
-</​code><​code>​ +
-server# cat 3.call +
-</​code><​code>​ +
-Channel: sip/403 +
-Extension: 601 +
-Context: default +
-CallerId: Conferencia <​601>​ +
-</​code><​code>​ +
-server# cp [123].call ​/​var/​spool/​asterisk/​outgoing/​+
 </​code><​code>​ </​code><​code>​
 # cat /​usr/​share/​originate_call_file.sh # cat /​usr/​share/​originate_call_file.sh
Line 1957: Line 1958:
 # /​usr/​share/​originate_call_file.sh 402 601 Conferencia # /​usr/​share/​originate_call_file.sh 402 601 Conferencia
 # /​usr/​share/​originate_call_file.sh 401 601 Conferencia # /​usr/​share/​originate_call_file.sh 401 601 Conferencia
-</​code><​code>​ 
-# cat test_local.call 
-</​code><​code>​ 
-Channel: Local/​311@default 
-Extension: 89161234567 
-Context: default 
-CallerId: Echo <311> 
 </​code>​ </​code>​
 ==== Пример с использованием Asterisk AMI ==== ==== Пример с использованием Asterisk AMI ====
Line 2523: Line 2517:
 ... ...
 </​code>​ </​code>​
-==== Приложение SHELL ====+==== Функция SHELL ====
  
   * !!! Название функции только ЗАГЛАВНЫМИ буквами   * !!! Название функции только ЗАГЛАВНЫМИ буквами
сервис_asterisk.txt · Last modified: 2023/12/02 08:15 by val