Filtering on from caller id

Home » Asterisk Users » Filtering on from caller id
Asterisk Users 6 Comments

Hi,

I would like to use the from caller id, to allow calls yes or no.
101, and 111 should be allowed to use the Trunk, the rest of the phones are
not.

Is this even possible?
So if the from caller id is 101 or 111, then allow the call, otherwise
hangup.

Thanks,
Peter

6 thoughts on - Filtering on from caller id

  • Hmm are those extensions then still able to call each other?

    I’ll put it more clear,

    I have:
    100, 101, & 103.
    A Trunk.

    100 & 101 are allowed to call over the trunk. but 103, is only allowed to
    call with 100 & 101, of course 100 & 101 should still be able to call 103.

    On Thu, Mar 24, 2011 at 5:14 PM, A J Stiles
    wrote:

  • That sounds good but, i would like it the other way arround. I have over 90
    extensions that are NOT allowed to use the trunk, and 2 that are.. So
    blacklisting everything will take for ever ;D.

  • One extra line to change “blacklist” to “whitelist”

    Exten => _X,1,noop(everybody but 103 dials)

    Exten => _X./100,n,Dial(DAHDI/1,w,5551212)

    Exten => _X./101,n,Dial(DAHDI/1,w,5551212)

    Exten => _X.,n,hangup

    _____

    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Peter den
    Hartog
    Sent: Friday, March 25, 2011 3:15 AM

    That sounds good but, i would like it the other way arround. I have over 90
    extensions that are NOT allowed to use the trunk, and 2 that are.. So
    blacklisting everything will take for ever ;D.

    Just use “Ex-girlfriend” logic on your dial command to zap 103 when he tries
    to use the trunk. For each dial command in your dialplan that addresses the
    trunk (let’s call it DAHDI/1 for brevity), duplicate the line like this:

    Existing:

    Exten => _X.,1,Dial(DAHDI/1,w,5551212)

    New:

    Exten => _X,1,noop(everybody but 103 dials)

    Exten => _X./103,n,hangup

    Exten => _X.,n,Dial(DAHDI/1,w,5551212)

    _____

    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Peter den
    Hartog
    Sent: Thursday, March 24, 2011 3:45 PM

    Hmm are those extensions then still able to call each other?

    I’ll put it more clear,

    I have:

    100, 101, & 103.

    A Trunk.

    100 & 101 are allowed to call over the trunk. but 103, is only allowed to
    call with 100 & 101, of course 100 & 101 should still be able to call 103.

    On Thu, Mar 24, 2011 at 5:14 PM, A J Stiles
    wrote:

    are

    Would it not be simpler just to put those extensions into a separate
    context,
    which allows trunk calls?

  • In sip.conf you point to a context. For 101 en 102 you should point to a context that allows using the trunk while for the other numbers you doesn’t grand this privilege .

    Erik

    Verstuurd vanaf mijn iPad

    Op 24 mrt. 2011 om 16:58 heeft Peter den Hartog het volgende geschreven: