[Asterisk-Users] If Then Else Statements - Outbound Dialling on ISDN using CAPI -Individual Dial out Plans using msns

Philipp von Klitzing klitzing at pool.informatik.rwth-aachen.de
Mon May 3 10:14:32 MST 2004


Hi!

> What I would like to do is set up an If Then Else type statement along the
> following lines: -
> 
> If extension 7957 Then
> Dialout on Capi msn 383590

Create a macro in extensions.conf:

exten => s,1,AbsoluteTimeout(${TIMEOUTABS})
exten => s,2,NoOp
exten => s,3,GotoIf($[$[${CALLERIDNUM} = 103] | $[${CALLERIDNUM} = 
302]]?10:4)
exten => s,4,GotoIf($[$[${CALLERIDNUM} = 104] | $[${CALLERIDNUM} = 
106]]?12:5)
exten => s,5,GotoIf($[${CALLERIDNUM} = 108]?8:6)
exten => s,6,Dial(CAPI/${MSN1}:b${MACRO_EXTEN:1},120,T) ; we are 102 or 
have a CALLERIDNUM that was not checked for above
exten => s,7,Goto(20)   ; unavailable
exten => s,8,Dial(CAPI/${MSN2}:b${MACRO_EXTEN:1},120,T) ; we are 108
exten => s,9,Goto(20)   ; unavailable
...

Cheers, Philipp





More information about the asterisk-users mailing list