Routing Problem FreePBX 17

Hi, I currently have the following problem.
I have an extension number, for example 10, and now I would like everything after 10, for example if 10123 is dialed, to land on extension 10. This also works so far by adding a router with _1234510XXX in the inbound routes where 12345 of course contains my correct number.

So how can I now read out at extension 10 which 3 digits after the 10 the call was intended for?

So far I can only see the SIP extension 10 in the trace and not the 10123, for example.

Waht can i do now?

Welcome to the forum!

You’re doing something rather unique here, and it’s not clear (to me) what the goal is. Giving a step by step description of what you want to happen might help.

Okay, I’ll try to describe it.

We have the number block 123456 with the extensions 000-99999

I now have an extension with extension 10 and would like everything that is called in extension 10, for example the number 10123, to be called to extension 10. I have intercepted this via an inbound route. But now I want the Asterisk to include the extension 10123 that was called and not just say that it was called from extension 10. So that I can read this behind it, so that I can also recognize the 10123 in the trace.

This scenario works somehow with an old Asterisk 13 system, but nobody knows how to set it up many years ago :frowning:

Perhaps it is better explained this way?

Is this for internal calls only?

So you want 10123 as the user part of the request URI?

This is easy to do in Asterisk but I’m not sure how you would do it with the GUI. The only change from Asterisk 13 should be the move to chan_pjsip. I would expect that would want to end up with something equivalent to the following except that it would have a lot more dialplan code, to deal with the FreePBX dialplan:

exten => _10.,1,Dial(PJSIP/${EXTEN}@10,…)

or

exten => _10.,1,Dial(PJSIP/${EXTEN}@${EXTEN:0:2},…)

I’m assuming that your basic problem is not knowing the syntax to override the request URI (and To URI) user part, with chan_pjsip.

That looks good, I try it as a user-defined extension, the FreePBX recognizes the call and if I call directly on the 10 there is also an announcement but if I then call on the 10123 there is only a busy, but the call appears in the system.

How should I understand the command for the user-defined extension?