Yealink Forums

Full Version: Automatically prepend 9 when dialing from call history
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

We would like to know if it's possible to have our Yealink SIP-T46G handsets automatically prepend a 9 when dialling a number from the call history screen (e.g. Missed, Placed, Received, Forwarded).

The problem is that our PBX is set up so that we must add 9 to the number we want to dial so that it will dial outside of our office, but when the numbers are dialled from the call history screen it attempts to dial the numbers directly without 9 prepended. If we use the dial plan "replace" rules (prefix = "(.)", replace = "9$1"), we can sort of work around this, however it also removes the requirement that the user first dials 9 to dial external numbers.

Our PBX is Elastix 2.4.0 (Asterisk 11.10).

Any suggestions or advice is appreciated. Thank you.
is there an issue with the asterick not requiring a 9?
Or conversely, why not simply have the Inbound routes on the Elastix box prepend a 9 to the callerID number? that way the phone sees the external calls exactly as a user would have to dial them. In my mind that makes the most sense as it really should be handled at the PBX level rather than the individual set level (since the PBX knows what is an internal call VS and external one, while the phone really doesn't).
Hi ictc,

If the length of internal number and external number are different, you can try below steps´╝Ü
For example, the internal number is 8523, and external number length is more than 4 digits. Like 720685984.
So you can set prefix:(xxxxxxxxx), replace:9$1
Then if you dial number length is not 7 digits, it won't prepend 9.

Just addressed the same problem ourself.

Your best option is to amend the caller id on inbound calls from sip trunk.

We got this working by adding the bellow to our [inbound-voip] context in extensions.conf
exten = _[0-9+].,n,Set(CALLERID(num)=9${CALLERID(num)})

This way only external calls are affected, and not internal extensions.
Just a friendly tip, you shouldn't edit extensions.conf. You should copy and paste the whole context of [inbound-voip] (or whatever context you want to edit), and put it in extensions_override_elastix.conf . You should then make any changes to that extensions_override_elastix.conf file.

The reason for this, is that updating the configuration in the elastix GUI will likely regenerate extension.conf, thus nuking your changes. If its in the override file, it won't be touched. I hope this helps...
The reason for prepending 9 was because our old phone system was set up that way, and Elastix had the same outbound route by default, so I assumed that was the best/proper way for the system to be configured. I tried doing a bit of research on whether prepending digits for outside numbers was still something that should be done and found a thread on the 3CX forums that pointed out some of the reasons for doing that, so I was hesitant to remove the requirement.

For the time being, I'm experimenting with having our outbound route accept both phone numbers prepended with 9, as well as without the 9. This way the system accepts the numbers as the Yealink handsets will dial them from the call history screens, and our users can continue prepending outside numbers with a 9 as they always have. I'm not letting the users know about this until I'm confident it won't cause much/any trouble in the future.

Thanks for your help and suggestions.
Reference URL's