[asterisk-users] how to avoid call waiting? Or check DIALSTATUS before Dial()?

sean darcy seandarcy2 at gmail.com
Thu May 14 17:37:53 CDT 2009


I have two internal analogue extensions off a TDM400P. If the first is 
busy, I'd like to ring the second. So:

[incoming]
exten =>s,1,Answer()
exten =>s,n,Dial(${mainline},60)
exten =>s,n,ExecIf($["${DIALSTATUS}" = "BUSY"]?Dial(${secondline},30))

But it doesn't work because * first tries Call Waiting on the main line. 
Here I dial out:

     -- Starting simple switch on 'DAHDI/1-1'
     -- Executing [140 at internal:1] Answer("DAHDI/1-1", "") in new stack
     -- Executing [140 at internal:2] Set("DAHDI/1-1", "CALLERID="house" 
<2127873453>") in new stack
     -- Executing [140 at internal:3] Dial("DAHDI/1-1",
.............................

And now an incoming call:

     -- Executing [s at incoming:1] Answer("IAX2/nhi-10929", "") in new stack
     -- Executing [s at incoming:2] Dial("IAX2/nhi-10929", "DAHDI/1,60") in 
new stack
     -- Called 1
     -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2
     -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2
     -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2
     -- DAHDI/1-2 is ringing
     -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2
     -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2
     -- CPE supports Call Waiting Caller*ID.  Sending 'Seandarcy/212 573 
1432'


Is there a way to check the status of a dahdi channel _before_ dialing it?

exten =>s,n,ExecIf($["DAHDI/1${DIALSTATUS}" = 
"BUSY"]?Dial(${secondline},30)) ??

What's special control 20  ??

Any help appreciated.

sean




More information about the asterisk-users mailing list