How to do a re-route of DID in the freePBX?


I was trying to re-route a DID incoming thru SIP to the freePBX.

Incoming call to freePBX.
freePBX to re-route the SAME DID dialed (SIP To field) to another route.

But the problem here is how to send the same DID received by the freePBX to another route?

Appreciate your help, I’m still a newbie here.

Im referring to sending the call to another route via SIP (external from freePBX).
So, it is something like the DID number comes in to the free-PBX and then the free-PBX will route it to external (SIP) using the same DID number dialed by the Caller.

Have you looked into using FollowMe to route a call to an external number?
You might have to set up a dumbie extension that would not be answered and immediately go to the FollowMe.

It seems like you would tie up the DID doing this though. I am curious as to why you want to route this way.

Hi! Thanks for your reply.

The problem with follow-me is that I will be using an external number to route it.
What I want to do is to use the same DID number I dialed, comes in to the PBX and sent it out with the same DID I received.

Do you have an idea how to do this even in the extensions_custom.conf?


In etc/asterisk/extensions_custom.conf

exten => _21255560XX,1,Dial(SIP/out_trunk/${EXTEN},60)
exten => _21255560XX,2,Hangup()

out_trunk = the trunk name of the egress trunk (case sensitive)

The 60 is the ring timeout.

You can put as many of these together as you wish.

Don’t forget to reload with amportal restart after making the changes.