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?

No one has any ideas?

If this is all setup and working (somehow) in Asterisk 13 then you can build a brand new Asterisk 22 system (when Asterisk 22 is released which will be soon) then plug in the maintained version of chan_sip into that and then just copy all of the *.conf files over from the old Asterisk 13 system to the new Asterisk 22 system.

No need to attempt to translate whatever is going on in your existing chan_sip config to chan_pjsip.

You might also get more help by posting in Asterisk Community

For very very large (many thousands of extensions) installations or very unique/weird installations in Asterisk, it’s oftentimes easier to deal with that via editing config files instead of trying to deal with in a GUI under a web browser.

I have now found an approach, how can I integrate it into FreePBX so that it works?

exten=>_49mynumber10XXX,1,Dial(PJSIP/${EXTEN:-5}@myendpoint

For custom stuff like that which the FreePBX GUI does not handle, you have to put it into the custom config files.

Search the docs, here’s some links to get you started:

https://sangomakb.atlassian.net/wiki/spaces/PG/pages/20808046/Configuration+File+Editor+User+Guide

https://sangomakb.atlassian.net/wiki/spaces/FP/pages/11862323/Patching+Asterisk+11+for+Cisco+phones

Documentation is a bit scattered but it assumes you know Asterisk

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