Monthly Archives: January 2012

AddPac (AP-GS1002) + ASTERISK (INBOUND & OUTBOUND CALL)


Berikut cara konfigurasi addpac seri AP-GS1002 dengan  asterik (INBOUND & OUBOUND)
  1. IP : 192.168.10.1 (LAN1)
  2. Username  : root , Password : router
  3. Lakukan koneksi peer to peer dari laptop ket port addpack eth1, set ip address laptop dengan ip 192.168.10.2
  4. Set IP WAN (LAN0) sehingga bisa di remote via LAN or WAN
  5. Set Protokol SIP(Basic -> Server SIP) -> Apply dan Save (tombol sebelah kanan Pojok)
  6. Server SIP Server (Isi dengan IP asterisk) -> Basic -> SIP SERVER -> Apply -> Save
  7. Set ext SIP Server (Basic-> Sip Registration) -> Apply -> Save
  8. Code ( Basic-> DTMF Codec) -> Apply -> Save
  9. Setting Inbound maka Set Hotline Number -> Apply -> Save Configuras
  10. Konfig asterisk
    11. Konfig asterisk
    extensions.conf
    [ecentrix-agents]
    exten => _X.,1,Dial(SIP/${EXTEN}@192.168.0.227,${DIAL_TIMEOUT},tT${DIAL_OPTIONS})
    exten => _X.,n,Hangup();inbound call
    [addpac]
    exten => 103,1,Ringing
    exten => 103,n,Answer
    exten => 103,n,Dial(SIP/4002,,tT)
    exten => 103,n,Hangup()sip.conf
    [103]
    context=addpac
    type=friend
    host=192.168.0.227
    ;host=dynamic
    disallow=all
    allow=gsm ; GSM consumes far less bandwidth than ulaw
    allow=ulaw
    allow=alaw
    nat=no
    canreinvite=yes
    qualify=yesDETAIL GAMBAR

LOG INBOUND
[root@serverrepo asterisk]# asterisk -r
Asterisk 1.8.8.1, Copyright (C) 1999 – 2011 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
=========================================================================
Connected to Asterisk 1.8.8.1 currently running on serverrepo (pid = 3182)
Verbosity is at least 3
== Using SIP RTP CoS mark 5
— Executing [103@addpac:1] Ringing(“SIP/103-00000034”, “”) in new stack
— Executing [103@addpac:2] Answer(“SIP/103-00000034”, “”) in new stack
[Jan 1 17:49:33] NOTICE[3308]: chan_sip.c:24431 handle_request_register: Registration from ‘sip:gsm2@192.168.0.225’ failed for ‘192.168.0.227:5060’ – No matching peer found
— Executing [103@addpac:3] Dial(“SIP/103-00000034”, “SIP/4002,,tT”) in new stack
== Using SIP RTP CoS mark 5
— Called SIP/4002
— SIP/4002-00000035 is ringing
— Executing [103@addpac:4] Hangup(“SIP/103-00000034”, “”) in new stack
== Spawn extension (addpac, 103, 4) exited non-zero on ‘SIP/103-00000034’
serverrepo*CLI>
Disconnected from Asterisk server

LOG OUTBOUND
== Using SIP RTP CoS mark 5
— Executing [081287264002@ecentrix-agents:1] Dial(“SIP/4002-00000038”, “SIP/081287264002@192.168.0.227,,tT”) in new stack
== Using SIP RTP CoS mark 5
— Called SIP/081287264002@192.168.0.227
— SIP/192.168.0.227-00000039 is making progress passing it to SIP/4002-00000038
— SIP/192.168.0.227-00000039 answered SIP/4002-00000038

Remote via telnet ke Addpac

Welcome, APOS(tm) Kernel Version 8.51.007.
Copyright (c) 1999-2010 AddPac Technology Co., Ltd.
User Access Verification

Login: root
Password: router

nec> enable

nec# show running-config
Current configuration:
!
version 8.51.007
!
hostname nec
!
username root password router administrator
username guest password guest user
!
!
script ntpdate default
resynchronize 1 0
server ip 192.168.0.7
server ip 192.168.0.6
!
interface Loopback0
ip address 127.0.0.1 255.0.0.0
!
interface FastEthernet0/0
ip address 192.168.0.227 255.255.255.0
speed auto
no qos-control
!
interface FastEthernet0/1
ip address 192.168.10.1 255.255.255.0
speed auto
no qos-control
!
ip route 0.0.0.0 0.0.0.0 192.168.0.254 10
!
!
!
!
http server
!
logging command
logging event 4-warning
logging on
!
!
!
!
! VoIP configuration.
!

