Strange dialplan execution

Hello everyone,
I have 3 inbound numbers with my asterisk.
There is a very strange thing with two numbers : 01.
02 and 03 are working perfectly.

There is my dialplan :

exten => s,1,Ringing
same = n,Dial(PJSIP/01,60)
same = n,HangUp()

exten => s,1,Ringing
same = n,Dial(PJSIP/02,60)
same = n,HangUp()

exten => s,1,Ringing
same = n,Dial(PJSIP/03,60)
same = n,HangUp()

My SIP trunks are registered when i do pjsip show registrations.

But when I call 01, the 02 is ringing.
When I call 02 or 03, it’s working perfectly, 02 is ringing when I call 02 and 03 is ringing when I call 03.

When I call 01, Asterisk try always to reach 02, even if I delete all the dialplan.
I really dont understand why it’s doing this.
I restarted / reloaded asterisk after each manipulation.

These are contexts, not numbers!

As this will be a case of the wrong endpoint matching, so there is no way we can help without the contents of your channel technology configuration file, presumably pjsip.conf.

My guess is that all three share the same IP address and there isn’t enough to separate them. This may or may not be possible. Running multiple trunks over the same physical path is never a good idea.

Exactly, the 01 and 02 are on the same IP/Domain.
Is there a solution to solve this ? we are with OVH as inbound trunk.
For example there is the 02 registration file :

;;; 02 TRUNK

type = endpoint
transport = transport-udp
aors = 02
outbound_auth = 02-auth
context = 02
type = aor
contact =
qualify_frequency = 15
type = auth
auth_type = userpass
username = 02
password = xxxxxxx
type = registration
transport = transport-udp
outbound_auth = 02-auth
server_uri =
client_uri =
type = identify
endpoint = 02
match =

I have exactly the same config for 01.
I just make #include in pjsip.conf

You are matching IP on “exactly the same” domain name on each one. I’m not surprised. You might get somewhere with the line= parameter, if they support it.

However, do you really need three accounts, rather than one account with three numbers? The latter is normally the better way of doing it. Typically the original PSTN number ends up in the To header.

Currently numbers were on three different accounts, that’s the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.