asterisk sip서버를 이용한 내부 call설정하기위한 작업 과정이다.

1. 설치된 asterisk의 sip.conf와 extensions.conf파일을 수정한다.

a) sip.conf (/etc/asterisk/sip.conf)

;
; SIP Configuration example for Asterisk
;
; SIP dial strings
;-----------------------------------------------------------
; In the dialplan (extensions.conf) you can use several
; syntaxes for dialing SIP devices.
;        SIP/devicename
;        SIP/username@domain   (SIP uri)
;        SIP/username[:password[:md5secret[:authname[:transport]]]]@host[:port]
;        SIP/devicename/extension
.
.
.
canreinvite=yes

[general]
context=default                 ; Default context for incoming calls
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
udpbindaddr=all      ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
                ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
.
.
.
tcpenable=no                    ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0             ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
                                ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
.
.
.
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
.
.
.
[basic-options](!)                ; a template
        dtmfmode=rfc2833
        context=from-office
        type=friend
[natted-phone](!,basic-options)   ; another template inheriting basic-options
        nat=yes
        directmedia=no
        host=dynamic
[public-phone](!,basic-options)   ; another template inheriting basic-options
        nat=no
        directmedia=yes
[my-codecs](!)                    ; a template for my preferred codecs
        disallow=all
        allow=ilbc
        allow=g729
        allow=gsm
        allow=g723
        allow=ulaw
[ulaw-phone](!)                   ; and another one for ulaw-only
        disallow=all
        allow=ulaw
.
.
.
[101]
    username=101
    type=friend
    secret=change101
    host=dynamic
    nat=yes
    qualify=yes
    allow=all
    callerid=101

[102]
    username=102
    type=friend
    secret=change102
    host=dynamic
    nat=yes
    qualify=yes
    allow=all
    callerid=102

[103]
    username=103
    type=friend
    secret=change103
    host=dynamic
    nat=yes
    quality=yes
    allow=all
    callerid=103


b) extesions.conf (/etc/asterisk/extensions.conf)

; extensions.conf - the Asterisk dial plan
;
; Static extension configuration file, used by
; the pbx_config module. This is where you configure all your
; inbound and outbound calls in Asterisk.
.
.
.
[general] 
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified.  Remember that all comments
; made in the file will be lost when that happens.                   
static=yes
writeprotect=no
clearglobalvars=no
.
.
.
[globals]
CONSOLE=Console/dsp
IAXINFO=guest
TRUNK=DAHDI/G2

.
.
.
[local]
; Master context for local, toll-free, and iaxtel calls only
include => default
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
include => parkedcalls
.
.
.
[default]
include => sip
.
.
.
[sip]
exten => _1XX,1,Dial(SIP/${EXTEN},30)
exten => _1XX,1,Hangup()
exten => _1XX,102,Busy
exten => s,1,Answer()
exten => s,n,Echo()


2. X-lite를 이용한 client 프로그램

사용환경

PC1 (192.168.0.88)
CPU : Intel Core (TM)2 Duo T8300 2.4GHz
RAM : 2GB
HDD : 250GB
OS : XP SP3
call num : 102

PC2 (192.168.0.42)
CPU : Intel(R) Genuine  U7300@1.3GHz
RAM : 4GB
HDD : 250GB
OS : windows 7
call num : 101

Asterisk SIP server (192.168.0.137)
CPU : AMD athlon(tm) XP 2500+
RAM : 512MB
HDD : 80GB
OS : fedora 12 2.6.32.11-99.fc12.i686.PAE


a) X-lite 다운로드 후 설치 한다.
http://www.counterpath.com/x-lite.html

b) X-lite 설정

마우스 우클릭 후
SIP Account Settings로 들어간다.





















account tab에 User number(call number)와 server의 IP address를 등록한다.

 




Voicemail tab에서 check for voice mail부분을 체크해제 한다.






Topology tab에서 use specified server에 server IP address를 입력한다.









이와 마찬가지로 PC2에서도 sip.conf에 등록했던 user number(call num)로 똑같이 해준다.
(PC2 call num = 101)



c) X-lite의 동작 확인



위와 같이 102에서 101로 전화 연결이 된것을 볼수 있다.

by ARuKe 2010. 5. 20. 18:03
설치환경
CPU : AMD athlon(tm) XP 2500+
RAM : 512MB
HDD : 80GB

1. fedora 12를 다운 받는다.

fedora-12-x86-DVD.iso
다운로드 : http://fedoraproject.org/ko/get-fedora

2. 설치 후 커널을 최신 버전으로 업데이트 해준다.

#yum -y upgrade


업데이트된 커널 확인

#uname -r

2.6.32.11-99.fc12.i686.PAE

3. 보안&방화벽 해제하기

a) 보안 해제를 하기 위해 selinux파일의 SELINUX을 disabled 시킨다.

#vi /etc/sysconfig/selinux

.
.

SELINUX=disabled

b) 방화벽 비활성화는 시스템-관리-방화벽에서 해준다.

4. asterisk를 사용하기 위한 package 설치

#yum -y install kernel-devel

a) package가 설치되어있는지 확인하기

#rpm -q biso
#rpm -q bison-devel
#rpm -q ncurses
#rpm -q ncurses-devel
#rpm -q zlib
#rpm -q zlib-devel
#rpm -q openssl
#rpm -q openssl-devel
#rpm -q gnutls-devel
#rpm -q gcc
#rpm -q gcc-c++

b) package설치하기

#yum install bison
#yum install bison-devel
#yum install ncurses
#yum install ncurses-devel
#yum install zlib
#yum install zlib-devel
#yum install openssl
#yum install openssl-devel
#yum install gnutls-devel
#yum install gcc
#yum install gcc-c++

이렇게 함으로서 SIP서버 구축을 위한 Asterisk 설치 하기전 준비가 완료 되었다.


참조 사이트 : http://www.asteriskguru.com/tutorials/asterisk_installation_compilation_fedora.html






by ARuKe 2010. 5. 19. 20:57
| 1 |