понедельник, 27 декабря 2010 г.

asterisk. sip-server


Более двух суток чтения мануалов. И вот результат - настроенный asterisk!

mkdir /home/darvin44in/asterisk
chmod 777 /home/darvin44in/asterisk
cd /home/darvin44in/asterisk
svn co http://svn.digium.com/svn/asterisk-gui/branches/2.0 asterisk-gui
./configure && make && make install

chmod 777 -Rv /var/lib/asterisk/static-http

gedit /etc/asterisk/manager.conf
;!
;! Automatically generated configuration file
;! Filename: manager.conf (/etc/asterisk/manager.conf)
;! Generator: Manager
;! Creation Date: Thu Dec 30 17:27:07 2010
;!
;
; Asterisk Call Management support
;
; By default asterisk will listen on localhost only. 
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
webenabled = yes
[admin]
secret = pass
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config,originate
#include "manager.d/*.conf"

gedit /etc/asterisk/http.conf
;!
;! Automatically generated configuration file
;! Filename: http.conf (/etc/asterisk/http.conf)
;! Generator: Manager
;! Creation Date: Thu Dec 30 17:27:07 2010
;!
;
; Asterisk Builtin mini-HTTP server
;
;
; Note about Asterisk documentation:
;   If Asterisk was installed from a tarball, then the HTML documentation should
;   be installed in the static-http/docs directory which is
;   (/var/lib/asterisk/static-http/docs) on linux by default.  If the Asterisk
;   HTTP server is enabled in this file by setting the "enabled", "bindaddr",
;   and "bindport" options, then you should be able to view the documentation
;   remotely by browsing to:
;       http://:/static/docs/index.html
;
[general]
;
; Whether HTTP/HTTPS interface is enabled or not.  Default is no.
; This also affects manager/rawman/mxml access (see manager.conf)
;
enabled = yes
;
; Address to bind to, both for HTTP and HTTPS.  Default is 0.0.0.0
;
bindaddr = 0.0.0.0
;
; Port to bind to for HTTP sessions (default is 8088)
;
bindport = 8088
;
; Prefix allows you to specify a prefix for all requests
; to the server.  The default is blank.  If uncommented
; all requests must begin with /asterisk
;
prefix = asterisk
;
; Whether Asterisk should serve static content from http-static
; Default is no.
;
enablestatic = yes
[post_mappings]
backups = /var/lib/asterisk/gui_backups
moh = /var/lib/asterisk/moh

gedit /etc/asterisk/sip.conf
...
[general]
context = default  ; Default context for incoming calls
allowguest = no  ; Allow or reject guest calls (default is yes)
;match_auth_username=yes        ; if available, match user entry using the
; 'username' field from the authentication line
; instead of the From: field.
allowoverlap = no  ; Disable overlap dialing support. (Default is yes)
;allowtransfer=no               ; Disable all transfers (unless enabled in peers or users)
; Default is enabled. The Dial() options 't' and 'T' are not
; related as to whether SIP transfers are allowed or not.
;realm=mydomain.tld             ; Realm for digest authentication
; defaults to "asterisk". If you set a system name in
; asterisk.conf, it defaults to that system name
; Realms MUST be globally unique according to RFC 3261
; Set this to your host name or domain name
udpbindaddr = 0.0.0.0:5060 #####################################
...
настраивать в веб интерфейсе http://localhost:8088/asterisk/static/config/index.html из Mazilla!!!
Иначе ни чего у вас не получиться. Указываем DialPlan, создаем пользователей...
В качестве клиента для Ubuntu советую SFLphone


rmdir /usr/share/asterisk/static-http/
ln -s /var/lib/asterisk/static-http/ /usr/share/asterisk/
chmod -R 777 /etc/asterisk

Комментариев нет:

Отправить комментарий

h265.sh

#!/bin/bash file="../mp4" if [ -d $file ]; then         echo "  Директория существует :-) "         for i in *.mp4; do f...