Multiple Aliases Landing on Same SIP Extension

Hello,

I am trying to achieve the below on FreePBX:

  1. Create one SIP extension so that it may be registered from asterisk box.
  2. However the SIP extension can be called through multiple aliases on FreePBX internal extensions.

That means, extension 2000 will have aliases 2001 - 2020.

I tried creating Misc Application / Misc Destination / Virtual Extension using call forward. All of these help me achieve the same, however the SIP field always goes as:

To: sip:**2000**@myfreepbxip:5061;rinstance=5766668cc70158fd;transport=UDP;tag=0f4eb16d

But I want to achieve what could be achieved as by using equivalent of ‘channel originate sip/2000/2001’

Such a method gives sip To as

To: sip:**2001**@myphone:5062;tag=833428162

The idea being I want the SIP extension to know what DID number I am calling and therefore routing based on the same can be done there. Is there a way to do this?

Regards
Rajesh

Hi,
Can anyone advice on this me?

No, because you are going backwards.

The phone is notified of the DID that it was called on by the PBX as part of it’s normal course. If you route all of the DIDs in your machine to extension 2000, they will always be routed to extension 2000, no matter how circuitous a route you choose for them to get there.

Now, having said that, the calls will always know what DID they were called with, so rather than obsess on which extension is being called, look at the DID that is being called and differentiate your processes based on that.

Thanks. So do you mean with the above that I should continue with the Virtual Extensions and put Call Forwarding? With that, in the SIP headers I will also get the original DID called when the call gets forwarded to 2000?

Many thanks.

I have the following:

  1. Extension 22000 and 22001
  2. Misc Application 22020 and routed to extension 22001.

The SIP header has an additional parameter: Diversion that contains %2222020%22 i.e. “22020”. Refer screengrab below.

Is that the only way to find out? Is there no way for me to update the To Field?

Thanks in advance.

There is no extension 22001. You can’t divert to it, the system will simply rewrite the header back to the extensions actual extension number.

The extension is the extension. I’m not aware of any way that you can do what you are trying to do, nor do I understand what you are trying to do. At one point, you wanted to do something based on the Direct In Dialed (DID) number from your ITSP, but this has nothing to do with that.

Aliases are just aliases - the name of the phone doesn’t change. I don’t think you can get where you are going using this structure.

Explain again what you are trying to do, but this time don’t try to explain how you are trying to do it. What are your needs - don’t tell us what you are trying to build.

Think of it this way - you are trying to build a gigantic device that, in 50 years, will provide shade in your back yard. You want it to self build and be made of wood, but for some reason you don’t want to just plant a tree. This is what it sounds like you are trying to do right now.

Help us understand and we will help you discover a simple way to solve your problem.

:slight_smile: ok. let me try and explain again.

I am building an intermediate IVR box using FreePBX.

Structure:

  1. ITSP → FreePBX - IVR → Asterisk / Vicidial / 3rd Party Avaya / Genesys etc. box.
  2. FreePBX is registered to ITSP. Asterisk / Vicidial / 3rd Party is registered to FreePBX.
  3. Incoming call is received from ITSP and I will do IVR treatment based on IVR response, send call further to Asterisk / Vicidial / 3rd Party.

What I want:
4. When I send call based on IVR response to Asterisk / Vicidial / 3rd party, this call should be sent to individual numbers. Say, 2001 for response 1, 2002 for response 2, 2003 for response 3… However, I don’t want Asterisk / Vicidial / 3rd Party to have individual registration with FreePBX for 2001, another for 2002 and yet a third for 2003. Instead what I want is Asterisk / Vicidial / 3rd Party to register only using one account with FreePBX. And calls should be sent to this account using To:sip:2001@, sip:2002@…etc. This way Asterisk / Vicidial / 3rd party will be able to determine which call to send to which queue.

Regards

You want a SIP (or IAX2) peer trunk between the two PBXs.

1 Like

Hello, we will prefer using a SIP peer trunk.