Configuring incomming calls

Hi,

Nub to Asterisk, so apologies for the dumb question about to follow. I have *now setup and running, I have 4 sip extensions set up using linksys spa phones, and I have set up one SIP service provider (blueface, in Ireland). I can successfully make ougoing calls over the sip service provider, but cant quite figure out what I am supposed to do for incomming calls.

I have read the asterisknow user quide, whcih I undsertand is a work in progress, but cant figure out what I am supposed to do. There is mention of the advancedconfig menu, but I cant actually find this, that looks like the one in the guide (where I can access sip settings etc, as I think this is where I should be going to configure incomming calls).

i have tried a couple of different incomming rules, i.e all unmatched to an extension. i do seem to have a couple of options for selecting the “from provider” field, where I have a “DID 3” option (I did not set this up!!, so suspect it is the incomming side of my SIP trunk ?)
Any advice appreciated, especially adive related to what I need to do for incomming calls.

Regards,
Eamon

I assume you are using a GUI. I have never used any so I will explain how to do it with “asterisk vanilla”. In sip.conf you have a default context for all traffic that comes in to the asterisk server over sip. Now you need to register with your ITSP to tell them where to send you the calls. You may have some thing like: Register => userID:Password@someprovider.com

Now if you do this the call coming from the provider will go to the s extension to the context that you set in sip.conf. If you want it to go to a specific extension in the default context you would add that extension to the end of the register statement. So for instance if you want all the calls to go to extension 55555 then you would do Register => UserID:Password@someprovider.com/55555.

Hope this helps.

Dovid,

Thanks for the reply. My ITSP is blueface (irish provider), and I have a username/password for them. I can use it for outgoing calls okay. I have made a little progress, in that I know that asterisk is seeing the call comming in. I enabled siplogging on the console, and when I call in from an external line, I see the call ID on the console comming in, but to be honest, cant make sense of what is happening after that.

I have through the GUI enabled incomming call rules, to direct all unmatched calls to ext 6000. Possibly where I am going wrong, is in selecting the provider on this rule. I see an additional PROVIDER called DID-TRUNK-3, which I did not set up myself, so I am guessing this is the incomming section of my sip line ? To be safe, I put in a second rule from the provider that I did set up to go to ext 6000 also.

I looked at my sip.conf file, and this is what it contains
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes

Looks a bit bare ?
Thanks,
Eamon
T

Hi
the sip.conf genreal section you mention is ur complete section? plz post ur complete sip.conf & ur console logs when incoming call arived at ur asterisk. with ur incoming context in extension.conf. so we can say something.

Amit

Hi Amit,

Yep, thats all that seems to be in it!! I am reading it from the GUI.
Afraid, I’m a complete NUB, I cant figure out how to copy and past the console text off my asterisk machine so I can post it up. I know nothing about linux, so on a steep learning curve which is more of a flat line at the moment :unamused:

The ext.conf file is below
static=yes
writeprotect=no
clearglobalvars=no
[globals]
CONSOLE=Console/dsp
IAXINFO=guest
TRUNK=Zap/g2
TRUNKMSD=1
Blueface trunk 1=SIP/Blueface trunk 1
trunk_2=SIP/trunk_2
trunk_3=IAX2/trunk_3
Blueface_1=SIP/Blueface_1
[dundi-e164-canonical]

[dundi-e164-customers]

[dundi-e164-via-pstn]

[dundi-e164-local]
include=dundi-e164-canonical
include=dundi-e164-customers
include=dundi-e164-via-pstn
[dundi-e164-switch]
switch=DUNDi/e164
[dundi-e164-lookup]
include=dundi-e164-local
include=dundi-e164-switch
[macro-dundi-e164]
exten=s,1,Goto(${ARG1},1)
include=dundi-e164-lookup
[iaxtel700]
exten=_91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel)
[iaxprovider]

