[Asterisk-Users] Getting asterisk to work with callthroughs?

Huw Morgan hmorgan883 at hotmail.com
Thu Aug 4 09:24:36 MST 2005


Hi,

Firstly, what I'm trying to do is:
* Get asterisk to pick up a SIP call via a DID
* Prompt the user
* When the user puts in a number, go to IAX.conf and route it according to 
what I've specified there, i.e Least Cost Routing, etc.

I've set-up something similar to what I've found online, but it doesn't 
work! Asterisk doesn't pick up the call at all..... :(

The files I used:

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)

--

Any ideas why Asterisk is NOT picking up the SIP call.... And any pointers 
where I've gone wrong?

Thanks in advance!

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/




More information about the asterisk-users mailing list