Artigos‎ > ‎VoIP‎ > ‎

Assistente para configurar ATA

 

Wizard para configurar ATA.

Acesse o Link: http://voxilla.com/tools/device-configuration-wizard/


Ajuste do RTP (importante):

link: http://www.mehrdust.com/archives/linksys-spa3102-with-asterisk

VERY IMPORTANT: Before you do anything else, go to the SIP tab. Look under RTP Parameters and check the RTP Packet Size. Linksys has set this to 0.030 by default, which is not correct for use on ulaw (G711u codec) connections. Change it to 0.020 instead (or 0.02 on older Sipura devices). If you don’t do this, you may experience strange problems with “choppiness” or random clicks on some calls but not others, and you may also experience problems when playing Asterisk sound files. By the way, this applies to all Linksys/Sipura adapters, not just the SPA-3000/3102.

PSTN Line tab

Sip settings: Just make sure the SIP Port is set to port 5061

Dial plans: Under Dial Plans it’s important not to change the default (xx.) on any except Dial Plan 2. I put it very simple to go to my inbound so FreePBX takes care of my calls: (S0<:1234567890>) or in case you don’t want to worry about DID then you can set it to this: (S0<:s>)

link: http://www.infoworld.com/d/data-management/your-pstn-and-you-linksys-spa-3102-and-asterisk-840

The Asterisk server is set under Proxy, and the username/password is referenced in the SPA-3102 PSTN Line Subscriber Info section. You will show a failed registration on the PSTN line, but as long as you've flagged Make Call without Reg and Ans Call without Reg as Yes, it will work. I'd rather have this setup than cluttered extensions on Asterisk that aren't used.

Generating DIDs from the PSTN for inbound routes on Asterisk is non-obvious. This is handled as a dialplan within the SPA-3102. For instance, (S0<:4155551212) as Dial Plan 2 under PSTN Line with a corresponding flag to use DP2 under PSTN-to-VoIP Setup will generate a 4155551212 DID to Asterisk for an incoming call. Obviously, you can put whatever you want in that field.


A configuração do asterisk para utilizar sipura SPA pode ser com o exemplo: 

http://forum.voxilla.com/threads/using-a-linksys-sipura-spa-with-asterisk.13527/


Asterisk:http://voip-info.org/tiki-index.php?page=Asterisk



extensions.conf
 
