[Asterisk-Users] How can I dial one unbusy channel of 4 available?

Rodolfo Grave rodolfograve at yahoo.es
Sat Sep 25 12:24:25 MST 2004


Hi.

I'm using asterisk as a PSTN -> SIP gateway, so that you can call to any 
of the 4 PSTN lines connected to the asterisk box from and dial your 
number, and asterisk will dial out through one of the 4 sip accounts I 
have on a SIP -> PSTN provider. I think of something like this in the 
extensions.conf

[incoming]
exten => s,1,Wait,1                     ; Wait a second, just for fun
exten => s,2,Answer                     ; Answer the line
exten => s,3,DigitTimeout,2             ; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout,5          ; Set Response Timeout to 10 seconds
exten => s,5,BackGround(welcome_and_dial_your_number)          ;

exten => 
_.,1,Dial(SIP/${EXTEN}@one_of_the_outgoing_sip_defined_on_sip_conf) ;*******

I dont know what to write instead of the line marked with *******. A 
multiple dial like following is not the solution I think.

exten => 
_.,1,Dial(SIP/${EXTEN}@one_outgoing_sip&SIP/${EXTEN}@other_outgoing_sip&SIP/${EXTEN}@another_outgoing_sip) 


How can I know the free (or busy, is the same to me) SIP channels at any 
moment? Is there any built-in var?

Thanks in advance.

RODOLFO




---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0439-2, 24/09/2004
Tested on: 25/09/2004 21:24:27
avast! - copyright (c) 2000-2004 ALWIL Software.
http://www.avast.com






More information about the asterisk-users mailing list