[trunkint]
exten=_9011.,1,Macro(dundi-e164,${EXTEN:4})
exten=_9011.,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunkld]
exten=_91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten=_91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunklocal]
exten=_9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunktollfree]
exten=_91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten=_91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten=_91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten=_91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[international]
ignorepat=9
include=longdistance
include=trunkint
[longdistance]
ignorepat=9
include=local
include=trunkld
[local]
ignorepat=9
include=default
include=trunklocal
include=iaxtel700
include=trunktollfree
include=iaxprovider
include=parkedcalls
[macro-trunkdial]
exten=s,1,Dial(${ARG1})
exten=s,n,Goto(s-${DIALSTATUS},1)
exten=s-NOANSWER,1,Hangup
exten=s-BUSY,1,Hangup
exten=_s-.,1,NoOp
[macro-stdexten]
exten=s,1,Dial(${ARG2},20)
exten=s,2,Goto(s-${DIALSTATUS},1)
exten=s-NOANSWER,1,Voicemail(${ARG1},u)
exten=s-NOANSWER,2,Goto(default,s,1)
exten=s-BUSY,1,Voicemail(${ARG1},b)
exten=s-BUSY,2,Goto(default,s,1)
exten=_s-.,1,Goto(s-NOANSWER,1)
exten=a,1,VoicemailMain(${ARG1})
[macro-stdPrivacyexten]
exten=s,1,Dial(${ARG2},20|p)
exten=s,2,Goto(s-${DIALSTATUS},1)
exten=s-NOANSWER,1,Voicemail(${ARG1},u)
exten=s-NOANSWER,2,Goto(default,s,1)
exten=s-BUSY,1,Voicemail(${ARG1},b)
exten=s-BUSY,2,Goto(default,s,1)
exten=s-DONTCALL,1,Goto(${ARG3},s,1)
exten=s-TORTURE,1,Goto(${ARG4},s,1)
exten=_s-.,1,Goto(s-NOANSWER,1)
exten=a,1,VoicemailMain(${ARG1})
[macro-page]
exten=s,1,ChanIsAvail(${ARG1}|js)
exten=s,n,GoToIf([${AVAILSTATUS} = “1”]?autoanswer:fail)
exten=s,n(autoanswer),Set(_ALERT_INFO=“RA”)
exten=s,n,SIPAddHeader(Call-Info: Answer-After=0)
exten=s,n,NoOp()
exten=s,n,Dial(${ARG1}||)
exten=s,n(fail),Hangup
[demo]
exten=s,1,Wait(1)
exten=s,n,Answer
exten=s,n,Set(TIMEOUT(digit)=5)
exten=s,n,Set(TIMEOUT(response)=10)
exten=s,n(restart),BackGround(demo-congrats)
exten=s,n(instruct),BackGround(demo-instruct)
exten=s,n,WaitExten
exten=2,1,BackGround(demo-moreinfo)
exten=2,n,Goto(s,instruct)
exten=3,1,Set(LANGUAGE()=fr)
exten=3,n,Goto(s,restart)
exten=1000,1,Goto(default,s,1)
exten=1234,1,Playback(transfer,skip)
exten=1234,n,Macro(stdexten,1234,${GLOBAL(CONSOLE)})
exten=1235,1,Voicemail(1234,u)
exten=1236,1,Dial(Console/dsp)
exten=1236,n,Voicemail(1234,b)
exten=#,1,Playback(demo-thanks)
exten=#,n,Hangup
exten=t,1,Goto(#,1)
exten=i,1,Playback(invalid)
exten=500,1,Playback(demo-abouttotry)
exten=500,n,Dial(IAX2/guest@misery.digium.com/s@default)
exten=500,n,Playback(demo-nogo)
exten=500,n,Goto(s,6)
exten=600,1,Playback(demo-echotest)
exten=600,n,Echo
exten=600,n,Playback(demo-echodone)
exten=600,n,Goto(s,6)
exten=76245,1,Macro(page,SIP/Grandstream1)
exten=_7XXX,1,Macro(page,SIP/${EXTEN})
exten=7999,1,Set(TIMEOUT(absolute)=60)
exten=7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n|d)
exten=8500,1,VoicemailMain
exten=8500,n,Goto(s,6)
[page]
exten=_X.,1,Macro(page,SIP/${EXTEN})
[default]
exten=6500,1,VoiceMailMain
exten=8500,n,Hangup
include=voicemenu-custom-1
exten=6004,1,MeetMe(${EXTEN}|MsI)
[voicemenu-custom-1]
comment=mainmenu
exten=s,1,Answer
exten=s,2,Background(thank-you-for-calling)
exten=s,3,Background(if-u-know-ext-dial)
exten=s,4,Background(otherwise)
exten=s,5,Background(pls-hold-while-try)
exten=s,6,Background(to-reach-operator)
include=default
exten=0,1,Goto(default|6000|1)
exten=1,1,Goto(voicemenu-custom-1|s|1)
exten=2,1,Goto(default|6001|1)
[numberplan-custom-1]
plancomment=DialPlan1
include=default
exten=_9XXXXXXXXX!,1,Macro(trunkdial,${trunk_2}/${EXTEN:1})
comment=_9XXXXXXXXX!,1,Local,standard
[asterisk_guitools]
exten=executecommand,1,System(${command})
exten=executecommand,n,Hangup()
exten=record_vmenu,1,Answer
exten=record_vmenu,n,Playback(vm-intro)
exten=record_vmenu,n,Record(${var1})
exten=record_vmenu,n,Playback(vm-saved)
exten=record_vmenu,n,Playback(vm-goodbye)
exten=record_vmenu,n,Hangup
exten=play_file,1,Answer
exten=play_file,n,Playback(${var1})
exten=play_file,n,Hangup
hasbeensetup=Y
[timebasedrules]