; In the the globals section, we define some constants which we can use later
; to make things neater and more efficient.
[globals]
;
;
; First, our two Sipura lines, which we will call extensions 2201 and 2202 in this 
; example. Any extension number could be used as long as we are consistent across 
; all .conf files as well as in the SPA-2000 configuration screens.
; SIP/ tells asterisk that we are referring to a SIP device or channel.
;
; line 1
;
PHONES1=SIP/2201
PHONES1VM=2201
;
; line 2
;
PHONES2=SIP/2202
PHONES2VM=2202
;
; Second, we need to enter our login for VoicePulse Connect! In your order 
; confirmation email from VoicePulse, you should have received information
; that looks something like this:
; Login: 1234567890
;
; So we want to put that login information here:
VOICEPULSEID=1234567890
;
;
; Next, we'll enter our number for Free World Dialup
;
FWDUSERID=94896
;
;
; Now we need to provide our outgoing caller ID information, which can be 
; set to whatever we like. VoicePulse Connect! will send it exactly as we specify 
; here. So make sure it looks right to you!
; 
MYNAME=Dorian Gray
MYPHONE=2125551212
;
;
;
; We'll include a simple macro that takes an extension as its argument,
; connects the caller to the voice mailbox of that extension, and then hangs up after
; playing a couple short messages.
;
[macro-vmessage]
exten => s,1,VoiceMail2(u${ARG1})
exten => s,2,Playback(groovy)
exten => s,3,Playback(goodbye)
exten => s,4,Hangup
;
;
; And also a fairly simple macro for dialing out using VoicePulse Connect!
; (note how we re-use the globally defined constants. slick, eh?).
;
[macro-dialvpconnect]
;
; Here we can set caller ID number and name, if we like
;
exten => s,1,SetCallerID(${MYPHONE})
exten => s,2,SetCIDName(${MYNAME})
;
; Here is where we dial out through VoicePulse Connect! and use a couple
; arguments that must be passed to the macro: ARG1 will be the number we're 
; trying to dial (e.g. 12125551212) and ARG2 will be how many seconds to try
; before giving up, e.g. 60
;
exten => s,3,Dial(IAX2/${VOICEPULSEID}@voicepulse/${ARG1},${ARG2},Tr)
exten => s,4,Hangup
;
;
;
; The dialout context can be included in contexts which should have access
; to an outside line. Normally we would include many different outgoing contexts, 
; but for simplicity, we mention only "vpconnect-forced" and "fwd-out" in this case.
;
[dialout]
;
; if someone dials a "6" in front of their number, send out via VoicePulse Connect!
;
include => vpconnect-forced
;
; If someone dials a "7" in front of their number, send to Free World Dialup
;
include => fwd-forced
;
;
; It's "forced" because we require a "6" to be dialed to match this context.
; In fact, it would certainly be possible to set up our dialplan without the
; "forced" leading "6" or "7" so that numbers of a certain length 
; (e.g. 5 or 6 digits) dialed out to FWD, and numbers starting with a "1" or
; even specific area codes dialed out to VoicePulse or another provider.
;
[vpconnect-forced]
;
; Dial out on VoicePulse Connect! and wait for 70 seconds for a connect. 
; If no connection is made in 70 seconds, jump to the "fastbusy" macro.
; Note that ${EXTEN:1} will be passed as ARG1 of our macro, i.e.
; strip the leading "6" and pass the rest of the number. "70" will
; then be ARG2 of the macro, the dial timeout in #seconds.
;
exten => _61XXXXXXXXXX,1,Macro(dialvpconnect,${EXTEN:1},70)
;
;
[fwd-forced]
; Check to see if the called number starts with a "7" and
; if so, set the call parameters and bounce the call to the
; Free World Dialup SIP server.
;
; NOTE: Calls to unknown users will result in "invalid extension"
; message being played.
;
exten => _7.,1,SetCallerID(${FWDUSERID})
exten => _7.,2,SetCIDName(${MYNAME})
exten => _7.,3,Dial(SIP/${EXTEN:1}@fwd)
exten => _7.,4,Playback(invalid)
exten => _7.,5,Hangup
;
;
; This is the home context. Any phone or device that has access to this
; context will be able to make outgoing calls.
;
[home]
;
; First, we definitely want to include the dialout context,
; so we'll be able to dial out!
;
include => dialout
;
; Next, add an extension for voicemail 
; now if we dial 8, we can check voicemail.
;
exten => 8,1,VoiceMailMain2
exten => 8,2,Hangup
;
;
; Add some more extensions for the two Sipura lines  now
; we'll be able to call one line from the other.
; And if no one answers, it will go to the mailbox for that line.
;
; Sipura line 1
;
exten => 2201,1,Dial(${PHONES1},20,Ttm)
exten => 2201,2,Macro(vmessage,${PHONES1VM})
exten => 2201,3,Hangup
;
;
; Sipura line 2
;
exten => 2202,1,Dial(${PHONES2},20,Ttm)
exten => 2202,2,Macro(vmessage,${PHONES2VM})
exten => 2202,3,Hangup
;
;
; NOTE: it will be important to remember the name of the context
; "from-sip"  later, we will need to use it in sip.conf
;
[from-sip]
; To receive calls inbound from FWD, we set the extension
; to our FWD user ID, in this case 94896
;
; As currently written, incoming calls from FWD will ring
; only line 1 of the SPA-2000. However, changing the "Dial"
; directive to something like this:
; Dial(${PHONES1}&${PHONES2},15,Ttm)
; would cause both lines of the Sipura device to ring
;
exten => 94896,1,Dial(${PHONES1},15,Ttm)
exten => 94896,2,Voicemail2(u${PHONES1VM})
exten => 94896,3,Hangup 

iax.conf
 
