System suddenly restarted, stuck in startup/reboot loop

I will say that the code you posted above:

do while you don't yet understand
   add one that you do
   test it
next
  add another
  test it
done

is working great. :grin:

1 Like

Another longing post - it’s what I do:

For outbound calling, there are two places that deal with number patterns.

The second is the Trunk. In my world, the Trunk is there expecting a number in one of three formats:

  1. Local Dial format (usually NXXXXXX).
  2. Long Distance format (usually NXXNXXXXXX)
  3. International Calling (usually 011. - the dot is important) Note that none of my installations allow for international calling, so I don’t actually use this one very often.

The first is the Outbound Route. This uses the number patterns to choose which Trunks will be used and to ‘reformat’ whatever gets sent from the phones into a format that makes sense. My outbound routes always strip off the ‘1’ on the front and then determine if the call makes sense as a local call (7 digits in the NXXXXXX format). Because of the nature of MY local calling area, all phone numbers are 10-digit (even if all that gets dialed is seven), so my Outbound Route will take care of that and make sure the call gets reformatted to match the rules for my Trunk.

So, let’s say (for example) that one of my people dials a 7-digit number. It gets picked up by my “catch-all” outbound route. I can either reformat it to 10 digits, or I can pass it to the trunk as a seven digit number. When I had DAHDI lines going out, I’d pass it to the DAHDI trunk “as is”. I’d also check for ‘non-local instate’ numbers (which required 10 digits, but no ‘1’) and pass those to DAHDI.

With my SIP trunks (which require 10-digit either with or without a ‘1’, depending on the carrier), I’d set up two trunks, one for each provider. Since I always pass 10-digit numbers to these trunks, if the first one takes the call, it will send the call (since the provider doesn’t want the ‘1’). If the second one takes it, the trunk can add the ‘1’ on the front and send the call.

My method, then, it to set up as many outbound routes as you need for your dialing situation. The “discard+match” has to match whatever number is being presented by the PBX. After that, you need to modify the number into one of a couple of different “master format(s)” that your trunks can expect and process.

Hope that helps.