Click on "Hints on Route Dial Patterns and Trunk Dial Rules"
Read and learn.
(Yes, I'm teaching you to fish rather than giving you a fish, to torture a metaphor somewhat, but this is such a basic question that you need to learn how to use the FreePBX documentation site, where unfortunately things aren't always presented in an obvious manner.)
I appreciate the link. I now understand the difference between routes and trunks and where and when to use "|" and "+". The output in ssh shows an agi script being run which is automatically inputting the 1 when I dial. When i look at the script I'm not seeing the spot where it is doing it's thing. Here is the script from VI.
// fixlocalprefix Copyright (C) 2005 Greg MacLellan (firstname.lastname@example.org)
// Asterisk Management Portal Copyright (C) 2004 Coalescent Systems Inc. (email@example.com)
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either version 2
//of the License, or (at your option) any later version.
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
* This script is auto-copied from an included module and will get overwritten.
* If you modify it, you must change it to write only, in the agi-bin directory,
* to keep it from getting changed.
This program takes a number, checks it against a list of patterns for a specific trunk, and modifies the number based
on the rules for that number.
Two variables are required:
DIAL_NUMBER - the number to be dialed (this will be modified, if necessary)
DIAL_TRUNK - the trunk number to use
The list of prefixes is contained in $localprefix_file (defined below, defaults to /etc/asterisk/localprefixes.conf). This
file has the format:
The section read depends on the value of DIAL_TRUNK.
A | means to drop the number before the |. In this example, if DIAL_NUMBER is "16135551234" and DIAL_TRUNK is "1",
DIAL_NUMBER will become "5551234" (rule1). If DIAL_NUMBER is "15195551234", it will become "5551234" (rule2).
"15195435555" will become "5435555" (rule3).
A + means to prefix the beginning digits to the following pattern. In this example, if DIAL_NUMBER is 5551234, and
DIAL_TRUNK is "2", DIAL_NUMBER will become "16135551234". If DIAL_NUMBER is "1235555", it will match rule2 and
"fixlocalprefix" 251L, 7716C
Okay, I'm baffled as to why you are looking at a script that is part of the internals of FreePBX. Let me try to explain this to you as gently as I can. When you use Elastix, and by extension FreePBX, you don't muck around with scripts, config files, etc. (there are exceptions, for example, if you are an advanced user you can use the files with _custom in the name, but let's not go there for the moment). If you really want to muck with config files and dial plans, then you should probably not be using FreePBX or any distribution that contains FreePBX, or any similar GUI. Just install Asterisk alone (without a GUI), and then go in and write all your dial plans and config files by hand (there are actually people who actually do that, though I have no idea how).
But if you want to use Elastix, or any distribution that contains FreePBX, you have to accept almost as a matter of faith that almost anything you need to do can be done from the FreePBX and/or Elastix GUI, and that if you think it can't, it's probably because you're not fully understanding the situation. Messing around with the FreePBX internals such as you are contemplating is almost guaranteed to break FreePBX, and/or your changes will be overwritten by FreePBX.
So to address the problem you are having, did you try stripping the 1 in the trunk dial rules? By which I mean, did you put in a line like this:
If you did that, it should strip the 1 before sending the call out. If it DOESN'T do that, then I fear you've already broken something in FreePBX by messing with their scripts. Your only recourse at that point may be a clean reinstall of Elastix.
Now, you did not mention if you are doing anything out of the ordinary here - we can only go by what you tell us. If you are in any way bypassing parts of FreePBX then trunk rules may not be "seen" during call processing. But you wouldn't do something like that without mentioning it, would you?
No, I haven't done anything funny to the dialplan. Voicepulse has a setup module that you run from FreePBX that sets up the trunks and route automatically. I assumed(big mistake) that's all the setup was doing. Apparently it puts in some other "unseen" process. The changes I made while trying to get 1+dialing to work I have removed. I will contact them for clarification. Sorry for the confusion...I did not have all the info until this a.m.