Unable to Receive calls

Hello guys I hope you will be able to help me i have setup 2 systems under the same ISP provider. the one i added 2 phone registrations and to the other 5. the one with the 5 numbers im unable to receive any calls. here are the configuration files:

[outer]
exten=>_xxxxx900,1,NoOp(Incoming call to public number xxxxx900)
same=> n,GoTo(outer,0900,1)
same=> n,Hangup()
exten=>_0900,1,NoOp(Transfered from public context to local extension 0900)
same=> n,Dial(PJSIP/${EXTEN},180)
same=> n,Hangup()
exten=>_xxxxx901,1,NoOp(Incoming call to public number xxxxx901)
same=> n,GoTo(outer,0901,1)
same=> n,Hangup()
exten=>_0901,1,NoOp(Transfered from public context to local extension 0901)
same=> n,Dial(PJSIP/${EXTEN},180)
same=> n,Hangup()
exten=>_xxxxx903,1,NoOp(Incoming call to public number xxxxx903)
same=> n,GoTo(outer,0903,1)
same=> n,Hangup()
exten=>_0903,1,NoOp(Transfered from public context to local extension 0903)
same=> n,Dial(PJSIP/${EXTEN},180)
same=> n,Hangup()
exten=>_xxxxx950,1,NoOp(Incoming call to public number xxxxx950)
same=> n,GoTo(outer,0950,1)
same=> n,Hangup()
exten=>_0950,1,NoOp(Transfered from public context to local extension 0950)
same=> n,Dial(PJSIP/${EXTEN},180)
same=> n,Hangup()
exten=>_xxxxx999,1,NoOp(Incoming call to public number xxxxx999)
same=> n,GoTo(outer,0999,1)
same=> n,Hangup()
exten=>_0999,1,NoOp(Transfered from public context to local extension 0999)
same=> n,Dial(PJSIP/${EXTEN},180)
same=> n,Hangup()
exten=> 100,1,Answer()
same=> n,Wait(1)
same=> n,Playback(hello-world)
same=> n,Hangup()
exten=> _X.,1,Verbose(1, “Didn’t match any restricted numbers, proceeding with outbound dial.”)
same=> n,Set(CALLERID(num)=xxx${CALLERID(num)})
same=> n,Dial(PJSIP/${EXTEN}@trunk-prime-endpoint-${CALLERID(num)})
same=> n,Hangup()

trunk-prime-endpoint-xxxxx900
from_user = xxxxx900

trunk-prime-endpoint-xxxxx901
from_user = xxxxx901

trunk-prime-endpoint-xxxxx903
from_user = xxxxx903

trunk-prime-endpoint-xxxxx950
from_user = xxxxx950

trunk-prime-endpoint-xxxxx999
from_user = xxxxx999

[trunk-prime-id-tmpl]!
type = identify
match = 00.00.000.00 Proxy IP

trunk-prime-id-xxxxx900
endpoint = trunk-prime-endpoint-xxxxx900

trunk-prime-id-xxxxx901
endpoint = trunk-prime-endpoint-xxxxx901

trunk-prime-id-xxxxx903
endpoint = trunk-prime-endpoint-xxxxx903

trunk-prime-id-xxxxx950
endpoint = trunk-prime-endpoint-xxxxx950

trunk-prime-id-xxxxx999
endpoint = trunk-prime-endpoint-xxxxx999

[internal-ext-auth-tmpl]!
type = auth
auth_type = userpass

[internal-ext-aor-tmpl]!
type = aor
max_contacts=10

0900
type=endpoint
auth = 0900
aors = 0900

0900
password = user_pass
username = 0900

0900

0901
type=endpoint
auth = 0901
aors = 0901

0901
password = user_pass
username = 0901

0901

0903
type=endpoint
auth = 0903
aors = 0903

0903
password = user_pass
username = 0903

0903

0950
type=endpoint
auth = 0950
aors = 0950

0950
password = user_pass
username = 0950

0950

0999
type=endpoint
auth = 0999
aors = 0999

