Ringing a remote phone WITHOUT typing an extension first?

Hello

Since I’m stuck, I went back to reading several PDFs on Asterisk, and I’m beginning to wonder if it’s at all possible to have Asterisk ring a phone number without first answering the call and asking the user to type an extension.

I have two FXO cards: When a call comes into the first card, I want Asterisk to simply dial out a number through the second card without going off hook.

Anybody knows if I’m just wasting my time with Asterisk to do this, and should look at another solution? All the exemples I see of dial plans include extensions, ie. callers are expected to go through some kind of voice menu and choose an extension for the magic to happen.

Thank you.

was there something wrong with the first thread ? show us the logfile for an incoming call. and post your zapata.conf file and the extension context the channels go to.

I already did, but since the couple of tips that were given to me didn’t work, I went back to the books and I’m beginning to wonder if it’s at all possible to do what I thought was a breeze.

Anycow, here goes:

/var/log/asterisk/messages

Jun 19 18:17:15 NOTICE[2150] cdr.c: CDR simple logging enabled.
Jun 19 18:17:15 NOTICE[2150] config.c: Registered Config Engine odbc
Jun 19 18:17:15 NOTICE[2150] res_odbc.c: Adding ENV var: INFORMIXSERVER=my_special_database
Jun 19 18:17:15 NOTICE[2150] res_odbc.c: Adding ENV var: INFORMIXDIR=/opt/informix
Jun 19 18:17:15 NOTICE[2150] res_odbc.c: registered database handle 'asterisk' dsn->[asterisk]
Jun 19 18:17:15 NOTICE[2150] res_odbc.c: Connecting asterisk
Jun 19 18:17:15 WARNING[2150] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
Jun 19 18:17:15 NOTICE[2150] res_odbc.c: res_odbc loaded.
Jun 19 18:17:46 NOTICE[2186] chan_zap.c: Got event 18 (Ring Begin)...
Jun 19 18:17:47 NOTICE[2186] chan_zap.c: Got event 2 (Ring/Answered)...
Jun 19 18:17:51 NOTICE[2186] chan_zap.c: Got event 18 (Ring Begin)...

/etc/asterisk/zapata.conf

[channels]
context=cherbourg
signalling=fxs_ks
usecallerid=yes
echocancel=yes
callgroup=1
pickupgroup=1
immediate=no
callerid="my caller id"<(123) 123-1234>
channel=>1

context=cherbourg
signalling=fxs_ks
usecallerid=yes
echocancel=yes
callgroup=1
pickupgroup=1
immediate=no
callerid="my caller id"<(123) 123-1234>
channel=>2

/etc/asterisk/extensions.conf

