Prepend a 9?

swagger
Posts: 33
Member Since:
2007-06-03

We're using 57i CTs with the XML script package.

Is there any way to have the phone (or the trixbox) prepend a "9" to the number when hitting "Dial" while looking at the missed call list? It would make life much easier. :)



gguldens
Posts: 17
Member Since:
2008-08-16
Prepend a 9

Swagger,
I went down this path with my 9133i phones. As near as I recall, there seems to be no way--under current firmware--to prepend a 9 to a number easily on Aastra 9133is. I wound up going a different route. I edited my default outbound route of 0 9_outside. I setup all the 3 digit dials for 911, 411, 511, etc. I then set up NXXNXXXXXX --we have mandatory 10 digit dialing--to go outside without worrying about the "9". I also setup 1800NXXXXXX, 1866NXXXXXX, 1877NXXXXXX to handle the 1+8XX toll free. I also setup the prepended "9" so I could eat it if someone dialed it. I then setup all my local area codes (I am in Atlanta Toll Free area) like this 404NXXXXXX for all the appropriate local area codes. I have a 1NXXNXXXXXX to allow people to dial the 1 for long distance. Here is a bit of a trick needed for 10 digit dialing. I added 9XXNXXXXXX into my dial patterns to allow for 10 digit numbers that begin with "9" to be passed on to the trunks properly. Doing this stopped all the "9|" patterns from matching a 10 digit dial and eating the 1st 9. Remember all these strings will be passed to the trunks and we need to do some work there.

In ALL the trunk definitions I had to add my 404NXXXXXX local area codes so they would be dialed properly. For All other 10 digit numbers I prepend a "1" since they are long distance. This will still allow for international calling because we are looking for 011 as the 1st 3 digits. I put 011. in these strings to just pass the dial string to the trunk.

This has worked for me so far and by doing it at the Trixbox level, these dial patterns will work no matter what the phone. You will not to prepend a "9" at any phone and these will still work. Now, if you are dealing with 7 digit dialing, you will need to think this through a bit, but you should still be able to come up with a solution. It appears that the trunk dial patterns are the only ones that support prepending something to a string because I cannot find it documented in the help for the fields elsewhere, including my Aastra 9133i phones.

Hope this helps and doesn't muddy the waters further for you.



swagger
Posts: 33
Member Since:
2007-06-03
Ouch. I was afraid it would

Ouch.

I was afraid it would be something like that. We're just a two person home office right now (plus a few extensions around the house), so I doubt I'll go to that much trouble, unless I get bored one day. :) I did something similar (adding all the local NXXs) for a client I do some IT work for, and it was quite a pain in the rear. I think we can deal with jotting the number down for now. I was just hoping there was an easier way.

Thanks,
St-



aastra4
Posts: 59
Member Since:
2007-02-27
Use local dial plan

Hi,

You can use the local dial plan feature of your 6757i phone to have a prefix added to each number matching a certain pattern. The syntax is:

pattern,prefix

If the pattern matches the dialed number (also works if you dialed a number from the callers list), phone will prepend the prefix before dialing. Make sure your pattern does not match internal numbers.

Have a look at the admin guide for more information about how to write patterns.

Regards,

aastra4



robeerski
Posts: 70
Member Since:
2008-01-30
Prepend a number for all calls from a specific extension

I use this setup to prepend a 555 to the beginning of every number dialed from my fax machine. I then trap for 555 in my outbound routes using a 555| to force my fax to use a specific trunk that is more fax friendly.

To make this work I added the following code to:
/etc/asterisk/extensions_custom.conf

[from-fax]
exten => _1NXXNXXXXXX,1,goto(from-internal,555${EXTEN},1)
exten => _NXXNXXXXXX,1,goto(from-internal,555${EXTEN},1)
exten => _NXXXXXX,1,goto(from-internal,555${EXTEN},1)
include => from-internal

I then make a change to the extension setup for my fax in the device options context section.
I change from-internal to from-fax.

This forces the fax to use the above code which adds the 555 to beginning of every call before going to from-internal to finish processing the call like normal. You could use similar code just change the 555 to a 9 and effectivly add a 9 to the beginning of every number dialed. This would mean that you would never need to dial a 9 again for any call.



jimbo09990
Posts: 8
Member Since:
2009-05-07
Why not just remove the need

Why not just remove the need to use 9 for an external call?

James
www.cougar-it.co.uk
Anti virus discounts at www.cougaritsupplies.com -



sorvani
Posts: 163
Member Since:
2009-06-25
jimbo09990 wrote: Why not
jimbo09990 wrote:
Why not just remove the need to use 9 for an external call?

That what I did also. If you do not use POTS line for anything it is really easy because you can ignore all of the local calling issues. Obviously you may need to make it a little more complicated for 911, but as this is not a primary phone in the house, so I do not use 911 on it.

I use a CallWithUs SIP trunk for my outbound calling.

In my outbound route dial pattern:
1NXXNXXXXXX
NXXNXXXXXX

In my trunk dial rules:
1+NXXNXXXXXX

--

Jared Busch
Office: Have 2.8.0.1 talking to 3 IPOffice403's.
Home: Have 2.8.0 with trunks from Vitelity, & CallWithUs.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.