[DID_trunk_2]
exten=_X.,1,Goto(default|6000|1)
exten=s,1,Goto(default|6000|1)
[DID_trunk_3]

my extensions.conf file is:-
[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
CONSOLE=Console/dsp
IAXINFO=guest
TRUNK=Zap/g2
TRUNKMSD=1
Blueface trunk 1=SIP/Blueface trunk 1
trunk_2=SIP/trunk_2
trunk_3=IAX2/trunk_3
Blueface_1=SIP/Blueface_1
[dundi-e164-canonical]

[dundi-e164-customers]

[dundi-e164-via-pstn]

[dundi-e164-local]
include=dundi-e164-canonical
include=dundi-e164-customers
include=dundi-e164-via-pstn
[dundi-e164-switch]
switch=DUNDi/e164
[dundi-e164-lookup]
include=dundi-e164-local
include=dundi-e164-switch
[macro-dundi-e164]
exten=s,1,Goto(${ARG1},1)
include=dundi-e164-lookup
[iaxtel700]
exten=_91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel)
[iaxprovider]

[trunkint]
exten=_9011.,1,Macro(dundi-e164,${EXTEN:4})
exten=_9011.,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunkld]
exten=_91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten=_91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunklocal]
exten=_9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunktollfree]
exten=_91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten=_91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten=_91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten=_91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[international]
ignorepat=9
include=longdistance
include=trunkint
[longdistance]
ignorepat=9
include=local
include=trunkld
[local]
ignorepat=9
include=default
include=trunklocal
include=iaxtel700
include=trunktollfree
include=iaxprovider
include=parkedcalls
[macro-trunkdial]
exten=s,1,Dial(${ARG1})
exten=s,n,Goto(s-${DIALSTATUS},1)
exten=s-NOANSWER,1,Hangup
exten=s-BUSY,1,Hangup
exten=_s-.,1,NoOp
[macro-stdexten]
exten=s,1,Dial(${ARG2},20)
exten=s,2,Goto(s-${DIALSTATUS},1)
exten=s-NOANSWER,1,Voicemail(${ARG1},u)
exten=s-NOANSWER,2,Goto(default,s,1)
exten=s-BUSY,1,Voicemail(${ARG1},b)
exten=s-BUSY,2,Goto(default,s,1)
exten=_s-.,1,Goto(s-NOANSWER,1)
exten=a,1,VoicemailMain(${ARG1})
[macro-stdPrivacyexten]
exten=s,1,Dial(${ARG2},20|p)
exten=s,2,Goto(s-${DIALSTATUS},1)
exten=s-NOANSWER,1,Voicemail(${ARG1},u)
exten=s-NOANSWER,2,Goto(default,s,1)
exten=s-BUSY,1,Voicemail(${ARG1},b)
exten=s-BUSY,2,Goto(default,s,1)
exten=s-DONTCALL,1,Goto(${ARG3},s,1)
exten=s-TORTURE,1,Goto(${ARG4},s,1)
exten=_s-.,1,Goto(s-NOANSWER,1)
exten=a,1,VoicemailMain(${ARG1})
[macro-page]
exten=s,1,ChanIsAvail(${ARG1}|js)
exten=s,n,GoToIf([${AVAILSTATUS} = “1”]?autoanswer:fail)
exten=s,n(autoanswer),Set(_ALERT_INFO=“RA”)
exten=s,n,SIPAddHeader(Call-Info: Answer-After=0)
exten=s,n,NoOp()
exten=s,n,Dial(${ARG1}||)
exten=s,n(fail),Hangup
[demo]
exten=s,1,Wait(1)
exten=s,n,Answer
exten=s,n,Set(TIMEOUT(digit)=5)
exten=s,n,Set(TIMEOUT(response)=10)
exten=s,n(restart),BackGround(demo-congrats)
exten=s,n(instruct),BackGround(demo-instruct)
exten=s,n,WaitExten
exten=2,1,BackGround(demo-moreinfo)
exten=2,n,Goto(s,instruct)
exten=3,1,Set(LANGUAGE()=fr)
exten=3,n,Goto(s,restart)
exten=1000,1,Goto(default,s,1)
exten=1234,1,Playback(transfer,skip)
exten=1234,n,Macro(stdexten,1234,${GLOBAL(CONSOLE)})
exten=1235,1,Voicemail(1234,u)
exten=1236,1,Dial(Console/dsp)
exten=1236,n,Voicemail(1234,b)
exten=#,1,Playback(demo-thanks)
exten=#,n,Hangup
exten=t,1,Goto(#,1)
exten=i,1,Playback(invalid)
exten=500,1,Playback(demo-abouttotry)
exten=500,n,Dial(IAX2/guest@misery.digium.com/s@default)
exten=500,n,Playback(demo-nogo)
exten=500,n,Goto(s,6)
exten=600,1,Playback(demo-echotest)
exten=600,n,Echo
exten=600,n,Playback(demo-echodone)
exten=600,n,Goto(s,6)
exten=76245,1,Macro(page,SIP/Grandstream1)
exten=_7XXX,1,Macro(page,SIP/${EXTEN})
exten=7999,1,Set(TIMEOUT(absolute)=60)
exten=7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n|d)
exten=8500,1,VoicemailMain
exten=8500,n,Goto(s,6)

