custom context FreePBX problem

Discussion in 'General' started by meetmeat00, Dec 4, 2008.

  1. meetmeat00

    Joined:
    Dec 4, 2008
    Messages:
    6
    Likes Received:
    0
    The PBX uses more than 150 extensions on zaptel channels, and 20 sip extensions.
    There is one default trunk line - PRI.

    In order to restrict customers for getting outside trunks, we have installed and are using the custom context module for freepbx.

    We have created a couple of different custom contexts that have different restrictions like::

    Allow ALL - allow all outbound calls
    NationalMobile - allow local, national and mobile calls
    National No Mobile - Allow ony local and national calls without support for mobile calls
    .....
    extension only - allow only calls to extensions in the PBX.

    These all seem to function without any problem on the old extensions we have defined.

    The problem is that we added new 16 ports (zap channels) to the PBX system, and added new extensions to those ports.

    What ever setting we add to the extensions for the custom context the extension always works as it is in the ExtensionOnly context.

    Here is a sample of a zapata_additional.conf with the settings of the extension we have trouble with

    ;;;;;;[672]
    signalling=fxo_ks
    record_out=Adhoc
    record_in=Adhoc
    mailbox=672@device
    immediate=no
    echotraining=800
    echocancelwhenbridged=no
    echocancel=yes
    dial=ZAP/236
    context=from-internal
    callprogress=no
    callerid=device <672>
    busydetect=no
    busycount=7
    accountcode=
    channel=>236

    and the log file when dialing through this extension

    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Executing [0070274660@ExtensionOnly:1] Goto("Zap/236-1", "app-blackhole|hangup|1") in new stack
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Goto (app-blackhole,hangup,1)
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Executing [hangup@app-blackhole:1] NoOp("Zap/236-1", "Blackhole Dest: Hangup") in new stack
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Executing [hangup@app-blackhole:2] Hangup("Zap/236-1", "") in new stack
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: == Spawn extension (app-blackhole, hangup, 2) exited non-zero on 'Zap/236-1'
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Hungup 'Zap/236-1'


    Here's a working fine extension setting in zapata_additional.conf

    ;;;;;;[673]
    signalling=fxo_ks
    record_out=Adhoc
    record_in=Adhoc
    mailbox=673@device
    immediate=no
    echotraining=800
    echocancelwhenbridged=no
    echocancel=yes
    dial=ZAP/180
    context=National
    callprogress=no
    callerid=device <673>
    busydetect=no
    busycount=7
    accountcode=
    channel=>180

    Can anyone help??
    Thanks ;)
     
  2. wiseoldowl

    Joined:
    Aug 19, 2008
    Messages:
    251
    Likes Received:
    0
    The obvious problem is the difference in the context= lines. I'm assuming there is no way to set the context in the extension configuration? I don't have any zap extensions here, but I know there's a context textbox on the page used for entering sip extensions. It may not be visible when you first create the extension, but once the extension is created you should be able to go back in and edit the context (unless zap is different from sip and iax). Check carefully and make sure you didn't miss it.
     
  3. meetmeat00

    Joined:
    Dec 4, 2008
    Messages:
    6
    Likes Received:
    0
    HI, thanks for your response :)

    The settings for the working fine extension i posted earlier were just for an example of a working extension.

    I have set the extension i have problem with to use different custom contexts , but all the extension is using is the 'ExtenisionOnly' context . I don't know why is it using specificly that context , and i can't make it using any other.

    Thanks again :)
     
  4. wiseoldowl

    Joined:
    Aug 19, 2008
    Messages:
    251
    Likes Received:
    0
    Okay, you're not giving much information to go on here... so I will ask this specific question. When you go into the setup page for one of your existing zap extensions, is there or is there not a text entry box with the label "context" in front of it?

    If there is, what is in that box on one of your "good" extensions, and what is in that box on one of your "bad" extensions?

    Where I was going with this is that if there is no context textbox, there are a couple of ways to approach the problem. One is to file a bug report on the freepbx.org site (although I think I'd post your problem in one of their forums first and see if anyone there can help - no sense filing a bug report if it's not really a bug) and in the meantime use phpmyadmin to change the extension's context in the database (certainly not the preferred method, especially if you've never installed or used phymyadmin before).

    There actually is another way to set up restrictions on extensions but it won't work if there's no way to change the context in the extension setup.
     
  5. meetmeat00

    Joined:
    Dec 4, 2008
    Messages:
    6
    Likes Received:
    0
    Hi wiseoldowl and thanks for your response

    Yes i have a text box entry box in FreePBX which i ussualy use for changing conntexts

    The problem is that no matter which custom context i use for 2 individual extensions in the system , they always seem to use the 'ExtensionOnly' context. Here are the settings in zapata_additional.conf for one of these 2 extensions, which says that this extension is using the 'from-intenal' context , and below is the log file captured when dialing through this extension , which says that it is using the 'ExtenionOnly' context.

    ;;;;;;[672]
    signalling=fxo_ks
    record_out=Adhoc
    record_in=Adhoc
    mailbox=672@device
    immediate=no
    echotraining=800
    echocancelwhenbridged=no
    echocancel=yes
    dial=ZAP/236
    context=from-internal
    callprogress=no
    callerid=device <672>
    busydetect=no
    busycount=7
    accountcode=
    channel=>236


    the log file

    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Executing [0070274660@ExtensionOnly:1] Goto("Zap/236-1", "app-blackhole|hangup|1" in new stack
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Goto (app-blackhole,hangup,1)
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Executing [hangup@app-blackhole:1] NoOp("Zap/236-1", "Blackhole Dest: Hangup" in new stack
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Executing [hangup@app-blackhole:2] Hangup("Zap/236-1", "" in new stack
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: == Spawn extension (app-blackhole, hangup, 2) exited non-zero on 'Zap/236-1'
    [Dec 3 09:13:49] VERBOSE[29579] logger.c: -- Hungup 'Zap/236-1'

    i'm now trying the alternative methods like "restricting outbound calls in FreePbx (whitelist)" and it isn't working for now...i get the busy signal on my test extension....i'm trying to figure out why...

    Thanks again;)
     
  6. meetmeat00

    Joined:
    Dec 4, 2008
    Messages:
    6
    Likes Received:
    0
    HI

    Just wanna say that i have solved this issue , it was a very easy one...because i recently changed some FXS ports on the system i ended up with 2 extensions having the same zap channel...:)) and the 'ExtensionOnly' context were applied to the old extensions that were stil in the system.
    wiseoldowl, thanks for everythig ;)
     

Share This Page