sean darcy
2009-May-14 22:37 UTC
[asterisk-users] how to avoid call waiting? Or check DIALSTATUS before Dial()?
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
sean darcy
2009-May-14 22:44 UTC
[asterisk-users] how to avoid call waiting? Or check DIALSTATUS before Dial()?
sean darcy wrote:> 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 >BTW, this is on 1.6.1. sean
Tzafrir Cohen
2009-May-15 01:09 UTC
[asterisk-users] how to avoid call waiting? Or check DIALSTATUS before Dial()?
On Thu, May 14, 2009 at 06:37:53PM -0400, sean darcy wrote:> 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,Dial(DAHDI/g5,60) For both channels set: group = 5> exten =>s,n,ExecIf($["${DIALSTATUS}" = "BUSY"]?Dial(${secondline},30)) > > But it doesn't work because * first tries Call Waiting on the main line.Disabling that can also help. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Yehavi Bourvine
2009-May-15 04:33 UTC
[asterisk-users] how to avoid call waiting? Or check DIALSTATUS before Dial()?
You check for BUSY. Check for IN_USE instead. That's what I do here (on 1.4,
but I guess that 1.6 behaves similarly).
When an extension is in IN_USE state I have a decision tree after consulting
a database:
- If the user wants waiting call - dial him/her/
- If the user doesn;t want waiting call but wants voicemail answer - send
to voicemail with B prefix.
- If niether is wanted - play busy.
Regards, __Yehavi:
2009/5/15 sean darcy <seandarcy2 at gmail.com>
> 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
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20090515/587760a3/attachment.htm