[page]
exten=_X.,1,Macro(page,SIP/${EXTEN})
[default]
exten=6500,1,VoiceMailMain
exten=8500,n,Hangup
include=voicemenu-custom-1
exten=6004,1,MeetMe(${EXTEN}|MsI)
[voicemenu-custom-1]
comment=mainmenu
exten=s,1,Answer
exten=s,2,Background(thank-you-for-calling)
exten=s,3,Background(if-u-know-ext-dial)
exten=s,4,Background(otherwise)
exten=s,5,Background(pls-hold-while-try)
exten=s,6,Background(to-reach-operator)
include=default
exten=0,1,Goto(default|6000|1)
exten=1,1,Goto(voicemenu-custom-1|s|1)
exten=2,1,Goto(default|6001|1)
[numberplan-custom-1]
plancomment=DialPlan1
include=default
exten=_9XXXXXXXXX!,1,Macro(trunkdial,${trunk_2}/${EXTEN:1})
comment=_9XXXXXXXXX!,1,Local,standard
[asterisk_guitools]
exten=executecommand,1,System(${command})
exten=executecommand,n,Hangup()
exten=record_vmenu,1,Answer
exten=record_vmenu,n,Playback(vm-intro)
exten=record_vmenu,n,Record(${var1})
exten=record_vmenu,n,Playback(vm-saved)
exten=record_vmenu,n,Playback(vm-goodbye)
exten=record_vmenu,n,Hangup
exten=play_file,1,Answer
exten=play_file,n,Playback(${var1})
exten=play_file,n,Hangup
hasbeensetup=Y
[timebasedrules]

[DID_trunk_2]
exten=_X.,1,Goto(default|6000|1)
exten=s,1,Goto(default|6000|1)
[DID_trunk_3]

Afraid I dont kn how to take the console log off of the machine to post up. The asterisk log in the GUI is behind, so does not have recent info, even if I update.

Do you have anything in sip.conf that looks like
register => XXXX:XXXX@somename ?