Extensions from PSTN to voip [SOLVED]

Hi All,

Im trying to make asterisk to accept extensions from PSTN phone over my voip provider,

For example when someone dial my voip number it will answer, wait for extension and dial it, now everything works fine from voip to voip, but when i dial from PSTN line asterisk answer the call and wont accept extension.

Does anybody have idea?

my extension.conf

exten => myvoipnumber,1,Answer()
exten => myvoipnumber,2,Playback(welcome)
exten => myvoipnumber,3(instruct),BackGround(enter-ext-of-person)
exten => myvoipnumber,4,WaitExten(15|m)

i think you need to go back and re-read some of the extensions.conf basics.

in your incoming context, you need to define the extensions.

this line here

exten => myvoipnumber,3(instruct),BackGround(enter-ext-of-person)

isn’t even a valid line - (instruct) is not a command.

if you want to have an incoming IVR that allows users to dial extensions 100-109, do the following:

[code]
exten => myvoipnumber,1,Answer
exten => myvoipnumber,n,Background(welcome&enter-ext-of-person)
exten => myvoipnumber,n,Wait,15
exten => myvoipnumber,n,Hangup

exten => _10X,1,Dial(SIP/${EXTEN},15,rt)
exten => _10X,n,Voicemail(u${EXTEN})[/code]

we answer the line, playback the two sound files, wait 15 seconds, then hang up. if the user dials exten 100-109 (that is what _10X stands for), the call is routed to that SIP extension.

this is quick and dirty, but it gives you the idea, hopefully.

:smiley: that was copy-paste from template file

still wont accept extensions, as I wrote everything works from voip phones, bun no success from post.

no, that wasn’t a copy/paste from a template, i wrote that by hand to help you out.

how are you connecting to your ITSP? via SIP or IAX? in the appropriate config file, you should have a default context set up, and the code below needs to be in that context.

change ‘myvoipnumber’ to ‘s’ and try again…

you aren’t giving me ANY logging information - telling me it doesn’t work doesn’t help.

EDIT:

in your sip.conf or iax.conf, there should be a context=something line. in your extensions.conf, you should have a context called ‘something’ (same as what is in above line. let’s say you have it called ‘default’. you would want this in extensions.conf:

[code]
[default]
exten => s,1,Answer
exten => s,n,Background(welcome&enter-ext-of-person)
exten => s,n,Wait,15
exten => s,n,Hangup

exten => _10X,1,Dial(SIP/${EXTEN},15,rt)
exten => _10X,n,Voicemail(u${EXTEN})[/code]

if this doesn’t work, you need to post some output from your CLI

so it should be the DTMF issue.
Have you checked the dtmfmode of your provider?
refer this linkl:
voip-info.org/wiki-Asterisk+sip+dtmfmode

Thanks guys it was DTMF issue.

My provider is sunrise.ch and worked with dtmfmode=auto

and extension.conf

[default]
include => calls

[calls]
exten => myvoipnumber,1,Answer()
exten => myvoipnumber,n,Background(welcome&enter-ext-of-person)
exten => myvoipnumber,n,WaitExten(15|m)

Thanks again!

cu

Good that you have posted how it helped you.
It could be useful for others.