Need some configuration help

Well folks I’m not sure what I’m doing wrong since I thought I had followed the instructions at FWD. The problem is that while Asterisk is receiving the calls it is rejecting them. The error message that I’m seeing is:

Dec 17 NOTICE[2084]: chan_iax2.c:5774 socket_read: Rejected connect attempt from, request ‘729629@fromiaxfwd’ does not exist

Asterisk does show that it is registered with FWD when I do an iax2 show registry. I’m not sure if SJPhone is registering properly because while it shows as registered it will not make outgoing calls either. It shows as registered with the Asterisk server but asterisk shows registration failures when it tries to connect.

Hopefully my configurationf files will help answer the question so here they are. All help is appreciated.


register =>



FWDNUMBER=729629 ; your calling number
FWDCIDNAME=“Chris”; your caller id
FWDPASSWORD=mypassword ; your password
FWDRINGS=sip/cpatricca ; the phone to ring
FWDVMBOX=1000 ; the VM box for this user
exten => _9.,1,SetCallerId,${FWDCIDNAME}
exten => _9.,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}${EXTEN:3},60,r)
exten => _9.,3,Congestion
exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r)
exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX}
exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX}
exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r)
exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX}
exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX}


port = 5060 ; Port to bind to
bindip =

dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info
mailbox=1000 ; Mailbox for message waiting indicator
callerid=“Chris” <2124>

Based on the error message Asterisk is not finding that extension in the [fromiaxfwd] context. I would recommend removing the variable substition that you have here:

[fromiaxfwd] exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r) exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX} exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX}

And doing something like this:

[fromiaxfwd] exten => _7X.,1,Dial(${FWDRINGS},20,r) exten => _7X.,2,Voicemail,u${FWDVMBOX} exten => _7X.,102,Voicemail,b${FWDVMBOX}

Then work your way back if indeed it is an issue with the variable substition, as I do not believe you may do substitution for extensions matching, but then I have never tried.

And as for registering, the last I knew you had to explicitly enable IAX on your FWD account. Have you done this?

Ok I’ve altered the extension lines like I believe you indicated I should do, let me know if I misunderstood. Now I’m getting this error:

Dec 17 WARNING[2504]: app_dial.c:503 dial_exec: Dial argument takes format (tec
hnology1/number1&technology2/number2…|optional timeout)

The iaxfwd lines read as follows:

exten => _729629,1,Dial(${sip/cpatricca},20,r)
exten => _729629,2,Voicemail,u${1000}
exten => _729629,102,Voicemail,b${1000}

[quote=“cpatricca”]exten => _729629,1,Dial(${sip/cpatricca},20,r)
exten => _729629,2,Voicemail,u${1000}
exten => _729629,102,Voicemail,b${1000}[/quote]

exten => _729629,1,Dial(sip/cpatricca,20,r) exten => _729629,2,Voicemail,u1000 exten => _729629,102,Voicemail,b1000
The ${} bit encloses a variable name and you’re not using variables, so you shouldn’t use it. (The whole of “${some_var}” is the variable, not just the bit between the braces.)

Thanks. That fixed the incoming call problem. I’m still having problems with outbound dialing though. I’m using SJPhone and had it set to dial out using extension 9 but I keep getting a 404 error. For example I dial 9-612 (FWD’s test number) and I get that 404 extension does not exist. I’m not sure if it’s a bad configuration on SJPhone’s end or on Asterisk’s end. Some additional information. I notice that in the Asterisk console that when I attempt to dial out I get several Recv error: Connection reset by peer error messages. I’d copy and paste the debug information but I do not see a way to do that (I’m working with the Win32 version running on 2000 Server). I have altered my extensions.conf file a bit more as follows:

exten => _9.,1,SetCallerId,Chris
exten => _9.,2,Dial(IAX2/${EXTEN:3},60,r)
exten => _9.,3,Congestion

Here’s my configuration information for SJPhone:


User data

Account (inquired, saved, and required checked)
Password (inquired,saved,and required checked)

SIP Proxy

Proxy domain:
Register with proxy is checked


Accept redirection replies (checked)
Expose software version (checked)
Remove fancy characters from phone numbers (checked)


Send DTM as: RFC2833
Signal duration: 270

RTP payload type 101

Pause duration 100


Use discovered addresses in sip (unchecked)

exten => _9.,1,SetCallerId,Chris
exten => _9.,2,Dial(IAX2/${EXTEN:3},60,r)
exten => _9.,3,Congestion [/quote]

When you dial 9612 with that dial string you are actually sending a 2 to FWD, if you have verbose CLI you should be able to see this. The ‘:3’ strips the first three characters. So, your dial string should look like this:

exten => _9.,2,Dial(IAX2/${EXTEN:1},60,r)

I changed the string so that it only strips the first character but I’m still having the same problem. Is there something else I’m doing wrong?

Please do a ‘set verbose 3’ at the CLI and post the output when you make the dial attempt.

Also, if you are on v1.2 or great I would recommend changing your CallerID setting to:

exten => _X.,1,Set(CALLERID(name)=“The Name”)

Well I put in set verbose 3 but it doesn’t seem to give any extra information: Here’s the line that repeats five times:

WARNING[2660]: chan_sip.c:7762 sipsock_read: Recv error: Connection reset by peer

It ends with:

WARNING[2660]: chan_sip.c:700 retrans_pkt: Maximum retries exceeded on call.

I also tried higher levels of verbosity without any change in the display.

Does anybody have some more suggestions? I can receive inbound calls fine but as indicated by the previous message I cannot make outgoing calls. Here’s the output from a sip debug when I attempt to make a call. Sorry for making it an image but I can’t seem to do a copy & paste from the console:

Just a note I’ve also added the line localnet= as suggested on another forum in my sip.conf file without any change on being able to make outbound calls. If you folks need any more information to assist me please let me know.