New to Asterisk: "regected because extension not found"

Hi,

I’m trying to set up a simple SIP inbound system that is managed with adhearsion.
I don’t have any VoIP/softphones/devices that I’m connecting to asterisk, i just want to use an application to interface the incoming call. I don’t particularly even want to dial out. I have looked up documentation for the past 2 days, and I don’t think I’m really understanding the configurations. I have an SIP account that registers fine, but I when I dial into asterisk from my cellphone, the call won’t complete and I get an error.

[color=#FF0000]Error: [Apr 7 19:44:01] NOTICE[20519]: chan_sip.c:19546 handle_request_invite: Call from ‘74275*****’ to extension ‘30355*****’ rejected because extension not found.[/color]

I’ve tried a bunch of different configurations but obviously i’m missing it.
Right now I would just like to call in, and have a soundfile play or something to verify that incoming calls work.
these are my current configurations.

sip.conf

[code]
[general]
dtmfmode = rfc2833
context=general
srvlookup=yes
register => 30355*****:74275*****@sipconnect.ipcomms.net/30355*****
session-timers=refuse
session-expires=180
session-minse=90
session-refresher=uas

[ipcomms]
secret=74275*****
username=30355*****
host=sipconnect.ipcomms.net
allow=ulaw
context=from-pstn
dtmfmode=rfc2833
insecure=invite,port
nat=yes
type=friend
canreinvite=no

; I briefly had this section in user.conf before i started getting this error
; app_macro.c:302 _macro_exec: No such context ‘macro-stdexten’ for macro ‘stdexten’

[30355*****]
secret=74275*****
username=30355*****
host=sipconnect.ipcomms.net
allow=ulaw
context=from-pstn
dtmfmode=rfc2833
insecure=invite,port
nat=yes
type=friend
canreinvite=no[/code]

extensions.conf

[general]
static=yes
writeprotect=no

; i added this after the fact, I realize it's probably completely useless, 
; does asterisk reserve any context names?
[default]
exten => s,1,Verbose(Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()

[from-pstn]
exten => s,1,Wait(1)
exten => s,2,Answer
exten => s,3,DigitTimeout,5
exten => s,4,ResponseTimeout,10
exten => s,5,Background(demo-congrats)

Sorry for the nubcake but any help is appreciated.

In the context from-pstn, file extensions.conf you should use 30355***** and not s as the destination extension, the last part of your register command in sip.conf, register => 30355*****:74275*****@sipconnect.ipcomms.net/30355***** tells to the system the extension where to send the incoming calls from this peer.
Another way to solve the problem: put s instead of 30355***** at the end of this line .
The context where incoming calls go is is the context parameter defined in the peer section of sip.conf.

Cheers.

Marco Bruni

I’ve updated the config and I’m still getting the same error, what am I doing wrong?

sip.conf

[code]
[general]
; I’ve tried putting “context = from-pstn” in here as well
; but that didn’t work
dtmfmode = rfc2833
srvlookup=yes
register => 30355*****:74275*****@sipconnect.ipcomms.net/30355*****
session-timers=refuse
session-expires=180
session-minse=90
session-refresher=uas

[ipcomms]
secret=74275*****
username=30355*****
host=sipconnect.ipcomms.net
allow=ulaw
context=from-pstn
dtmfmode=rfc2833
insecure=invite,port
nat=yes
type=friend
canreinvite=no

[30355*****]
secret=74275*****
username=30355*****
host=sipconnect.ipcomms.net
allow=ulaw
context=from-pstn
dtmfmode=rfc2833
insecure=invite,port
nat=yes
type=peer
canreinvite=no[/code]

extensions.conf

[general]
static=yes
writeprotect=no

[from-pstn]
exten => 30355*****,1,Answer
exten => 30355*****,2,Playback(tt-weasels)
exten => 30355*****,3,Voicemail(44)
exten => 30355*****,4,Hangup

After updating extensions.conf did you issue the Asterisk cli command “dialplan reload” ?
Can you post the cli log when a call comes in, to see what happens ?

Cheers.

Marco Bruni

Yeah, I used reload and dialplan reload.
With verbosity at 11 the only error I get is

== Using SIP RTP CoS mark 5 [Apr 17 12:18:38] NOTICE[1716]: chan_sip.c:19546 handle_request_invite: Call from '30355*****' to extension '30355*****' rejected because extension not found.