[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[globals]
;I don't know enough about Asterisk yet
;so most of this stuff is left from the original file
CONSOLE=Console/dsp				; Console interface for demo
IAXINFO=guest					; IAXtel username/password

TRUNK=Zap/2					; Trunk interface
TRUNKMSD=1					; MSD digits to strip (usually 1 or 0)

[cherbourg]
exten => s,1,Dial(Zap/2/01XXXXXXXX)

;exten => s,1,Answer
;exten => s,2,Waitexten(10)

;exten => 100,Dial(Zap/2/01XXXXXXXX)
;exten => s,2,Dial(Zap/2/01XXXXXXXX)

Is there something else you need to investigate?

Thank you.

I’m still getting the same behavior: Instead of dialing another number through FXO #2, after two RINGs, Asterisk goes off-hook and remains silent. I must kill Asterisk for it to hang up.

FWIW, here’s the output from the console:

Connected to Asterisk 1.2.5 currently running on localhost (pid = 1790)
Verbosity is at least 3
    -- Starting simple switch on 'Zap/1-1'
Jun 23 18:39:42 NOTICE[2445]: chan_zap.c:6063 ss_thread: Got event 18 (Ring Begin)...
Jun 23 18:39:44 NOTICE[2445]: chan_zap.c:6063 ss_thread: Got event 2 (Ring/Answered)...
Jun 23 18:39:47 NOTICE[2445]: chan_zap.c:6063 ss_thread: Got event 18 (Ring Begin)...
    -- Executing Dial("Zap/1-1", "Zap/2/01XXXXXXXX|30|r") in new stack
    -- Called 2/01XXXXXXXX
    -- Zap/2-1 answered Zap/1-1
    -- Attempting native bridge of Zap/1-1 and Zap/2-1

*CLI> stop now

Beginning asterisk shutdown....
    -- Hungup 'Zap/2-1'
  == Spawn extension (cherbourg, s, 1) exited non-zero on 'Zap/1-1'
    -- Hungup 'Zap/1-1'
Executing last minute cleanups
  == Destroying musiconhold processes
Asterisk cleanly ending (0).

And the configuration files and log files:

codecomplete.free.fr/asterisk/

Totally in the dark. Thank you for any hint.

that log would suggest that the call is being bridged as expected. and you just get silence ? during the “call”, what’s the status of the channels ?

can i ask why you’re using 1.2.5 ? any reason why you can’t upgrade asterisk and zaptel to the latest version ?

Yup. It goes off-hook after two rings, and I just hear silence, with crap (sounds like static).

How do I check this?

Because I’m a total newbie, so I figured it’d be easier to get started using a Linux distro built for Asterisk. 1.2.5 is the version that came with the rPath Linux ISO that I installed.

Indeed, I was thinking of scrapping the whole thing, install Ubuntu or something, and compile the latest stable stuff from Asterisk.

Still, any idea why it does this? On another site, someone mentionned using a hunt/ring group. Would that solve the issue?

Thank you.

if you’re really that much of a newbie, try asterisk@home (now called trixbox…)

I’ll give it a shot. I figured it’d be better to start with something more basic considering how small my needs are and the amount of stuff Tribox comes with. Besides, if it does work with Tribox, I’ll have no idea why it fell into gear :smile:

try and see if this works

[cherbourg]
exten => s,1,Answer
exten => s,2,Dial(Zap/2/01XXXXXXXX)

[quote=“vinod.vijayan”]try and see if this works
[cherbourg]
exten => s,1,Answer
exten => s,2,Dial(Zap/2/01XXXXXXXX)

…[/quote]

Thanks but already tried last week. Besides the fact that I _don’_t want Asterisk to answer the call (just dial another number through the second FXO, so as not to charge callers if no one answers), Asterisk just stays silent. I’ll set up a new server tomorrow using the latest Zaptel + Asterisk, perform some tests that people nicely offered, and report back.

Thank you.

For those trying this… with much help from the experts on the IRC channel, especially the mighty Strom_C…

  1. we did get some routing happening between FXO2 -> FXO1 (not the other way around, go figure), but…
  • all I hear when the I pick up the phone on FXO1 is noise,
  • we had to have the ingress FXO card go off-hook to handle the call (and charging customers a call even if no one ends up answering…), and
  • the FXO detects neither caller ID nor call termination.

So it doesn’t look like routing calls between txo FXO cards is doable, at least with X101P clones (possibly OK with Digium cards). I’m told a much better solution is to go SIP (a.k.a. “media gateway”.)

  1. In zapata.conf, make sure you use “channel=>1-2” instead of “channel=>1,2”

  2. Here’s what you can try in extensions.conf

[general] 
static=yes 
writeprotect=no 

[globals]
TRUNK=Zap/1
;TRUNK=Zap/2
NUMBER=5551234

[incoming]
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Dial(${TRUNK}/${NUMBER})

;Didn't work
;exten => s,1,NoOp(Before Dialing out through ${TRUNK} - Caller ID is ${CALLERID}) 
;exten => s,n,Dial(${TRUNK}/${NUMBER}) 
;exten => s,n,NoOp(After Dialing out through ${TRUNK})

HTH
Fred.

now that is interesting. i know it works on the TDM400 as a client of mine with 2 FXO modules took an incoming Zap call and decided they needed to talk to me so did a atxfer via his second module … worked perfectly.

now i’m off to try it via a Sangoma A200 !!

this is totally random but did you try turning off call progress detection? I find that can solve ‘odd’ problems…
also try fxotune or adjust gain levels?

you probably tried all that tho :frowning:

theoretically, a Zap interface connected to a POTS line should have no need to answer in your case. In fact, it SHOULDNT unless you answer() or start sending audio. I have done the exact same thing with Digium TDMxx series cards…

With Digium cards, not those el cheapo FXO cards sold on eBay :wink:

If the following suggestions don’t work, that’s probably what I’ll end up buying. That or a Sipura 3000, unless someone recommends yet another FXO-SIP box.

[quote=“IronHelix”]this is totally random but did you try turning off call progress detection? I find that can solve ‘odd’ problems…
also try fxotune or adjust gain levels?[/quote]

No, I haven’t tried that. I’ll RTFM on how to do this. Any idea about the issue with routing working only in one direction (Zap/2 → Zap/1 OK, Zap/1 → Zap/2 NOK), and the heavy static when the call is actually routed? Maybe the cards just aren’t real clones, and/or the P3 I had as spare just isn’t fast enough.

Indeed. That’s why I banged my head a lot until it finally sort of worked thanks to great help from the IRC channel.

Bottom line to newbies: Unless you can borrow it from a friend, don’t buy those clones from eBay. They’re likely to be a waste of time.

Thanks guys.