View Single Post
Old 28th Mar 2019, 1:00 am   #7
rambo1152
Octode
 
rambo1152's Avatar
 
Join Date: May 2010
Location: Manchester, UK.
Posts: 1,392
Default Re: Using a slide Switch 2A to switch between POTS and FreePBX

OK. I am also using the same set up with RASPBX, SPA3000 (and a PAP-2).
You want Asterisk to do all the heavy lifting, not the ATA, so use my dialplan

(*xx.|#xx.|xx.)

which does precisely nothing other than transparently pass everything to Asterisk including strings commencing with * or #

The best thing I can do is to attach my config (zipped HTML file) There is nothing particularly confidential in it.

Believe it or not, it is possible to restore my config file to your ATA, but it would be more instructive if you inspected the various tabs and adapted it for your system.

A couple of things come to mind.
On the PSTN tab, under PSTN-To-VoIP Gateway Setup make sure you have the option "Off Hook While Calling VoIP", some very early firmware didn't have it and it's important.

Also I recommend you call the Asterisk trunk "1-pstn" as I have, I once tried to change it and got some odd effects.

On the same tab the phone number in "dial plan 2" must match the outbound caller ID in trunk 1-pstn in RASPBX

(also see how dialplan 2 is selected as default further down the page
PSTN Caller Default DP:2 )

Finaly here are the peer details of the 1-pstn trunk

username=1-pstn
type=friend
secret=XXXXXX
qualify=yes
port=5061
nat=never
incominglimit=1
host=dynamic
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=no
allow=ulaw


Other than that it's just inbound and outbound routes to set up.

See how you get on.
Attached Files
File Type: zip Sipura SPA Configuration2.zip (15.6 KB, 16 views)
__________________
--
Graham.
G3ZVT
rambo1152 is online now   Reply With Quote