Routing an +44 number to a specific outside number

So to start off with, I try and manage 4 asterisk phone servers. I learn more day by day.
However for my work i’ve rolled up on a problem. and ive searched far and wide for a solution.

A customer needs to receive a verification call from a robot.
Normally all phone traffic needs to pass trough an IVR but since this robot will start spilling out
numbers on the fly it wont press anything to get to the right guy.

So what i have so far, for a American number i got it working but now when i try and to the same with a +44 number it doesnt work or route correct.

It’s also hard to troubleshoot because i never get informed when they call or much later when im not able to find it back in the cli itself. is there a way i can search this more easy? for future referencing ofcourse.

A single digit substring will never match the two digit string “44”.

Assuming the “+” is erroneous and not actually present, the normal way of doing would be:

exten => s/_1.,n,Goto(whatsup)
exten => s/_44.,s,Goto(whastsup)
exten => s,s,Set(CALLERID....

If the “+” is real, it needs to immediately follow the _.

Thanks for your response, so i’ve been doing it all wrong then thanks!
However your last line you wrote, what does the second "s"refer to? shouldn’t that be a “n”
in this case? and since i specified the _1 to Goto(whatsup) what do i need to specify as your last rule ends in dots.

Sorry if i ask too much.

All three should end up with the same priority number. If I remember correctly, s means re-use the last priority, which achieves this. Asterisk will use the most specific match. You can use n-1 instead of s.

You can use sub-strings, but you need to match the right length and “ex-girlfriend” logic is more elegant in this context.

You could even call a subroutine with the callerid passed as the extension, and avoid the “s/” part.

Whilst there may be other ways of doing what you want, isn’t the problem here that you have only looked at the first digit to compare with 44 when you should be looking at 2 digits.

Yes. That’s what I said in the first sentence of my first answer and in the first half of the second paragraph in my second response.

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