To change the context of inbound calls for a specific trunk, the context needs to be defined in ‘Peer Details’ for the trunk in question.
Lots of errors in your dialplan. The extension is missing the leading underscore to indicate pattern matching, the goto line is missing the priority, the variable CALLERID(num) should be CALLERID(number), you are including a non-existent context, it should be from-pstn. Try this:
We are using FreePBX 188.8.131.52 in Germany, in Germany every Telephone Number has a leading 0, for example 0244XXXX.
In order of the change from our old ISDN phone system, my family wanted to keep an implementation with double 0 to make calls. So if they want to make a call they have to dial 00XXX.
Now our problem is that we can’t redial from the incoming calls because they only have one leading 0, now I’m trying to manipulate all incoming calls to add one 0, but I had no success with it even with Igatez example. Do you maybe had some idea? I would appreciate every hint
However, unless you have a strong reason to keep it, I recommend removing the requirement for the extra zero, as it causes many problems.
If you don’t make or receive many international calls, you could set up your system so the extra zero is permitted but not required for domestic calls (but would be still needed for international). That would make displayed domestic numbers easier to read, and would allow for passing the proper caller ID on forwarded calls.
What city are you in? (There are area codes begin with 0244 but have an additional digit.)
Thanks for the help, I already saw this post and tried to implement it without success. If I include the code the Operator is not able to forward calls to my Number. Something like the Trunk is not able to receive calls I must add include => from-pstn to be able to receive calls again. But it has no effect on the incoming caller number.
I know it would be a lot easier without the extra 0, and I tried to explain this and move my Family to accept this, but they don’t want it because of the way the old system worked, and they feel safer to not call accidentally an emergency number, I don’t really understand it.
Our initial number is 04408……. The other number was only an Example without any relation to us.
I’m guessing that the user part of SIP URI does not begin with a digit, either because the operator sends the called number as +494408xxxxxx, or because they put the user name there (and send the called number in the To header).
Try changing the custom dialplan in extensions_custom.conf like this:
If you still have trouble, paste the Asterisk log for a failed call at pastebin.freepbx.org and post the link here. Also, please post: who is the operator? What was the Context for your trunk, before changing it to prepend-zero?
In Hude, from a normal landline phone, you can call local numbers by dialing 4 to 6 digits, without an area code. Do you permit that on your system, either with or without an extra 0? If not, you can add an Outbound Route that permits dialing domestic numbers without the extra 0, while not affecting any of the formats you have now.
Someone visiting or working in your home (babysitter, plumber, etc.) might have an emergency but not be familiar with your system, so you should make sure that 112 and 0112 both work (and similarly for 110 and other emergency numbers). You should teach your family that if they accidentally do call an emergency number, they should not hang up and should explain to the dispatcher that they do not have an emergency and dialed the number by mistake. Once confirmed, they can hang up and be confident that the police or ambulance will not be sent.
Thank you Stewart it worked really well how I see it was only a little change in the code, sorry I’m not really familiarized with PBX systems I’m a lot better in Networking, and builded the FeePBX up with a lot of tutorials, it is a really complicated topic, I was able to solve every other Problem with google and I learned a lot in the Process. This was the only point I was not able to solve by myself so thank you again for the help.
Yes I’m allowing to make local calls without 04408…, they wanted me to implement it that they have to call here also with a 0 for example 05678 so Freepbx would call 044085678.
We implemented this system in the Family company, only persons with knowledge about it are present, most of our employees are with us for a lot of years and are familiarized with this from our old Phone system. They are really resistant against changes, my first implementation was without the leading 0 they make me change it after hours of discussion.
I don’t really know why this is a common way to implement systems here, I work for an company in Hamburg Germany, they opened an Store here 4 years ago, and installed an “Innova phone” phone system who also an extra 0 is needed and the emergency numbers are only reachable over 0112 or 0110. We have to train every new employee in that, and we receive a lot every Sommer for short periods.
I used the Code you give me, and it worked well for something like one day, now there a change in the way the incoming Phone numbers are displayed.
Before i implemented the code the caller Number was displayed like 0175… after implementation the Numbers was displayed like 00175… it was that what i wanted.
But now the caller id are Displayed like +49175… with the Code it was something like 0+49… it is normal i know because i`m adding a 0.
But i have no idea why the formatting of the caller id just changed.
There is a general trend for VoIP providers to use E.164 format, because it is unambiguous.
I don’t know why your trunking provider made the change. Possibly, they implemented a newer software package, merged with another company, or the Bundesnetzagentur required it.
If it’s not a problem for you to see numbers starting +49, you could take out the code to prefix a 0 and modify your outbound routes to accept numbers starting with +, in addition to the formats accepted now.
Alternatively, if you want to see numbers formatted the old way, you could modify the code to replace +49 with 00 and then + with 000.