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

2004-05-03 Thread Nick Grindley
Hi All,

Many thanks to Marc who helped me with a previous Capi Dialout plan -
however.

What I now would like to be able to do is: -

We have 8 msn's 383590, 383591 383592 etc.

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
ElseIf extension 7958 Then
Dialout on Capi msn 383591
ElseIf extension 7959 Then
Dialout on Capi msn 383592
Etc Etc

If you could give me a simplistic example (as always!!!), including which
files I put the
coding in (i.e. extensions, capi etc.)  I would be most grateful.

Thanks as always.

Nick

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

2004-05-03 Thread Philipp von Klitzing
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


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

2004-05-03 Thread Steven Critchfield
On Tue, 2004-05-04 at 06:46, Nick Grindley wrote:
 Hi All,
 
 Many thanks to Marc who helped me with a previous Capi Dialout plan -
 however.
 
 What I now would like to be able to do is: -
 
 We have 8 msn's 383590, 383591 383592 etc.
 
 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
 ElseIf extension 7958 Then
 Dialout on Capi msn 383591
 ElseIf extension 7959 Then
 Dialout on Capi msn 383592
 Etc Etc

Sounds like you are basically trying to set outbound callerid. Don't
think of this as by extension, the extension number is an arbitrary
number you placed on the physical port. Think of it as ports, or as a
property of the line.

You could do a lookup in a dbput/dbget manner to store the MSN. You
could set each port to start in it's own context that defines the MSN.
OR there is probably a few other easy to define ways also. 

-- 
Steven Critchfield  [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users