!
! Voice service voip configuration.
!
voice service voip
protocol sip
dtmf-relay rfc-2833
fax protocol t38 redundancy 0
fax rate 9600
h323 call start fast
h323 call tunnel enable
busyout monitor sip-server
busyout monitor voip-interface
no call-barring unconfigured-ip-address
no voip-inbound-call-barring enable
!
!
! Voice port configuration.
!
! GSM
voice-port 0/0
connection plar 103
caller-id enable
!
!
! GSM
voice-port 0/1
connection plar 103
caller-id enable
!
!
! FXS
voice-port 0/2
caller-id enable
!
!
! FXS
voice-port 0/3
caller-id enable
!
!
!
!
! service port group configuration.
!
!
! Pots peer configuration.
!
!
dial-peer voice 1002 pots
destination-pattern 1002
port 0/2
user-password VcSh0SpD2/f05ZYBlDQRoA== encrypt
display-name 1002
!
dial-peer voice 1003 pots
destination-pattern 1003
port 0/3
user-password G8QY8MMTwYO4LWKmJW6cDQ== encrypt
display-name 1003
!
!
!
! Voip peer configuration.
!
dial-peer voice 0 voip
destination-pattern T
session target ip 192.168.0.225
voice-class codec 1
no vad
dtmf-relay h245-alphanumeric
!
dial-peer voice 10100 voip
destination-pattern 103 
session target ip 192.168.0.225 5060
session protocol sip
voice-class codec 0
no vad
dtmf-relay rtp-2833
translate-outgoing called-number 10100
!
!
!
!
!
!
gatekeeper
!
!
! Gateway configuration.
!
gateway
h323-id voip.192.168.0.227
no ignore-msg-from-other-gk
!
!
! Codec classes configuration.
!
voice class codec 0
codec preference 1 g711alaw
codec preference 2 g711ulaw
!
!
!
! Translation Rule configuration.
!
translation-rule 10100
rule 0 103 %01%99
!
!
!
! SIP UA configuration.
!
sip-ua
user-register
sip-server 192.168.0.142 5060 126
register e164
!
!
! Tones
!
!
!
!
! SMTP sendmail configuration
!
sms-delivery
!
!
!
line console
!
line vty
!
gsm dev-restart-by-unreg 300
!
gsm 0/0
sms-language utf8
!
gsm 0/1
sms-language utf8
!
end

CARA MELAKUKAN DEBUG VIA CONSOLE (TELNET)
ROUTER# debug voip call
ROUTER# debug voip sip
ROUTER# terminal monitor

dan test call inbound and outbound

contoh hasil debug

39 <SIP 647> : Receive 401 Unauthorized
40 <SIP 647> : Transaction (647 REGISTER) completed
41 <SIP 0> : No opaque in authentication
42 <SIP 648> : WriteREGISTER
43 <SIP 0> : Adding authentication information
44 <SIP 648> : Send REGISTER Request

Sending SIP PDU to ( 192.168.0.142:5060 ) from 5060
REGISTER sip:192.168.0.142 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.227:5060;branch=z9hG4bK594ff100a4648
From: <sip:gsm1@192.168.0.142>;tag=594ff100a4
To: sip:gsm1@192.168.0.142
Call-ID: 59451e4f-e91e-f167-8000-0002a4088b5e@192.168.0.227
CSeq: 648 REGISTER
Date: Tue, 24 Jan 2012 07:32:58 GMT
User-Agent: AddPac SIP Gateway
Authorization: Digest username=”gsm1″, realm=”192.168.0.142″, nonce=”70d44fa8″, uri=”sip:192.168.0.142″, response=”44da935598bece481a480b6bbdb129be”, algorithm=MD5
Contact: <sip:gsm1@192.168.0.227>;expires=60
Expires: 60
Content-Length: 0
Max-Forwards: 70

Received SIP PDU from ( 192.168.0.142:5060 )
SIP/2.0 403 Forbidden (Bad auth)
Via: SIP/2.0/UDP 192.168.0.227:5060;branch=z9hG4bK594ff100a4648;received=192.168.0.227;rport=5060
From: <sip:gsm1@192.168.0.142>;tag=594ff100a4
To: sip:gsm1@192.168.0.142;tag=as5dc96df1
Call-ID: 59451e4f-e91e-f167-8000-0002a4088b5e@192.168.0.227
CSeq: 648 REGISTER
Server: Asterisk PBX 1.8.8.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

UNTUK STOP DEBUG

