2008年4月25日 星期五

LEXIS30 + Asterisk

Target:
Receive incoming Skype call and transfer to a sip extension
Make outbound call to PSTN/cell phone/normal skype from sip extension



1.E1 card configuration

LEXIS30 side:
/etc/zaptel.conf
--------------------------------------------------------
###### E1 NETWORK side setting sample BEGIN
span=1,0,0,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16
###### E1 NETWORK side setting sample END
--------------------------------------------------------


/etc/asterisk/zapata.conf
--------------------------------------------------------
;;; E1 NETWORK SIDE setting sample BEGIN
context=frome1
group=1
signalling=pri_net
switchtype=euroisdn
channel=1-15,17-31
;;; E1 NETWORK SIDE setting sample END
--------------------------------------------------------

Asterisk side:
/etc/zaptel.conf
--------------------------------------------------------
###### E1 CPE side setting sample BEGIN
span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16
###### E1 CPE side setting sample END
--------------------------------------------------------


/etc/asterisk/zapata.conf
--------------------------------------------------------
;;; E1 CPE SIDE setting sample BEGIN
context=frome1
group=1
signalling=pri_cpe
switchtype=euroisdn
channel=>1-15,17-31
;;; E1 CPE SIDE setting sample END
--------------------------------------------------------


After Step 1, reboot both machnies , the light status should be blinking orange.
Connect E1 cable , both light should be GREEN

2. Configure Asterisk

Asterisk side:
/etc/asterisk/sip.conf
--------------------------------------------------------
[101]
type=friend
username=101
secret=101
context=frome1
host=dynamic
nat=yes
dtmfmode = rfc2833
disallow=all
allow=gsm
allow=ulaw
allow=alaw
--------------------------------------------------------

/etc/asterisk/extensions.conf
--------------------------------------------------------
[frome1]
exten=>s,1,Answer()
exten=>s,n,Background(vm-enter-num-to-call)
exten=>s,n,waitExten
exten=>s,n,Hangup

exten => _X.,1,Dial(SIP/${EXTEN})
exten => _9X.,1,Dial(Zap/g1/${EXTEN:1})
--------------------------------------------------------
note:under this configuration, when dialing 9XX from sip phone, it will dial XX in LEXIS30's phone book.


After these setting above, you are now able to receive incoming Skype call and make outbound call.

Test scenario
  1. Use a regular Skype (e.g.sarosa68) to call company ID of LEXIS30(e.g.sarosatest01), after hearing greeting, dial the sip extension no(e.g.101).The sip phone side will ring.
  2. Set an speed dial key on LEXIS30(e.g.10=>tpae01).On sip phone side, dial "910", it will call to tpae01 though LEXIS30

1 則留言:

Jeffrey Chou 提到...

Can't set sip extension number begin with "9", otherwise when incoming call wants transfer to 9xxx, it will be considered for dialing outbound call with speed dial key xxx.