[Asterisk-Users] Sipura 3000 FXO with Asterisk

Tony Davidson tonyd at zeroeffortnetworking.com.au
Tue Mar 29 19:10:35 MST 2005


Yes I have mine working exactly like this.  The following is from the
Voxilla forums:

http://voxilla.com/forum-viewtopic-t-1335-postdays-0-postorder-asc-start-0.h
tml

The text is (in case you don't have web access).  There's more posts on it
but this is the nuts & guts of it. BTW, I used _ instead of A as my prefix -
works great!

--------
I've got a way to get the SPA-3000 to use the FXO port to take inbound from
PSTN (grabs and passes telco caller-ID name/num as well) and pass to
Asterisk for add'l handling. 

Sure, the SPA-3000 does a great job of 'front-ending' inbound PSTN calls,
and can even pass-through to the built-in FXS port, or external VoIP
service, but I needed Asterisk to get the call BEFORE it was "answered" and
handled/routed by the SPA-3000. 

Would seem to be a simple mode of operation, yet everywhere I looked it
didn't seem possible to do just that. 

I wanted to use it as a 'simple' FXO <-> SIP gateway to Asterisk AND also
use the FXS port as an Asterisk extension. 

Here's how: 

(I'm only detailing the tricky part .. the rest is really basic Asterisk
and/or SPA-3000 setup) 

1. Setup Asterisk and SPA-3000 so both the PSTN line (FXO) and Line1 (FXS)
are registered with Asterisk as different extensions (i.e. FXO user ID=10
and FXS user ID=2000) on different ports (5060/5061). 

In this example I'll use Asterisk extension "99" as the place I want to send
the inbound PSTN call to. 


2. PSTN Line tab: 

PSTN-To-VoIP Gateway Setup 

PSTN-To-VoIP Gateway Enable: NO 
PSTN Ring Thru Line 1: YES 
PSTN CID For VoIP CID: YES 

(here's one of the tricks to make it work) 

PSTN CID Number Prefix: A 

(I used 'A' but I suppose you could pick any ALPHA character that WOULDN'T
be expected as a valid caller-ID NUMBER) 


FXO Timer Values (sec) 

PSTN Ring Thru Delay: 3 


3. User 1 tab: 

Selective Call Forward Settings 

Cfwd Sel1 Caller: A* 
Cfwd Sel1 Dest: 99 


4. In Asterisk (in the context that you've defined exten 99): 

exten => 99,1,SETCIDNUM(${CALLERIDNUM:1}) 
exten => 99,2,Dial(SIP/${exten}) 
(for example) 


Here's what happens: 

Call rings FXO port. 

Wait three seconds so that caller-ID gets sent (you might need to increase
this, but 3 secs seems to work fine for me) to the SPA-3000. 

PREFIX the caller-ID NUMBER with a LETTER before passing it to LINE 1 

(so if original caller-ID was 5559991212, it's now A5559991212, not a
'valid' caller ID number, but SPA-3000 and Asterisk don't seem to care,
thankfully). 

SELECTIVELY forward ONLY calls with caller-ID NUMBER that begin with A
(actually this should be EVERY inbound PSTN call) to Asterisk extension 99 

As soon as Asterisk gets the call, STRIP the 'invalid' A off and we're left
with a good, original callerID number. Send the call out to a device (can be
the SPA-3000 FXS (exten 2000) or port if you want!) 

The call is still UNANSWERED at this point. 

FXS port starts to ring, and original PSTN-provided caller-ID is sent as
usual. 

Answer extension 99 (or send it voicemail) and FXO finally goes off-hook. 

You can make calls to extension 2000 and not worry about them being bounced
back to extension 99 since no "normal" caller-ID NUMBER should ever (??)
start with "A" 

Above all, I think this could be made a whole lot more intuitive and
fool-proof if Sipura just added a feature into the firmware.
 

> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com 
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of 
> Ed Greenberg
> Sent: Wednesday, 30 March 2005 10:41 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [Asterisk-Users] Sipura 3000 FXO with Asterisk
> 
> Anybody using a Sipura 3000 for FXO with Asterisk?
> 
> Mine is working except for one small nit...
> 
> When a call comes in from the PSTN, the Sipura answers it and 
> then passes it on to Asterisk, which plays extension ring tone.
> 
> I'd prefer for the POTS line to stay on-hook while the 
> extension rings, and to only be answered by the Sipura when 
> the extension answers.
> 
> Has anybody made this work?
> 
> </edg>
> 

--------------------------------------------
My mailbox is spam-free with ChoiceMail, the leader in personal and corporate anti-spam solutions. Download your free copy of ChoiceMail from www.choicemailfree.com





More information about the asterisk-users mailing list