Re-Routing Dialed External number to another external number

Hi All,

Spent all day researching and testing but with no real luck.

Appreciate the help.

I want to re-route premium numbers to their landline counterparts.

I tried to do this with dialplan rules and having been “fudging” my way along.

As it happens I have been able to replace the number with dialplan rules.
But it still wont work.

Eg. HSBC use 0845740404 to make us spend extra money to contact them. However 01226 261010 costs about 1/20th of the charge to get to the same place.

My CLI output shows that the number is replaced here:

-- Executing [[email protected]:6] GotoIf("SIP/501-0000041c", "0?match") in new stack
-- Executing [[email protected]:7] ExecIf("SIP/501-0000041c", "0?Set(TARGET_FLP_1=91666900441226261010)") in new stack

BUT Not Here:

-- Executing [[email protected]:13] Set("SIP/501-0000041c", "OUTNUM=08457404404") in new stack

And finally not here:

-- Executing [[email protected]:22] Dial("SIP/501-0000041c", "SIP/myprovider/08457404404,300,") in new stack

What am I doing wrong? Am I approaching the whole thing incorrectly.

Thanks so much for helping.


Several ways you can do this:

  1. create a ring group called 0845740404, put 01226261010# as the only entry in the ring group.
  2. Create a MISC destination called HSBC and put 01226261010# in the dial field. Then go to Misc Application put 0845740404 in the feature code and use Misc Destination HSBC as the destination.
  3. Create a custom extension 0845740404 and in the dial command put something similar to local/g0/01226261010. The exact syntax here would depend on your system. You should be able to determine the correct syntax by looking at the logs while you dial an outbound number.

Finally…all of this being said, depending on your system, I have known aasterisk to sometimes behave strangely when an extension or function begins with “0”.

Either what w5waf had suggested, or hack the number into the outbound route.
Old number in the “prefix” field, new number in “prepend”. In theory that should work.

Thanks so much for the advice.

Namezero - I did what you recommended originally - with no joy.

w5waf - just tried the Misc App/Destination option and nothing happens. Am I supposed to do anything else - ie link it in an outbound route.


Thanks again.

In case of any confusion this is solely for Outbound calling only.