[HELP] Callthrough system?


#1

Hi,

I am trying to get Asterisk to pick up when someone dials a DID number, and present them with a dial tone or a prompt, and then dial the number they’ve inputted.

I want to use Least Cost Routing for the dialling, and have 3 terminators to choose from.

Anyway, I have tried to set-up a callthrough, but it isn’t working ! (surprise surprise!)

I have a HUGE extensions.conf file with everything laid out properly, but I will include the relevant stuff below so you can see if I’ve gone wrong somewhere(!!):

sip.conf (for the DID)

[general]
context=default
recordhistory=yes
port=5060
bindaddr=0.0.0.0
srvlookup=yes
tos=lowdelay
maxexpirey=3600
defaultexpirey=120
allow=ulaw
allow=alaw
musicclass=default
language=en
relaxdtmf=yes
rtptimeout=60
trustrpid = no
progressinband=yes
useragent=Asterisk PBX
promiscredir = no

[incoming]
; For incoming calls only.
type=user
username=xxxxxx
secret=xxxxxxxx
host=sipgate.co.uk
fromuser=xxxxxx
fromdomain=sipgate.co.uk
authuser=xxxxxxx
dtmfmode=info
context=from-sip
insecure=very
disallow=all
allow=ulaw
allow=alaw

iax.conf (for the peers/terminating services)
Can paste this in if it is relevant, although I THINK it’s working as it shows them registered ok on the CLI.

extensions.conf extract - how I’m routing the calls

[globals]
${OUTGOING-NUM}=XXXX

[general]
static=yes
writeprotect=no
[from-sip]
exten => _NXXNXXXXXX,1,Answer
exten => _NXXNXXXXXX,2,Background(vm-password)
exten => _NXXNXXXXXX,3,Authenticate(123)
exten => _NXXNXXXXXX,4,Playback(beep)
exten => _NXXNXXXXXX,5,SetVar(NR=)
exten => _NXXNXXXXXX,6,Goto(testdtmf|s|1)

[testdtmf]
exten => s,1,SetVar(NR=)
exten => s,2,Background(pls-entr-num-uwish2-call)
exten => s,3,Background(and-prs-pound-whn-finished)
exten => s,4,Background(beep)
exten => s,5,WaitExten(10)
exten => _x,1,SetVar(NR=${NR}${EXTEN})
exten => _x,2,NoOp(${NR})
exten => _x,3,Goto(testdtmf|s|5)
exten => _#,1,Goto(verifynumber|s|1)
exten => i,1,Goto(testdtmf|s|1)
exten => t,1,Hangup

[verifynumber]
exten => s,1,Background(you-dialed)
exten => s,2,SayDigits(${NR})
exten => s,3,Background(if-correct-press)
exten => s,4,Background(pound)
exten => s,5,Background(otherwise-press)
exten => s,6,Background(star)
exten => _#,1,Background(pls-wait-connect-call)
exten => _#,2,Dial(IAX2/${OUTGOING-NUM}@voxee/${NR},30)
exten => _#,3,Background(something-terribly-wrong);
exten => _#,4,Background(goodbye)
exten => _#,5,Hangup
exten => _*,1,Goto(testdtmf|s|1)

The example in extensions.conf is supposed to read out the number before letting the user chose to make the call. It is taken from one of the other sites in the hope that it’d work, and I think I must have gone wrong somewhere!

So if anyone can assist I’d be grateful, all I actually want to use Asterisk for is for a callthrough app and eventually a calling card system.

Thanks!