Confusing aah dial plan

Discussion in 'UK VOIP' started by Jono, Jun 2, 2006.

  1. Jono

    Jono Guest

    Would some kind sould help me modify the below Asterisk@home code?

    I would like all calls to reach the NVFaxDetect application,
    whether they have a blank CLID or not.

    Then I would like any voice calls with a blank CLID to hear a system WAV
    file ("The number you are calling does not accept annonymous calls. Please
    redial using 0871XXXXXXX, or call back without withholding your number"),
    whilst callers with a CLID should be allowed to complete their call.

    All my attempts are failing. In a deliberate attempt not to embarrass
    myself, I haven't included my failed changes.


    [from-pstn-reghours]
    exten => s,1,GotoIf($[${FAX_RX} = disabled]?from-pstn-reghours-nofax,s,1:2)
    exten => s,3,Playtones(ring)
    exten => s,4,NVFaxDetect(10)
    exten => s,5,SetVar(intype=${INCOMING})
    exten => s,6,Cut(intype=intype,-,1)
    exten => s,7,GotoIf($[${intype} = EXT]?8:9)
    exten => s,8,Goto(ext-local,${INCOMING:4},1)
    exten => s,9,GotoIf($[${intype} = GRP]?10:11)
    exten => s,10,Goto(ext-group,${INCOMING:4},1)
    exten => s,11,GotoIf($[${intype} = QUE]?12:13)
    exten => s,12,Goto(ext-queues,${INCOMING:4},1)
    exten => s,13,Goto(${INCOMING},s,1)
    exten => fax,1,Goto(ext-fax,in_fax,1)
    exten => h,1,Hangup
    Jono, Jun 2, 2006
    #1
    1. Advertising

  2. Jono

    alexd Guest

    Jono wrote:

    > I would like all calls to reach the NVFaxDetect application,
    > whether they have a blank CLID or not.
    >
    > Then I would like any voice calls with a blank CLID to hear a system WAV
    > file ("The number you are calling does not accept annonymous calls. Please
    > redial using 0871XXXXXXX, or call back without withholding your number"),
    > whilst callers with a CLID should be allowed to complete their call.


    [from-pstn-reghours]
    exten => s,1,GotoIf($[${FAX_RX} => disabled]?from-pstn-reghours-nofax,s,1:2)

    ; Out of interest, what happened to priority 2? Surely the above won't work
    ; without priority 2?

    exten => s,3,Playtones(ring)
    exten => s,4,NVFaxDetect(10)
    exten => s,5,GotoIf($[${CALLERIDNUM:0:7} = "Private"]?acr,1:6)

    ; OK jono this is just a wild-assed guess I'm making here. I don't have an *
    ; connected to a PSTN circuit so I don't know what you get in the UK when a
    ; number is anonymous, and I don't know what you want to class as
    ; 'anonymous' - are Private, Unknown, International etc 'anonymous' in your
    ; book? If so, you'll have to add more GotoIf()s in a chain to catch them.
    ; To be honest, I don't even know if it's $CALLERIDNUM or $CALLERIDNAME that
    ; gets set. Again, you'll need to write more rules to match them.

    exten => s,6,SetVar(intype=${INCOMING})
    exten => s,7,Cut(intype=intype,-,1)
    exten => s,8,GotoIf($[${intype} = EXT]?9:10)
    exten => s,9,Goto(ext-local,${INCOMING:4},1)
    exten => s,10,GotoIf($[${intype} = GRP]?11:12)
    exten => s,11,Goto(ext-group,${INCOMING:4},1)
    exten => s,12,GotoIf($[${intype} = QUE]?13:14)
    exten => s,13,Goto(ext-queues,${INCOMING:4},1)
    exten => s,14,Goto(${INCOMING},s,1)

    exten => acr,1,Playback(custom/no-anonymous-thanks)
    exten => acr,2,Hangup()

    exten => fax,1,Goto(ext-fax,in_fax,1)

    exten => h,1,Hangup

    Good luck!


    --
    <http://ale.cx/> (AIM:troffasky) ()
    10:11:19 up 14 days, 4:08, 1 user, load average: 0.58, 0.80, 0.51
    This is my BOOOOOOOOOOOOOOOOOOOOOMSTICK
    alexd, Jun 3, 2006
    #2
    1. Advertising

  3. Jono

    Jono Guest

    alexd has brought this to us :
    > Jono wrote:
    >
    >> I would like all calls to reach the NVFaxDetect application,
    >> whether they have a blank CLID or not.
    >>
    >> Then I would like any voice calls with a blank CLID to hear a system WAV
    >> file ("The number you are calling does not accept anonymous calls. Please
    >> redial using 0871XXXXXXX, or call back without withholding your number"),
    >> whilst callers with a CLID should be allowed to complete their call.

    >
    > [from-pstn-reghours]
    > exten => s,1,GotoIf($[${FAX_RX} => disabled]?from-pstn-reghours-nofax,s,1:2)
    >
    > ; Out of interest, what happened to priority 2? Surely the above won't work
    > ; without priority 2?
    >
    > exten => s,3,Playtones(ring)
    > exten => s,4,NVFaxDetect(10)
    > exten => s,5,GotoIf($[${CALLERIDNUM:0:7} = "Private"]?acr,1:6)
    >
    > ; OK jono this is just a wild-assed guess I'm making here. I don't have an *
    > ; connected to a PSTN circuit so I don't know what you get in the UK when a
    > ; number is anonymous, and I don't know what you want to class as
    > ; 'anonymous' - are Private, Unknown, International etc 'anonymous' in your
    > ; book? If so, you'll have to add more GotoIf()s in a chain to catch them.
    > ; To be honest, I don't even know if it's $CALLERIDNUM or $CALLERIDNAME that
    > ; gets set. Again, you'll need to write more rules to match them.
    >
    > exten => s,6,SetVar(intype=${INCOMING})
    > exten => s,7,Cut(intype=intype,-,1)
    > exten => s,8,GotoIf($[${intype} = EXT]?9:10)
    > exten => s,9,Goto(ext-local,${INCOMING:4},1)
    > exten => s,10,GotoIf($[${intype} = GRP]?11:12)
    > exten => s,11,Goto(ext-group,${INCOMING:4},1)
    > exten => s,12,GotoIf($[${intype} = QUE]?13:14)
    > exten => s,13,Goto(ext-queues,${INCOMING:4},1)
    > exten => s,14,Goto(${INCOMING},s,1)
    >
    > exten => acr,1,Playback(custom/no-anonymous-thanks)
    > exten => acr,2,Hangup()
    >
    > exten => fax,1,Goto(ext-fax,in_fax,1)
    >
    > exten => h,1,Hangup
    >
    > Good luck!


    Ooops! priority two is in the actual conf: exten => s,2,Answer. Bit too
    much cutty pasty!

    All my SIP inbound routes point to this context, so I can receive faxes
    by SIP......so no PSTN is involved.

    None of my phones display Caler ID name, so basically I just want voice
    calls with blank numerical CLIDs to hear the acr message.

    I will give your suggestion a try........cheers.
    Jono, Jun 3, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt

    AAH Sipura 3000

    Matt, Nov 21, 2005, in forum: UK VOIP
    Replies:
    27
    Views:
    1,402
  2. John DH

    Dial voipcheap from dial plan

    John DH, Feb 1, 2006, in forum: UK VOIP
    Replies:
    6
    Views:
    2,702
    John DH
    Feb 1, 2006
  3. Phil

    Dial Plan Quick Dial Numbers??

    Phil, May 3, 2007, in forum: UK VOIP
    Replies:
    4
    Views:
    741
    PhilĂ…
    May 4, 2007
  4. Mike Sun
    Replies:
    4
    Views:
    837
    Mike Sun
    Dec 7, 2007
  5. Marc Zirnheld

    How NOT to dial with Sipura's dial plan ?

    Marc Zirnheld, Mar 25, 2008, in forum: UK VOIP
    Replies:
    3
    Views:
    1,609
    Marc Zirnheld
    Mar 26, 2008
Loading...

Share This Page