Hello Asterisk Guru’s,
Wondering if someone could help me please. I’ve setup a very simple Asterisk 1.8.4.1 asterisk installation (uses asterisk management system gui) on my qnap nas box. I have created 4 extensions (100,200,300,400) and can dial between them, I’ve setup my cisco 7970G on ext300.
I’ve bought credit from voipdiscount and want to integrate this into the configuration, however it seems I’ve got something wrong with my config as get the following error if I try to dial the number in any of the UK formats;
Got a feeling that it is due to my dial plan or configuration, but am baffled by this, and would really appreciate any help to resolve as do a lot of conference calls from home and would prefer not to tie up the home number. I’ve stripped down the files as the original ones were annotated and several pages long.
Couple of notes:
I’m a uk reside with an area code 01932 (not my real one but same number of digits).
I’m hoping that I can dial the uk domestic number i.e. ‘02074963743’ rather than the full international number.
I’ve replaced the sensitive data with <> format
Thanks in advance.
Regards, Adrian.
[Sep 2 11:39:25] NOTICE[27212]: chan_sip.c:21619 handle_request_invite: Call from ‘300’ to extension ‘02074963743’ rejected because extension not found in context ‘users’.
[Sep 2 11:39:57] NOTICE[27212]: chan_sip.c:21619 handle_request_invite: Call from ‘300’ to extension ‘00442074963743’ rejected because extension not found in context ‘users’.
[Sep 2 11:41:17] NOTICE[27212]: chan_sip.c:21619 handle_request_invite: Call from ‘300’ to extension ‘442074963743’ rejected because extension not found in context ‘users’.
QNAP*CLI> dialplan show globals
OUTBOUND-TRUNKMSD=1
OUTBOUND-TRUNK="Zap/g2"
IAXINFO-AEL=guest
CONSOLE-AEL="Console/dsp"
TRUNKMSD=1
TRUNK=DAHDI/G2
IAXINFO=guest
CONSOLE=Console/dsp
-- 8 variable(s)
QNAP*CLI>
++++++++++++++++++++++++++++
SIP.CONF
++++++++++++++++++++++++++++
[general]
context = default ; Default context for incoming calls
allowoverlap = no ; Disable overlap dialing support. (Default is yes)
tcpenable = no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr = 0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
srvlookup = yes ; Enable DNS SRV lookups on outbound calls
externhost = <>.dyndns.org
externrefresh = 900
disallow = all
allow = ulaw
localnet = 172.16.32.0/24
register => <>:<>@sip.voipdiscount.com
[voipdiscount-out]
type=peer ; we only want to call out, not be called
remotesecret=<> ; Our password to their service
defaultuser=<> ; Authentication user for outbound proxies
host=sip.voipdiscount.com
busylevel=2 ; Signal busy at 2 or more calls
outboundproxy=sip.voipdiscount.com ; send outbound signaling to this proxy, not directly to the peer
[authentication]
basic-options ; a template
dtmfmode=rfc2833
context=from-office
type=friend
natted-phone ; another template inheriting basic-options
nat=yes
directmedia=no
host=dynamic
public-phone ; another template inheriting basic-options
nat=no
directmedia=yes
my-codecs ; a template for my preferred codecs
disallow=all
allow=ilbc
allow=g729
allow=gsm
allow=g723
allow=ulaw
ulaw-phone ; and another one for ulaw-only
disallow=all
allow=ulaw
[100]
type=friend
host=dynamic
secret=100
context=users
mailbox=100@default
[200]
type=peer
host=dynamic
secret=200
context=users
mailbox=200@default
[300]
type=friend
host=dynamic
secret=300
context=users
mailbox=300@default
[400]
type=friend
host=dynamic
secret=400
context=users
mailbox=400@default
++++++++++++++++++++++++++++
extensions.conf
++++++++++++++++++++++++++++
[general]
static=yes
writeprotect=no
clearglobalvars=no
userscontext=default
[globals]
#include “ams_ext.conf”
[macro-phone]
exten => s,n,Dial(SIP/voipdiscount-out/44${NUM:1},180,T)
exten => s,1,Dial(SIP/${MACRO_EXTEN},25)
exten => s,n,Goto(${DIALSTATUS},1)
exten => ANSWER,1,Hangup
exten => CANCEL,1,Hangup
exten => NOANSWER,1,Voicemail(${MACRO_EXTEN}@default,u)
exten => BUSY,1,Voicemail(${MACRO_EXTEN}@default,b)
exten => CONGESTION,1,Voicemail(${MACRO_EXTEN}@default,b)
exten => CHANUNAVAIL,1,Voicemail(${MACRO_EXTEN}@default,u)
exten => a,1,VoicemailMain(${MACRO_EXTEN}@default)
[users]
exten => s,n,Dial(SIP/voipdiscount-out/44${NUM:1},180,T)
exten => 100,1,Macro(phone)
exten => 200,1,Macro(phone)
exten => 300,1,Macro(phone)
exten => 400,1,Macro(phone)
exten => 500,1,Macro(phone)
exten => 4242,1,VoicemailMain(default)
[default]
include => users
include => macro-phone
[time]
exten => _X.,30000(time),NoOp(Time: ${EXTEN} ${timezone})
exten => _X.,n,Wait(0.25)
exten => _X.,n,Answer()
exten => _X.,n,Set(FUTURETIME=$[${EPOCH} + 12])
exten => _X.,n,SayUnixTime(${FUTURETIME},Zulu,HNS)
exten => _X.,n,SayPhonetic(z)
exten => _X.,n,SayUnixTime(${FUTURETIME},${timezone},HNS)
exten => _X.,n,Playback(spy-local)
exten => _X.,n,WaitUntil(${FUTURETIME})
exten => _X.,n,Playback(beep)
exten => _X.,n,Return()
[ani]
exten => _X.,40000(ani),NoOp(ANI: ${EXTEN})
exten => _X.,n,Wait(0.25)
exten => _X.,n,Answer()
exten => _X.,n,Playback(vm-from)
exten => _X.,n,SayDigits(${CALLERID(ani)})
exten => _X.,n,Wait(1.25)
exten => _X.,n,SayDigits(${CALLERID(ani)}) ; playback again in case of missed digit
exten => _X.,n,Return()
QNAP*CLI> dialplan show users
[ Context ‘users’ created by ‘pbx_config’ ]
‘100’ => 1. Macro(phone) [pbx_config]
‘200’ => 1. Macro(phone) [pbx_config]
‘300’ => 1. Macro(phone) [pbx_config]
‘400’ => 1. Macro(phone) [pbx_config]
‘4242’ => 1. VoicemailMain(default) [pbx_config]
‘500’ => 1. Macro(phone) [pbx_config]
-= 6 extensions (6 priorities) in 1 context. =-
QNAP*CLI>
QNAP*CLI> dialplan show macro-phone
[ Context ‘macro-phone’ created by ‘pbx_config’ ]
‘ANSWER’ => 1. Hangup() [pbx_config]
‘BUSY’ => 1. Voicemail(${MACRO_EXTEN}@default,b) [pbx_config]
‘CANCEL’ => 1. Hangup() [pbx_config]
‘CHANUNAVAIL’ => 1. Voicemail(${MACRO_EXTEN}@default,u) [pbx_config]
‘CONGESTION’ => 1. Voicemail(${MACRO_EXTEN}@default,b) [pbx_config]
‘NOANSWER’ => 1. Voicemail(${MACRO_EXTEN}@default,u) [pbx_config]
‘a’ => 1. VoicemailMain(${MACRO_EXTEN}@default) [pbx_config]
‘s’ => 1. Dial(SIP/${MACRO_EXTEN},25) [pbx_config]
2. Goto(${DIALSTATUS},1) [pbx_config]
-= 8 extensions (9 priorities) in 1 context. =-
QNAPCLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
sip.voipdiscount.com:5060 N <> 105 Registered Mon, 02 Sep 2013 11:56:59
1 SIP registrations.
QNAPCLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
100 (Unspecified) D 0 Unmonitored
200 (Unspecified) D 0 Unmonitored
300/300 172.16.32.199 D 5060 Unmonitored
400/400 (Unspecified) D 0 Unmonitored
voipdiscount-out/<> 77.72.169.134 5060 Unmonitored
5 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 3 offline]
QNAP*CLI>