ROUTER# no debug all 

Contact:
Mustafa Tambunan

moses.spaceku@yahoo.com

gozigomilis@gmail.com

Advertisements

Register RED5Phone To ASterisk Server


Berikut adalah register red5phone ke sip asterisk server

Capture Testing:

sip.conf

[general]
context=default ; Default context for incoming calls

allowoverlap=no ; Disable overlap dialing support. (Default is yes)
realm=192.168.0.225 ; Realm for digest authentication
bindport=5060
udpbindaddr=0.0.0.0 ; 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

callevents=yes ; generate manager events when sip ua
; performs events (e.g. hold)
;nat=yes

[4002]
context=ecentrix-agents
type=friend
username=4002
secret=4002
callerid=”4002″ <4002>
host=dynamic
disallow=all
allow=ulaw
allow=alaw
;qualify=yes
canreinvite=no
insecure=port,invite
dtmfmode=rfc2833
nat=no
call-limit=1
mailbox=4002

[4003]
context=ecentrix-agents
type=friend
username=4003
secret=4003
callerid=”4003″ <4003>
host=dynamic
disallow=all
allow=ulaw
allow=alaw
;qualify=yes
canreinvite=no
insecure=port,invite
dtmfmode=rfc2833
nat=no
call-limit=1
mailbox=4003

extensions.conf

[general]
static = yes
writeprotect = no
autofallthrough = yes
clearglobalvars = no
;==================================================================================
;Global Variable Definition
;==================================================================================
[globals]
FEATURES =
DIALOPTIONS =
RINGTIME = 20
FOLLOWMEOPTIONS =

[ecentrix-agents]
exten => _4XXX,1,Dial(SIP/${EXTEN},${DIAL_TIMEOUT},tT${DIAL_OPTIONS})
exten => _4XXX,n,Hangup()

Pastikan red5 anda sudah berlajan pada port 5080

===============================================================

Bagi yang jago java, red5 ini dimungkinkan untuk di modifikasi sehingga fungsi2nya lebih maksimal, seperti x , y dan z.

Thanks

8 FXO WELLGATE 26XX + ASTERISK


Berikut adalah config wellgate 8 FXO  yang dibungkan dengan asterisk

 

sip.conf

[general]
context=default ; Default context for incoming calls

allowoverlap=no ; Disable overlap dialing support. (Default is yes)
realm=192.168.0.225 ; Realm for digest authentication
bindport=5060
udpbindaddr=0.0.0.0 ; 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

callevents=yes ; generate manager events when sip ua
; performs events (e.g. hold)
;nat=yes

[5001]
context=ecentrix-agent
type=friend
username=5001
secret=5001
callerid=”5001″ <5001>
host=dynamic
disallow=all
allow=ulaw
allow=alaw
;qualify=yes
canreinvite=no
insecure=port,invite
dtmfmode=rfc2833
nat=no
call-limit=1
mailbox=5001

[5002]
context=ecentrix-agent
type=friend
username=5002
secret=5002
callerid=”5002″ <5002>
host=dynamic
disallow=all
allow=ulaw
allow=alaw
;qualify=yes
canreinvite=no
insecure=port,invite
dtmfmode=rfc2833
nat=no
call-limit=1
mailbox=5002

;===============QUINTUM SIP TRUNK 1001 untuk yang 4E1
[1000]
context=ecentrix-agent
type=friend
username=1000
secret=1000
host=dynamic ; This device needs to register
;host=192.168.0.16
;nat=no ; X-Lite is behind a NAT router
;canreinvite=no
;qualify=yes ; Typically set to NO if behind NAT
disallow=all
allow=gsm ; GSM consumes far less bandwidth than ulaw
allow=ulaw
allow=alaw
;allow=ilbc
insecure=invite

extensions.conf

[general]
static = yes
writeprotect = no
autofallthrough = yes
clearglobalvars = no
;==================================================================================
;Global Variable Definition
;==================================================================================
[globals]
FEATURES =
DIALOPTIONS =
RINGTIME = 20
FOLLOWMEOPTIONS =

[ecentrix-agents]

exten => _5XXX,1,Dial(SIP/${EXTEN},${DIAL_TIMEOUT},tT${DIAL_OPTIONS})
exten => _5XXX,n,Hangup

============================================================

Register 2 xlite dengan sip 5001, 5002

Hubungkan fxo port welgate ke line analog PSTN

Test Call Oubound

 

ASTERISK IAX + Quintum AF Series ( Case : Implementasi Menghubungkan antar kantor cabang )


