Need some configuration help


#1

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 192.246.69.186, 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.

iax.conf:

[general]
disallow=all
allow=alaw
allow=gsm
register => 729629:mypassword@iax2.fwdnet.net
allow=ulaw

[iaxfwd]
type=user
context=fromiaxfwd
auth=rsa
inkeys=freeworlddialup
nat=1
permit=65.39.205.0/255.255.255.0

extensions.conf:

[general]
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
[cpatricca]
exten => _9.,1,SetCallerId,${FWDCIDNAME}
exten => _9.,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:3},60,r)
exten => _9.,3,Congestion
[fromiaxfwd]
exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r)
exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX}
exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX}
[default]
exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r)
exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX}
exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX}

sip.conf:

[general]
include=fromiaxfwd
port = 5060 ; Port to bind to
bindip = 192.168.1.10

[cpatricca]
type=friend
host=dynamic
username=cpatricca
secret=mypassword
dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info
mailbox=1000 ; Mailbox for message waiting indicator
callerid=“Chris” <2124>


#2

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?


#3

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:

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


#4

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

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.)


#5

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:

[cpatricca]
exten => _9.,1,SetCallerId,Chris
exten => _9.,2,Dial(IAX2/729629:mypassword@iax2.fwdnet.net/${EXTEN:3},60,r)
exten => _9.,3,Congestion

Here’s my configuration information for SJPhone:

Initialization

User data

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

SIP Proxy

Proxy domain: 192.168.1.10
Register with proxy is checked

Advanced

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

DTMF

Send DTM as: RFC2833
Signal duration: 270

RTP payload type 101

Pause duration 100

STUN

Use discovered addresses in sip (unchecked)


#6

[quote=“cpatricca”][cpatricca]
exten => _9.,1,SetCallerId,Chris
exten => _9.,2,Dial(IAX2/729629:mypassword@iax2.fwdnet.net/${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/729629:mypassword@iax2.fwdnet.net/${EXTEN:1},60,r)


#7

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?


#8

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”)


#9

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.


#10

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:


#11

Just a note I’ve also added the line localnet=192.168.1.0/255.255.255.0 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.