[Asterisk-Users] Yoda VG-400 and Asterisk Settings
JP Carballo
jplc at nf2x.com
Wed Aug 10 01:54:18 MST 2005
First, the Asterisk settings:
----- sip.conf -----
[general]
port=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
context=default ; Default context for incoming calls
disallow=all ; First disallow all codecs; Set order
allow=ulaw ; also known as g.711 PCMU; allow codecs in order
of preference
allow=alaw ; also known as g.711 PCMA
[201]
type=friend
username=201user
secret=201pass
dtmfmode=inband
context=sip
[202]
type=friend
username=202user
secret=202pass
dtmfmode=inband
context=sip
[203]
type=friend
username=203user
secret=203pass
dtmfmode=inband
context=sip
[204]
type=friend
username=204user
secret=204pass
dtmfmode=inband
context=sip
----- extensions.conf -----
[general]
static=yes
writeprotect=no
[default]
include => sip
[sip]
; When one dials 2011234567, * will wait call port 0 on the VG-400, wait
2 seconds for a dialtone and dial 1234567
; Handy when say, port 0 has the only line with long distance enabled.
exten => _201.,1,Dial(SIP/201,20,A(silence/2)D(${LDPrefix}${EXTEN:3}))
exten => _201.,2,Hangup
; This is to allow dialing 201 to get a dial tone
exten => 201,1,Dial(SIP/201,20) ; Port 0
exten => 201,2,Hangup
exten => 202,1,Dial(SIP/202,20) ; Port 1
exten => 202,2,Hangup
exten => 203,1,Dial(SIP/203,20) ; Port 2
exten => 203,2,Hangup
exten => 204,1,Dial(SIP/204,20) ; Port 3
exten => 204,2,Hangup
----- VG-400 -----
Note: This presumes you have already configured the network settings on
your VG-400. Either browse through to the enabled webserver or telnet to
it. Otherwise, if you're in a hurry to set the unit up before getting it
online, use the included RS-232 cable to connect to the console.
The minute you attach the PSTN lines to the ports, you can call in, wait
for a dial tone and dial 201/202/203/204 to reach any of the other lines.
Ports 0-3 have already been factory preset.
Console>atpm alist
Address Hunt Min Max Prefix Prefix
Entry Grp_Id Digits Digits strip Address
201 1 1 3 3 None
202 2 1 3 3 None
203 3 1 3 3 None
204 4 1 3 3 None
OK
To display the destination table type:
Console>atpm dlist
Dest id Mode Destination
-------------------------------------------------------
1 Local PORT = 0
2 Local PORT = 1
3 Local PORT = 2
4 Local PORT = 3
OK
Now to add the asterisk server to the destination table:
First, request access to the atpm database. When you do, all calls are
disconnected and any incoming calls will get congestion.
Console>atpm req
OK
Then use the command:
Console>atpm dadd
atpm dadd <dest_id> port <tcid>
atpm dadd <dest_id> dns <hostname/port>
atpm dadd <dest_id> sip <dest ip/port>
Lets give it an ID of 10
Console>atpm dadd 10 sip 111.222.333.444
OK
Console>atpm dlist
Dest id Mode Destination
-------------------------------------------------------
1 Local PORT = 0
2 Local PORT = 1
3 Local PORT = 2
4 Local PORT = 3
10 SIP Dest = 111.222.333.444/5060
OK
To show the hunt group table:
Console>atpm hlist
ID Type # Member ids
----------------------------------------------------------------------------
1 2 1 1
2 2 1 2
3 2 1 3
4 2 1 4
OK
Console>atpm hadd
atpm hadd <hunt_group_id> <hunt_type> <member1_id> <member2_id>....
Console>atpm hadd 10 2 10
OK
Console>atpm hlist
ID Type # Member ids
----------------------------------------------------------------------------
1 2 1 1
2 2 1 2
3 2 1 3
4 2 1 4
10 2 1 10
OK
Now to add a prefix to allow us to route calls to *
Console>Console>atpm aadd
atpm aadd <tele_number> <min_digits> <max_digits> <hunt_group_id>
<prefix_strip_len> <prefix_number>
Console>atpm aadd 011 6 14 10 3
OK
Console>atpm alist
Address Hunt Min Max Prefix Prefix
Entry Grp_Id Digits Digits strip Address
011 10 6 14 3 None
201 1 1 3 3 None
202 2 1 3 3 None
203 3 1 3 3 None
204 4 1 3 3 None
OK
Looks good. Let the VG-400 know you're done editing...
Console>atpm done
OK
And save the config to NVRAM.
Console>atpm store
OK
Now to configure SIP:
Console>set sip dns_ip 11.22.33.44
OK
Console>set sip reg add 201 500 111.222.333.444 5060 201user 201pass
OK
Console>set sip reg add 202 500 111.222.333.444 5060 202user 202pass
OK
Console>set sip reg add 203 500 111.222.333.444 5060 203user 203pass
OK
Console>set sip reg add 204 500 111.222.333.444 5060 204user 204pass
OK
111.222.333.444 is your * server IP
Console>set port 0 cid number 201
OK
Console>set port 0 cid name FXO1
OK
Console>set port 0 cid number 202
OK
Console>set port 0 cid name FXO2
OK
Console>set port 0 cid number 203
OK
Console>set port 0 cid name FXO3
OK
Console>set port 0 cid number 204
OK
Console>set port 0 cid name FXO4
OK
Console>set sip auto_reg on
OK
Lets delete the default codec order on ports 0-3
Console>set port all prof_bit all 0
OK
And add/prioritize codec 6 (G.711 PCMU)
Console>set port all prof_bit 6 1
OK
Disable DTMF Relay for codec G.711
Console>set coding 6 dtmf_relay off
OK
Then tell ports 0-3 to use G.711
Console>set port all voice_prof 6
OK
Console>set port all rxgain -3
OK
Activate the current configuration...
Console>config activate
OK
Then store all of the changes in NVRAM
Console>config store
Restart the unit...
Console>net reset
============================== WARNING ==============================
* Restarting the system will hang up all telephone connections *
* and all the configuration settings will lose. *
* Be certain all the configuration settings have been saved. *
=======================================================================
Do you want to restart the system now (y/n)? [n] y
Upon rebooting...check registration by typing:
Console>show sip
SIP Addr Configuration:
SIP Signaling port = 5060
RTP Voice port = 2070
reg_num: 201
Registrar_ID 1: Registered
registrar: 111.222.333.444 5060 expires: 500
name: 201user passwd: 201pass
reg_num: 202
Registrar_ID 2: Registered
registrar: 111.222.333.444 5060 expires: 500
name: 202user passwd: 202pass
reg_num: 203
Registrar_ID 3: Registered
registrar: 111.222.333.444 5060 expires: 500
name: 203user passwd: 203pass
reg_num: 204
Registrar_ID 4: Registered
registrar: 111.222.333.444 5060 expires: 500
name: 204user passwd: 204pass
201user201pass
202user202pass
203user203pass
204user204pass
Domain name server = 11.22.33.44
Info switch is off
nat_call is off
auto_reg is on
outboundproxy : None
stunserver : None
stun_call is off
alt_registrar : None
allow_num :
None.
Console>
Call in from 202/203/204, dial 0112011234567 to route the call to *,
(optionally do whatever you want) then have * pass 1234567 to 201...
--
JP Carballo
http://www.netfone2x.com
Bringing the world closer.
It might look like I'm doing nothing, but at the cellular level,
I'm really quite busy.
More information about the asterisk-users
mailing list