; First, we need to configure what codecs we will use. That is, how much 
; bandwidth and CPU power do we want to use vs. what kind of sound quality 
; we'd like to have. iLBC (internet Low Bitrate 
; Codec) is a free, low-bandwidth 
; codec of very high quality, and VoicePulse Connect! supports it  so let's use it.
;
; You can fine tune codecs here using "allow" and "disallow" clauses
; with specific codecs. Use "all" to represent all formats.
;
disallow=all ; only use the codecs we specify
disallow=g723.1 ; Hmmm... Proprietary, don't use it...
disallow=lpc10 ; Icky sound quality... Mr. Roboto.
;
; Asterisk doesn't pay attention to the order in which we list our
; codecs, generally choosing the lowest bandwidth consuming codec
; available. 
;
allow=ilbc
allow=gsm ; Always allow GSM, it's cool :)
allow=ima-adpcm ; aka g726, another decent low bandwidth user
;
;
; Next, we define how to connect to VoicePulse.
; The name of the context "voicepulse" here has to exactly match the
; @voicepulse in our dialing macro from extensions.conf
;
[voicepulse]
type=friend
;
; Context "foo" does not actually exist in our dialplan, but that's ok.
; If we had also registered a DID (Direct Inward Dialing, A.K.A. an incoming
; phone number) with VoicePulse, then it is important to define what happens
; when someone calls that number in "extensions.conf."
context = foo
; Your VoicePulse Connect! order confirmation email should
; have included a line such as:
; Password: yyyyyyyyyy
; so set it as the secret here:
secret=yyyyyyyyyy
auth=md5
host=gw5.voicepulse.com
;
; If we want to force the use of ILBC, the following is necessary as Asterisk
; will otherwise choose GSM first.
disallow=gsm
allow=ilbc
; denying iaxtel server ip addresses prevents cross-registration issues
deny=216.207.245.47/255.255.255.255
deny=69.73.19.178/255.255.255.255 

sip.conf
 
[general]
;
;
; here we set the context to "from-sip" exactly as in extensions.conf,
; so that incoming calls from FWD can be sent to the Sipura device.
;
context = from-sip
;
; As in iax.conf, specify what codecs we will allow
disallow=all ; Disallow all codecs
allow=gsmallow=ilbc
allow=ima-adpcm
allow=ulaw
allow=alaw 
;
;
; Here we register our FWD phone number so that when someone calls it,
; we'll be able to receive that incoming call over SIP.
;
register=94896: myfwdpassword@fwd.pulver.com/94896
;
;
; Next we set up some more info for FWD  this part is what will
; allow us to make outgoing calls over SIP using FWD.
;
[fwd]
type=friend
secret=myfwdpassword
username=94896
host=fwd.pulver.com
dtmfmode=inband
;
;
; Here is where we define those two extensions that were mentioned earlier,
; and attach them to the two lines on the SPA-2000
;
; line 1
;
[2201]
type=friend
;
; Although the SPA-2000 can be set to a static IP address, its registration will
; fail unless we set host as dynamic.
host=dynamic
;
; Here, the context is very important! We want to allow access 
; to "home", which is where all outgoing calls are made in 
; our dialplan.
context=home
;
; This password must match the one we later set in the Sipura device
secret=mysecret2201
;
; This is the caller id that will show up if we call line2 from line1.
callerid="SPA1" <2201>
;
; If the voice mailbox specified here has new messages,
; this line will have a stuttered dialtone when we pick up the phone.
mailbox=2201
;
; Note: dtmfmode=inband will only work with g711, not gsm!
; On the SPA-2000 configuration screen, rfc2833 is called "AVT."
; This does not need to be changed unless Asterisk is having
; trouble recognizing keypad input from our telephone.
dtmfmode=rfc2833
;
; Since our SPA-2000 is only talking locally to our asterisk machine,
; special consideration for NAT (Network Address Translation) is not needed.
nat=0
;
; The configuration of the second line is very similar to the first.
; line 2
[2202]type=friend
host=dynamic
context=home
secret=mysecret2202
callerid="SPA2" <2202>
mailbox=2202
dtmfmode=rfc2833
nat=0 

voicemail.conf
 
[general]
;
; We want to save voicemails as gsm format, it's nice and small.
;
format=gsm
;
; Should the email contain the voicemail as an attachment
;
attach=yes
;
;
; Here again is that "from-sip" context, which in this case will
; allow voicemail from incoming FWD calls to be associated with
; our SPA-2000 lines.
;
[from-sip]
;
; Each mailbox is listed in the form 
; <mailbox>=<password>,<name>,<email>,<pager_email>
; if the e-mail is specified, a message will be sent when a message is
; received, to the given mailbox. If pager is specified, a message will
; be sent there as well.
;
2201 => 4444,SPA_line1, me@example.com 
2202 => 5555,Arbitrary_Name, roommate@example.com, roommates_pager@example.com



Comments