Asterisk VoIP Routing

We use a SIP trunk connection and forward the extensions 44 and 45 incl. 3 further digits on his Astrisk 13 system, i.e. 100-999, and forward this with chan_sip to the DAHDI cards, e.g. the number 44 123 arrives on the DAHDI card.

Behind the DAHDI card is a server that outputs the last 3 digits of the extension, in my case 123, via a LAN capi and then forwards the whole thing.

Now we want to replace the DAHDI cards and chan_sip with a new Asterisk and switch completely to VoIP with pj_sip, but unfortunately there is a problem.

With SIP, only the 44 or 45 digits arrive at the CAPI and the last 3 digits are discarded.

I have already set the following in the Incomming Routes: _49(customer number)44XXX

Do I perhaps have to have my own extension here so that the Asterisk sends the stream accordingly, or what can I do here?

On Tuesday 12 November 2024 at 17:29:28, Vvsta via Asterisk Community wrote:

I have already set the following in the Incoming Routes

Your use of the phrase “Incoming routes” makes me suspect you are using
FreePBX.

If this is the case, their support forum is at https://www.pbxforums.com

FreePBX is a project which has built a whole management front-end onto
Asterisk, as well as developing complex dialplans, so you’re best off asking
the people who did that (or are familiar with using it).

If you’re not using FreePBX, then please show us the relevant parts of your
dialplan, which dials the call out to its destination, and show us the SIP
packet capture which shows only “44” or “45” and not the additional 3 digits.

Feel free if you wish to upload this information somewhere and provide a link,
instead of just copying and pasting large amounts of text here, but please do
use text and do not send screenshots.

Antony.


Was ist braun, liegt ins Gras, und raucht?
Ein Kaminchen…

                                               Please reply to the list;
                                                     please *don't* CC me.

That’s actually the wrong link, the FreePBX forum is at https://community.freepbx.org/

On Tuesday 12 November 2024 at 17:53:38, jcolp via Asterisk Community wrote:

That’s actually the wrong link, the FreePBX forum is at
https://community.freepbx.org/

Oops :slight_smile:

Thanks for the correction.

Antony.


“Measuring average network latency is about as useful as measuring the mean
temperature of patients in a hospital.”

  • Stéphane Bortzmeyer

                                                Please reply to the list;
                                                      please *don't* CC me.
    

Well, I have already asked the question in the FreePBX forum, where I was referred to the Asterisk Community Forum.

But it doesn’t matter whether it’s FreePBX or Asterisk, I’ve tried both and always fail at this point.

How can I do this, I have an old Asterisk with DAHDI cards here, which excludes the extension. I just want to get this working with SIP, with Asterisk.

I don’t remember seeing this on the FreePBX forum. There are no routes in Asterisk and the 100s of lines code that FreePBX uses can be reduced to two lines, in simple cases, the context name line and one invoking the Dial() application.

Could you link to the FreePBX forum posting, so I can understand why you’ve been referred to the Asterisk one.

I think we are going to need the packet capture and the full log with verbosity at least three, but from a minimal Asterisk dialplan, not the 100s of lines from FreePBX.

Here is the link to the FreePBX Forum:

I am looking for a way to get the evaluation here so that not only extension 44 and 45 are always sent in the trace.

The Asterisk for this is something like:

[(source context)]
exten=>_49(customer number)44XXX,1,Dial(PJSIP/${EXTEN:-5}@(Trunk endpoint)

or, if you want both 44 and 45:

exten=>_49(customer number)4[45]XXX,1,Dial(PJSIP/${EXTEN:-5}@(Trunk endpoint)

If this doesn’t work, you would need to use pjsip set logger on, to confirm that not all five digits were went.

Thank you very much!
In the case of FreePBX, this must now be in a Custom extension? But then I get an error in the inbound routes :frowning:

As written, it would need to be taken out of FreePBX entirely, by putting it in its own context, and making that the initial context for the calling line.

Otherwise you need to take this back to the FreePBX forum, with detailed logging to show how their dialplan handles the number and what is actually sent to the other system.

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