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
[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로 전화 연결이 된것을 볼수 있다.
RECENT COMMENT