Dial patterns outgoing route

In my country I need to prepend specified prefix for emergency numbers eg. 112

my dialpatterns looks like that

but freepbx don’t support letter C in prepend.

I’ve managed to add it into mysql database and reload freepbx it work’s but I cannot change anything because of incorrect patter message.

Is there any solution for that ???

OK, I will ask. What is the need for the C?

I have no idea :smile:

It looks like 32 - national city prefix and C120 - routing number (but I’m not sure)
It is used to redirect 112 call to specified city.
I have several numbers with C letter police / ambulance / fire station

Do the phones in your country have 16 buttons?
how do you call emergency numbers from your normal phones?
It is generally recommended to send such calls through a land-line, is that an option for you?

I call 112 but I MUST add 32C120 to my outgoing rute via sip trunk to achieve local emergency call.

Don’t You read what I wrote ???
I have to PREPEND a prefix to 112 number on phone i press 1 1 2 but via trunk it is send 32c120112
There is no other way to send it.
I don’t have posibility to use other analog line or sth.

Yes I read what you said!! That is why I asked those questions DTMF A-D are legitimate codes it’s just that few phones can dial them usually just the SS7 inter-carriers so they are not appropriate for SIP, nonetheless . . .

You will could write a “pre-dial hook” to mangle your dialing depending on which city your various phones are in to suit your carriers peculiarities, but you are indeed you are in a very small minority, so few will get excited about your problem.

1 Like

You are going to have to custom code it, there are hooks for that.

I too am curious about the application.

Does Poland have some odd PSTN system I am not aware of? I have a good buddy that worked on the Hungarian PSTN from the 60-80’s so these are not idle questions.

Dicko worked at the British Post Office since they strung the first telegraph wires and had a nooner with the Lady Elizabeth in the royal wiring closet.

You posed the most interesting question to come along in a long time, don’t get all jumpy when the two old farts in the forum ask you why.

You can view our number tabels on UKE website
for 112 number: uke.gov.pl/tablice-numerow-kierowania-alarmowego-nka-9410

And there U will find number tables in wich you can see my problem.
each city has it’s own Emergency center and when I dial 112 my asterisk must send
WSN d. 32 wyróżnik HEX C IDL AUS AL 170 NR AUS AL 112 all these thing give us 32C170112
and after that my 112 call is being directed to choosen Emergency center.
I live in Silesia so my nearest Emergency Center is in Katowice so 32C170112 but a person who is living in Warsaw will use 22C700112 for the nearest Emergency Center in Warsaw.

So, perhaps do as two people have now suggested, write your custom hook to mangle your outbound calls no??? . The “mangle” will have to handle all of your extensions in any city you provide service in to suit the prevaricates of your provider and apparently the requirements of your " art. 20 paragraph. 1 of the Act of 22 November 2013"

(As you can see, I have read your link !!! , but I am pretty sure no-one here has a “C” key on their phone so if that is how it works in Poland, and you care not to take US help, then you will need to find Polish help.)

You didn’t understand me … we dial 112 but my asterisk has to put 32C170 in front of 112 dialed by the phone in my city area.
End user don’t know anything about 32C170 he just dial 112

I had to put on asterisk in 2 days from zero to working envoirnment so I’ve added it via MySQL database and it worked in outgoing route.
And now when I have working asterisk I can work on it and correct my errors (don’t ask me why in this way :slight_smile: )

And don’t get annoyed about my previous posts :smile:
For now I have sth like this.

So I will have to write custom hook on it and then I will have to add my extensions to use this hook ???

I DO understand you, and you have found a workaround, so either patch the FreePBX code to allow A-D as well as 0-9 on that page or don’t rely on the GUI to honor any changes. You could submit a feature request to FreePBX.

One problem being that you will need to route each extension to a different route depending on it’s physical location, a custom hook could do that automatically by looking at the area code of the CallerID of the extension and looking up the appropriate prefix.

I saw that problem when You wrote about it :slight_smile:
Thanks for giving a tip.

One more question “custom hook” I must write in asterisk config files or there is place in freepbx gui ??

You do it all outside the GUI.