<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
El 04/01/11 18:13, Flavio Miranda escribió:
<blockquote cite="mid:BAY158-w18AC4CED679EA420053AFDA080@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<font class="Apple-style-span" size="2" face="Tahoma">Hi all,</font>
<div style="font-family: Tahoma; font-size: 10pt;"><br>
</div>
<div style="font-family: Tahoma; font-size: 10pt;"> I am trying
to set up DND in my asterisk, I am using the following context:</div>
<div style="font-family: Tahoma; font-size: 10pt;"><br>
</div>
<div>
<div><font class="Apple-style-span" size="2" face="Tahoma">[app-naoperturbe]</font></div>
<div><font class="Apple-style-span" size="2" face="Tahoma"><br>
</font></div>
<div><font class="Apple-style-span" size="2" face="Tahoma">exten
=> *11,1,Set(DND=${DB(ddisturbe/${CALLERIDNUM})})</font></div>
<div><font class="Apple-style-span" size="2" face="Tahoma">exten
=> *11,2,GotoIf($["${DND}" = "YES"]?*11,3:*11,101)</font></div>
<div><font class="Apple-style-span" size="2" face="Tahoma">exten
=> *11,3,Set(DB(ddisturbe/${CALLERIDNUM})=NO)</font></div>
<div><font class="Apple-style-span" size="2" face="Tahoma">exten
=> *11,4,Playback(beep)</font></div>
<div><font class="Apple-style-span" size="2" face="Tahoma">exten
=> *11,5,Hangup()</font></div>
<div><font class="Apple-style-span" size="2" face="Tahoma">exten
=> *11,101,Set(DB(ddisturbe/${CALLERIDNUM})=YES)</font></div>
<div><font class="Apple-style-span" size="2" face="Tahoma">exten
=> *11,102,Playback(beep)</font></div>
<div><font class="Apple-style-span" size="2" face="Tahoma">exten
=> *11,103,Hangup()</font></div>
<div style="font-family: Tahoma; font-size: 10pt;"> </div>
<div style="font-family: Tahoma; font-size: 10pt;">I am testing
with a softphone and when I dial *11, I receive the following
log from cli:</div>
<div style="font-family: Tahoma; font-size: 10pt;"><br>
</div>
<div>Executing [*11@a2billing:1] Set("SIP/2015-00000187",
"DND=YES") in new stack</div>
<div> -- Executing [*11@a2billing:2]
GotoIf("SIP/2015-00000187", "1?*11,3:*11,101") in new stack</div>
<div> -- Goto (a2billing,*11,3)</div>
</div>
</blockquote>
1?*11,3:*11,101<br>
<br>
The first "1" before the question mark tells you that the
conditional was evaluated true.<br>
<br>
-- Goto (a2billing,*11,3)<br>
<br>
This tells you that the goto was been done because the true
condition on the GotoIf instruction.<br>
<br>
Everything else goes just as written.<br>
<br>
Maybe you need to check some dialplan logic?<br>
<br>
Hope it helps.<br>
<br>
<blockquote cite="mid:BAY158-w18AC4CED679EA420053AFDA080@phx.gbl"
type="cite">
<div>
<div> -- Executing [*11@a2billing:3] Set("SIP/2015-00000187",
"DB(ddisturbe/)=NO") in new stack</div>
<div> -- Executing [*11@a2billing:4]
Playback("SIP/2015-00000187", "beep") in new stack</div>
<div> -- <SIP/2015-00000187> Playing 'beep.gsm'
(language 'en')</div>
<div> -- Executing [*11@a2billing:5]
Hangup("SIP/2015-00000187", "") in new stack</div>
<div> == Spawn extension (a2billing, *11, 5) exited non-zero on
'SIP/2015-00000187'</div>
<div><br>
</div>
<div>Therefore, the facilite is not working!!</div>
<div>What I am doing wrong, could somebody point me out
please?!!</div>
<div><br>
</div>
<div>Thanks in advanced!!</div>
<br>
</div>
</blockquote>
Cheers,<br>
<br>
<pre class="moz-signature" cols="72">--
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center
</pre>
</body>
</html>