Rodolfo Grave
2004-Sep-25 12:24 UTC
[Asterisk-Users] How can I dial one unbusy channel of 4 available?
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
Jeremy Lingmann
2004-Sep-25 13:30 UTC
[Asterisk-Users] Reproducible problem with X100P... any suggestions?!
Hi Everyone, I've been playing around with Asterisk for awhile now, and keep having this intermittent problem with my X100P... Here is my setup: Linux Kernel 2.4.26 Wildcard TDM400P (One FXS port) Wildcard X100P (One FXO port) Running the 1.0 release of Asterisk and the Zaptel drivers It seems like whenever I run the server for a few hours with regular usage... my FXO port will get hung up on some random call. For example, here is a call that has been stuck for about 20 hours: lilith*CLI> show channels Channel (Context Extension Pri ) State Appl. Data Zap/1-1 (local 94252390158 2 ) Up Congestion (Empty) 1 active channel(s) lilith*CLI> show channel zap/1-1 -- General -- Name: Zap/1-1 Type: Zap UniqueID: 1096069447.19 Caller ID: "Main Extension" <100> DNID Digits: (N/A) State: Up (6) Rings: 0 NativeFormat: 68 WriteFormat: 4 ReadFormat: 4 1st File Descriptor: 19 Frames in: 3727326 Frames out: 0 Time to Hangup: 0 Elapsed Time: 20h42m14s -- PBX -- Context: local Extension: 94252390158 Priority: 2 Call Group: 0 Pickup Group: 0 Application: Congestion Data: (Empty) Stack: 0 Blocking in: ast_waitfor_nandfds Whenever this happens, if I try and dial out using the extension on my FXS port I get these messages from the server and a rapid busy signal: -- Starting simple switch on 'Zap/2-1' -- Executing Dial("Zap/2-1", "Zap/1/2271229") in new stack Sep 25 13:08:18 NOTICE[573457]: app_dial.c:742 dial_exec: Unable to create channel of type 'Zap' == Everyone is busy/congested at this time -- Executing Congestion("Zap/2-1", "") in new stack == Spawn extension (local, 92271229, 2) exited non-zero on 'Zap/2-1' -- Hungup 'Zap/2-1' I can easily fix the problem by restarting the Asterisk server... however, this is obviously less than ideal. :-( So.... do any of you Asterisk guru's out there have a suggestion or two on how I can debug this problem? I've tried looking through the system logs and haven't found anything particularly helpful. Also, it doesn't seem to be correlated to the version of Asterisk that I'm running (I can reproduce it on RC1, RC2, CVS checkout, etc.) I'm starting to wonder if there is a hardware problem with my X100P... Anyway, any help or suggestions would be greatly appreciated!! Thanks, Jeremy