0999
password = user_pass
username = 0999

0999

First off - you can’t have multiple identify sections with the same IP address. The only thing that identify allows you to do is match based on IP address, there is nothing to differentiate the different calls. They all need to go to the same context. As well you need to do some basic troubleshooting - do you see anything on the console? Is traffic reaching Asterisk? What happens on an inbound call?

thanks a lot for the info Jacob. Im able to do phone calls, I can call from any extension to the other but once i call to the system i receive the following:
May 16 23:32:50 comms asterisk[16933]: [May 16 23:32:50] #033[1;31mWARNING#033[0m[9731]: #033[1;37mres_pjsip_endpoint_identifier_ip.c#033[
0m:#033[1;37m233#033[0m #033[1;37mip_identify#033[0m: Identify section ‘trunk-prime-id-tmpl’ points to endpoint ‘’ but endpoint could not
be looked up
May 16 23:32:50 comms asterisk[16933]: [May 16 23:32:50] #033[1;33mNOTICE#033[0m[9731]: #033[1;37mres_pjsip/pjsip_distributor.c#033[0m:#03
3[1;37m526#033[0m #033[1;37mlog_failed_request#033[0m: Request ‘INVITE’ from ‘<sip:call phone@xx.xxx.xxx.xx;pstn-params=8084828088>’ failed
for ‘Ip Address:5060’ (callid: 218244732_95332518@xx.xxx.xxx.xx) - No matching endpoint found
May 16 23:32:50 comms asterisk[16933]: [May 16 23:32:50] #033[1;31mWARNING#033[0m[9731]: #033[1;37mres_pjsip_endpoint_identifier_ip.c#033[
0m:#033[1;37m233#033[0m #033[1;37mip_identify#033[0m: Identify section ‘trunk-prime-id-tmpl’ points to endpoint ‘’ but endpoint could not
be looked up

Do you have it defined as:

[trunk-prime-id-tmpl](!)

yeah this is how it looks like:
trunk-prime-endpoint-(each phone number goes here)
from_user = (each phone number goes here)

[trunk-prime-id-tmpl]!
type = identify
match = xx.xxx.xxx.xx sip foes here regarding the ISP

trunk-prime-id-(each phone number goes here)
endpoint = trunk-prime-endpoint-(each phone number goes here)

Please use the “preformatted text” button when posting configuration, otherwise some parts may be eaten.

sorry about it!
i hope that this is a bit better.
trunk-prime-endpoint-(each phone number goes here)
from_user = (each phone number goes here)

[trunk-prime-id-tmpl]!
type = identify
match = xx.xxx.xxx.xx sip foes here regarding the ISP

trunk-prime-id-(each phone number goes here)
endpoint = trunk-prime-endpoint-(each phone number goes here)

So, like I said you can’t do that. You can’t have multiple with the same match. It won’t work. You need to have one identify section for the IP address and send it to a single context. In that context route it accordingly.

the problem is that i have 100 extensions under one IP
is there any other way to do it?

The only way to know would be if the incoming call gave you that information. If it does then it’ll go into the dialplan at that extension, if not and there is no identifying information in the INVITE - then no.

so it will be better to try get the call and then sent it to the specific extension and not use the
[trunk-prime-id-tmpl]!

Identification determines who is calling and where to send them. It doesn’t control the extension they are calling. Just create a single type=identify, send it to a context, and see what happens for each call. That’s the quickest way to test and see.

it means that i need to read more since im a newbie.
Thanks for the help. ill check it and let you know about the resaults

This generally happens if you buy lots of single user accounts from an ITSP that sells services to single phones, rather than a proper direct in dialing connection form an ITSP that provides services for PBXes.

I suspect you have a domestic/SOHO supplier, when you want an SME supplier. (Sole owner, home office; small to medium enterprise.)

the specific package has 100 numbers and 8 concurrent calls for the price of €15 per month

In that case, it is going to be either a centrex solution (they act as the PBX), or A DID one. In the latter case, one would expect them to provide the dialled digits, and you to register only once…