[asterisk-users] How to use Sipura SPA3k POTS
line to dial Asterisk SIP phones?
Larry Alkoff
labradley at mindspring.com
Sat Nov 18 21:10:50 MST 2006
Doug tThis is my latest sip.conf and extensions.conf with your
sipuraxfs1 renamed to spa3k-pstn-in as it's called in my Sipura.
The non-Sipura parts have been mostly snipped.
I still have the problem that an incoming POTS call is swallowed up
after the 2nd ring.
Larry
root at kinda work # cat extensions.conf
-------------------------------------
[general]
;========
static=yes ; These two lines prevent the command-line interface
writeprotect=yes ; from overwriting the config file. Leave them here.
autofallthrough=yes ; terminate call with BUSY, CONGESTION or HANGUP
if runs out of things to do.
clearglobalvars=yes ; clear and reparse global variables extensions
or Asterisk reload
prioityjumping=no
; INRINGSDEV=SIP/sipurafxs1&SIP/grandstream406 ; Compton: ring analog
phones on spa3k fxs and selected SIP
INRINGSDEV=SIP/sipurafxs1&SIP/120 ; ring spa3k fxs and selected SIP phones
; INRINGSEXT=405 ; Compton: the extension to ring for incomming calls
INRINGSEXT=120 ; the extension to ring for incomming calls
; INRINGSDEV: is a list of the devices you want to ring when you use this
; variable in the dial statement.
; sipurafxs1 is the fxs side of the spa3k presently 405
; and I have one grandstream 200, at extension 406, named grandstream406.
; INRINGSEXT: The analog extension, fxs on the spa3k, is 405.
[sipura-in]
;==========
;exten => _3011414,1,macro(calllarry,s,1)
;; exten => _5123011414,1,macro(calllarry,s,1)
exten => s,1,macro(calllarry,s,1)
exten => s,2,Hangup()
[telasip-in]
;===========
exten => _512879677[67],1,macro(ringall,s,1)
exten => _879677[67],1,macro(ringall,s,1)
[macro-ringall] ; ring all stations
exten => s,1,Dial(SIP/120&SIP/121&SIP/122&SIP/124&SIP/125&SIP/126&SIP/127)
exten => s,2,hangup
[telasip-out]
;=============
;; WORKS CID 1415 for local calls from a SIP phone:
exten => _NXXXXXX,1,SetCallerID(512-301-1415)
exten => _NXXXXXX,2,Dial(SIP/1512${EXTEN}@telasip-gw)
;; WORKS CID 1416 for long distance calls without dialing 1:
exten => _NXXNXXXXXX,1,SetCallerID(512-301-1416)
exten => _NXXNXXXXXX,2,Dial(SIP/1${EXTEN}@telasip-gw)
;; WORKS CID 1417 for long distance calls with a dialed 1:
exten => _1NXXNXXXXXX,1,SetCallerID(512-301-1417)
exten => _1NXXNXXXXXX,2,Dial(SIP/1${EXTEN:1}@telasip-gw)
;;[local-lba]
;; ?? exten => _NXXXXXX,1,Dial(SIP/${EXTEN:1}@telasip-gw)
;; -----------------------------------------------
;; Sipura extensions.conf entries 11/6/06
;; from Voxilla SPA-3000 Configuration Wizard:
;; -----------------------------------------------
;; In extensions.conf (assume calls dialed as 7 digits or 800 calls
;; go out the PSTN line as well as 911 calls):
[pstn-out]
exten => spa3k-pots-dial,1,Ringing
exten => spa3k-pots-dial,2,Dial(SIP/spa3k-pots-dial,20,T)
exten => spa3k-pots-dial,3,Voicemail(uspa3k-pots-dial)
exten => spa3k-pots-dial,4,Hangup
exten => 911,1,Dial(SIP/911 at spa3k-pstn-out,60,)
exten => 911,2,Congestion
exten => _XXXXXXX,1,Dial(SIP/${EXTEN}@spa3k-pstn-out,60,)
exten => _XXXXXXX,2,Congestion
exten => _1800XXXXXXX,1,Dial(SIP/${EXTEN}@spa3k-pstn-out,60,)
exten => _1800XXXXXXX,2,Congestion
exten => _1888XXXXXXX,1,Dial(SIP/${EXTEN}@spa3k-pstn-out,60,)
exten => _1888XXXXXXX,2,Congestion
exten => _1877XXXXXXX,1,Dial(SIP/${EXTEN}@spa3k-pstn-out,60,)
exten => _1877XXXXXXX,2,Congestion
exten => _1866XXXXXXX,1,Dial(SIP/${EXTEN}@spa3k-pstn-out,60,)
exten => _1866XXXXXXX,2,Congestion
[from-pstn] ; from Doug Crompton
exten => s,1,SetGlobalVar(RingTimeout=35)
exten => s,2,NoOp("${CALLERID}")
; exten => s,3,Macro(stdexten,${INRINGSEXT},${INRINGSDEV},"") ; Compton
exten => s,3,Macro(stdexten,,${INRINGSDEV},"")
; The stdexten macro is just the standard one in sample extension file.
root at kinda work # cat sip.conf
-------------------------------
[general]
;========
port = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
allow=all ; Allow all codecs
;; context = default ; default context for incoming calls
context = bogon-calls ; Send SIP callers that we don't know about here
register => xxxxxxxx:xxxxxxx at gw3.telasip.com/5128796776
;
[telasip-gw] ; INBOUND sip trunk to Telasip:
;===============================================
context=telasip-in
type=friend
qualify=200 ; Mark peer unavailable if ping more than 200ms
host=gw3.telasip.com ; set in Sipura setup Line 1 Gateway
Accounts - currently GW1 and GW1 Auth ID = blank
; PSTN = gw0 (by default)
username=xxxxxxx
secret=xxxxxxxxxxxx
insecure=very
canreinvite=no
callerid="xxxxxxxxx" <xxxxxxxxxx>
nat=yes
; Next 2 lines 11/6/06 per Telasip instructions.
fromuser=xxxxxxx
sendrpid=yes
[
[120] ; Larry Office extension
;=======================
context=default
username=120
type=friend
qualify=yes
insecure=very
host=dynamic
canreinvite=no
nat=no
;; -----------------------------------------------
;; Sipura sip.conf entries 11/6/06
;; from Voxilla SPA-3000 Configuration Wizard:
;; -----------------------------------------------
[spa3k-pots-dial] ; OUTBOUND was 6664 POTS phone connected to
Sipura dials this, then pstn-spa3k:
; There is no connection made to Telasip
;====================================================================
type=friend
host=dynamic
context=pstn-out
secret=xxxxxxx
mailbox=spa3k-pots-dial
dtmfmode=rfc2833
disallow=all
allow=ulaw
[spa3k-pstn-out] ; OUTBOUND was pstn-spa3k
; If you're using Asterisk, this section goes into the Outgoing
Settings for your trunk.
;===================================================================================
type=peer
auth=md5
host=10.22.44.41
port=5061
secret=xxxxxxx
username=asterisk
fromuser=asterisk
dtmfmode=rfc2833
; If using Asterisk at home, change the below line to context=from-internal
context=pstn-out
insecure=very
[spa3k-pstn-in] ; INBOUND
;[was-sipurafxs1]
type=friend
regexten=405
username=sipurafxs1
secret=xxxxxxxx
; context=default
context=from-pstn
callerid="Larryy Alkoff" <405>
host=dynamic
nat=no
port=5061
canreinvite=no
disallow=all
allow=alaw
allow=ulaw
allow=gsm
allow=g723.1
mailbox=405 at default
dtmfmode=rfc2833
[was-spa3k-pstn-in] ; INBOUND-OLD was 6667 Pots-line-in from Sipura
; Sipura fxo (right hand port) from Doug
; Crompton [sipurafxo1]
; connect POTS line1 to line to CO
type=peer
username=spa3k-pstn-in
secret=xxxxx
canreinvite=no
context=from-pstn
host=dynamic
nat=no
port=5061
disallow=all
allow=alaw
allow=ulaw
allow=gsm
allow=g723.1
dtmfmode=inband
--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux
More information about the asterisk-users
mailing list