User yang ada di kantor  Jakarta harus bisa memanggil extension user yang ada di bandung dan sebaliknya. Maka untuk menyelesaikan case ini digunakan IAX trunk. Iax trunk digunakan untuk menghubungkan dua asterisk server:)

Berkut adalah langkah-langkahnya:

  1. Config di server Bandung (192.168.0.60)
[root@iax2 asterisk]# cd /etc/asterisk/[root@iax2 asterisk]# mv iax.conf iax.conf-def

[root@iax2 asterisk]# vim /etc/asterisk/iax.conf[general]
bindport = 4569
bindaddr = 0.0.0.0
disallow=all
allow=ulaw
allow=alaw
allow=gsm
usecallerid=yes
callerid=asreceived
[iax_2]
type=friend
host=dynamic
trunk=yes
auth=md5,plaintext,rsa
username=iax_2
secret=iax_2
;callerid=asrecei
;callerid=”081234567890″ <1234567890>
qualify=yes
context=iax-trunksave:wq!!
[root@iax2 asterisk]# vim /etc/asterisk/extensions.conf
Ini akan menjadi inbound call ketika ada panggilan dari Jakarta dan akan berdering exte 4002
[iax-trunk]
exten => _X.,1,Dial(SIP/4002,,tT)
[root@iax2 asterisk]# vim /etc/asterisk/sip.conf[4002]
context=ecentrix-agents
type=friend
callerid=”4002″ <4002>
username=4002
secret=4002
host=dynamic                   ; This device needs to register
nat=no                        ; X-Lite is behind a NAT router
canreinvite=no                 ; Typically set to NO if behind NAT
disallow=all
allow=gsm                      ; GSM consumes far less bandwidth than ulaw
allow=ulaw
allow=alaw
allow=g729
  1. Server Jakarta (192.168.0.50)
[root@iax1 asterisk]# vim /etc/asterisk/iax.conf
[general]
bindport = 4569
bindaddr = 0.0.0.0
disallow=all
allow=ulaw
allow=alaw
allow=gsm
usecallerid=yes
callerid=asreceived
[root@iax1 asterisk]# vim /etc/asterisk/extensions.conf
;Daftarkan AIX TRUNK dari server bandung
[globals]
IAX_2 = iax2/iax_2:iax_2@192.168.0.60;outbound call dari server jakarta menuju serverbandung dengan prefix 9
[ecentrix-agents]
exten => _9X.,1,DIAL(${IAX_2}/${EXTEN:1},,tT)
[root@iax1 asterisk]# vim /etc/asterisk/sip.conf
[4001]
context=ecentrix-agents
type=friend
callerid=”4001″ <4001>
username=4001
secret=4001
host=dynamic                   ; This device needs to register
canreinvite=no                 ; Typically set to NO if behind NAT
disallow=all
allow=gsm                      ; GSM consumes far less bandwidth than ulaw
allow=ulaw
allow=alaw
allow=g729
mailbox=1234@default
qualify=yes
  1. Testing call dari Jakarta ke bandung via xlite or ip phone  (4001-> 4002). Tekan dari xlite 94002 maka akan terdengar nada ring di kantor Bandung pada extension 4002.

PERCOBAAN II

Saling dapat memanggil antar cabang Jakarta dan bandung.
Server Jakarta
Iax.conf
[general]
bindport = 4569
bindaddr = 0.0.0.0
disallow=all
allow=ulaw
allow=alaw
allow=gsm
usecallerid=yes
callerid=asreceived
;register => iax2:iax2@192.168.0.60 => INI TIDAK DIPERLUKAN
;register => iax_2:iax_2@192.168.0.60  => INI TIDAK DIPERLUKAN
[iax_1]
type=friend
host=dynamic
trunk=yes
auth=md5,plaintext,rsa
username=iax_1
secret=iax_1
;callerid=asrecei
;callerid=”081234567890″ <1234567890>
qualify=yes
context=iax-trunk
Register di server Bandung

extensions.conf
[globals]
IAX_1 = iax2/iax_1:iax_1@192.168.0.50
[iax-trunk]
exten => _X.,1,Dial(SIP/4002,,tT)
[ecentrix-agents]
exten => _9X.,1,DIAL(${IAX_1}/${EXTEN:1},,tT)
WARNING
Apabila muncul error pada saat menjalankan iax2 reload
“Unable to support trunking on peer ” without timing”
maka kemungkinan karena blm di reload
module reload chan_iax2.so
dan comment ; trunk = Yest pada iax.conf
saya tidak tau kenapa bisa begini:) heheheh
shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: