Getting error that is , number is not in service

Hello team,
Am a beginner in asterisk ,
actually am installed asterisk and done the configuration ,but when i call from softphone to mobile i getting error that is --number is not in service
below i mansion my configuration and error details and status,
sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status DescriptionaYes 22414 OK (979 ms)
ext-sip-account/72523135 ip Yes No 5060 OK (199 ms)

sip show users
Username Secret Accountcode Def.Context ACL Forcerport
ext-sip-account passwd from-voip-provi No Yes
100 MyPass from-sip-extern No Yes

sip show registry
Host dnsmgr Username Refresh State Reg.Time N username 105 Registered Mon, 02 Feb 2015 16:50:20


; Calls to ext 100
exten => 100,1,Dial(SIP/100,20)
exten => 100,n,VoiceMail(100,u)
exten => 100,n,Hangup
exten => 0091NXXXXXXXXX,1,Dial(SIP/${EXTEN}@ext-sip-account) # also i try without 00
exten => 0091NXXXXXXXXX,n,Hangup

;exten => 18885556266,1,Dial(SIP/777)[from-voip-provider]
;exten => 18885556266,1,Dial(SIP/777)

externhost=ip address
nat=force_rport,comedia instead
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
;; ext 100

nat=force_rport,comedia instead

getting error that is , number is not in service

– Executing [00918136807366@from-sip-external:1] NoOp(“SIP/100-00000017”, “Received incoming SIP connection from unknown peer to 00918136807366”) in new stack
– Executing [00918136807366@from-sip-external:2] Set(“SIP/100-00000017”, “DID=00918136807366”) in new stack
– Executing [00918136807366@from-sip-external:3] Goto(“SIP/100-00000017”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“SIP/100-00000017”, “1?checklang:noanonymous”) in new stack
– Goto (from-sip-external,s,2)
– Executing [s@from-sip-external:2] GotoIf(“SIP/100-00000017”, “0?setlanguage:from-trunk,00918136807366,1”) in new stack
– Goto (from-trunk,00918136807366,1)
– Executing [00918136807366@from-trunk:1] Set(“SIP/100-00000017”, “__FROM_DID=00918136807366”) in new stack
– Executing [00918136807366@from-trunk:2] NoOp(“SIP/100-00000017”, “Received an unknown call with DID set to 00918136807366”) in new stack
– Executing [00918136807366@from-trunk:3] Goto(“SIP/100-00000017”, “s,a2”) in new stack
– Goto (from-trunk,s,2)
– Executing [s@from-trunk:2] Answer(“SIP/100-00000017”, “”) in new stack
– Executing [s@from-trunk:3] Log(“SIP/100-00000017”, “WARNING,Friendly Scanner from”) in new stack
[Feb 2 16:19:45] WARNING[17698][C-000001ad]: Ext. s:3 @ from-trunk: Friendly Scanner from
– Executing [s@from-trunk:4] Wait(“SIP/100-00000017”, “2”) in new stack
– Executing [s@from-trunk:5] Playback(“SIP/100-00000017”, “ss-noservice”) in new stack
– <SIP/100-00000017> Playing ‘ss-noservice.ulaw’ (language ‘en’)
– Executing [s@from-trunk:6] SayAlpha(“SIP/100-00000017”, “00918136807366”) in new stack
– <SIP/100-00000017> Playing ‘digits/0.ulaw’ (language ‘en’)
– <SIP/100-00000017> Playing ‘digits/0.ulaw’ (language ‘en’)
== Spawn extension (from-trunk, s, 6) exited non-zero on ‘SIP/100-00000017’
– Executing [h@from-trunk:1] Hangup(“SIP/100-00000017”, “”) in new stack
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/100-00000017’

You are getting that error because of something your GUI’s dialplan is doing; we don’t support GUI dialplans here.

However, I suspect you are in the allowguest=yes fallback processing because the peer has not been recognized.

(Incidentally, I am not sure that “insecure=very” is recognized by any currently supported version of Asterisk.

Hi team,

Thanks for the reply ,

Yes there have lot of dail plan and i removed all the dial plan without previously mentioned .

but currenlly i getting defferent error , that is chan_sip.c:25791 handle_request_invite: Call from ‘100’ ( to extension ‘00971505085007’ rejected because extension not found in context ‘from-sip-external’

but this option only seems in /etc/asterisk/sip_general_additional.conf

Please advice me ,

Ask on the forum that supports the GUI, e.g. for FreePBX.

Hi david55,

No am not using GUI , and freepbx , could u plz help me about my issue , am stuck on this problem,
if you help me that wold be appreciated.


Please post your complete dialplan, as the trace you have posted appear to indicate that you are using a GUI. Alternatively, throw away your configuration and start over from first principles. If starting over, use a currently supported version and make sure you don’t use deprecated or obsolete options, like insecure=very.

If you have any #includes in your configuration files, you need to consult the person who wrote those files, as it is likely that they will be too large and complex to be debugged on a peer support forum.

At the moment it is clear, from the trace, that you have a context called from-sip-external and it appears that it can be reached from the context called others, but the files that you have provided are missing that information. “from-sip-external” sounds very FreePBX like!

I would also note that allowguest is generally a bad idea, although I think your incoming calls will fail even earlier, without it. My guess is that the ITSP is originating from an address other than the one used for outgoing calls, in which case, if they are using a wide range of addresses, allowguest may be the only option, but, in that case, it will need to specify your, untrusted, context for incoming calls.

Basically, the source IP of the call doesn’t match the ip in host=ip, so the ext-sip-account section isn’t matching. You are therefore going to the default context (others), from the general section, because you have allowguest=yes. This is magically then transferring to a context called from-sip-external, which seems to have appeared from nowhere.

Hi devid ,

Thanks for help, i added from-sip-external , that problem resolved .

Currently sip provider recommend use Codec g729,so i try to install that module , but i getting error that is
[Feb 4 13:03:25] WARNING[7353]: loader.c:523 load_dynamic_module: Error loading module ‘’: /usr/lib64/asterisk/modules/ wrong ELF class: ELFCLASS32
[Feb 4 13:03:25] WARNING[7353]: loader.c:1032 load_resource: Module ‘’ could not be loaded.

i try different moulder from asterisk site , like 64 bit 32 bit, processor core and intel , getting same error , also i did not get matching module from site ,
my cpu details are mansion below
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 2
model name : QEMU Virtual CPU version 1.4.0
stepping : 3
cpu MHz : 1999.999
cache size : 4096 KB
fpu : yes
fpu_exception : yes
cpuid level : 4
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm up rep_good unfair_spinlock pni vmx cx16 popcnt hypervisor lahf_lm
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

linux centos 64 bit

plz advice me which modular i need to use .


To the best of my knowledge, that codec is a supported** commercial product, from Digium, in which case you should request support from Digium, not the open source community.

However, it looks like you have tried to load a 32 bit build of the codec DLL from a 64 bit Asterisk binary.

I assume you are aware that you will need to buy a licence before you can actually use it.

** Even though they disclaim warranty.

Hi Dadid,

Thanks for valuable advice ,

I download and install g729 codac and it working fine ,
now my dail plan just working for dubai only , i need to call different countries like call to us , its for i just need to add more dail plan ?

can u plz give me a sample dail plan please ,
below i mentioned my dail plan ,

exten => _971[1-9].,1,Dial(SIP/${EXTEN}@ext-sip-account)
exten => _971[1-9].,n,Hangup

Shufil … onf.sample … asics.html