+ Post New Thread
Results 1 to 5 of 5
Netbooks, PDA and Phones Thread, Asterisk Dial Plan - force insert of prefix in Technical; Does anyone know how to force all calls from an extension to add a prefix to the beginning? We have ...
  1. #1

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,684
    Thank Post
    516
    Thanked 2,453 Times in 1,899 Posts
    Blog Entries
    24
    Rep Power
    833

    Asterisk Dial Plan - force insert of prefix

    Does anyone know how to force all calls from an extension to add a prefix to the beginning?

    We have a pay phone which is on our asterisk server - using the normal school lines to dial out. The problem is, kids are trying to call home at break etc... and not leaving a message. This leads to parents doing 1471 and calling the school demanding to know who called them and why.

    What we want to do is insert 141 in front of all calls dialled from that phone. So, if they call 842134, the asterisk server will actually dial 141842134.

    Any ideas how to do this?

    Doing a google search for asterisk and prefix turns up about 1,000,000 irrelevant items...

  2. #2

    Join Date
    Jan 2006
    Location
    Hertfordshire
    Posts
    151
    Thank Post
    2
    Thanked 8 Times in 8 Posts
    Rep Power
    19

    try in trunks

    1471+x

  3. #3

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Something like:

    Code:
    exten => _0Z.,n,Dial(${TRUNK}/44${EXTEN:1})

    in your dialplan will put a 44 before any number starting 0, and chop the 0 off the front of it (in this example, I use it to stick the country code in front of an external but not international call).

    Result: 01234567899 becomes 441234567899

  4. #4

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,684
    Thank Post
    516
    Thanked 2,453 Times in 1,899 Posts
    Blog Entries
    24
    Rep Power
    833
    Ok, next question then - how can I restrict this to just being from that one extension. I want all the other extensions to continue to function as normal?

  5. #5

    Join Date
    Aug 2010
    Location
    OC California
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    You can separate the extensions/sip account by context and put it in the same context as your dialplan..so that is only accessible by that extension

SHARE:
+ Post New Thread

Similar Threads

  1. New Prefix for OS Deployment Fourm
    By Gatt in forum Comments and Suggestions
    Replies: 3
    Last Post: 5th November 2009, 12:23 AM
  2. Solved - Prefix for posts
    By CHR1S in forum Comments and Suggestions
    Replies: 0
    Last Post: 5th May 2009, 11:28 AM
  3. new prefix for classified section
    By RabbieBurns in forum Comments and Suggestions
    Replies: 2
    Last Post: 20th February 2009, 09:31 AM
  4. BT Dial up Speed At Home.
    By tickmike in forum General Chat
    Replies: 10
    Last Post: 15th August 2007, 10:56 PM
  5. disable dial up
    By adnan in forum Windows
    Replies: 15
    Last Post: 28th March 2007, 11:02 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •