<HTML>
<HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>

<font size="2"><b>On Wed, 2 Feb 2011 23:42:51 -0000, Paddy Grice wrote</b>
<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">Hi 

List</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">I have had a 
look at 

the various posts on this and seem to be more confused than ever - but then 

again that's not hard 
;-)</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">I am using 
Version 

1.4.33.1 build from the Debian &quot;lenny&quot; 
distros</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">I am trying to 

implement a simple screening 
</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">[macro-screen]
<br />&gt; exten =&gt; 
s,1,Background(press1)</font></span>

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">exten =&gt; 

s,n,WaitExten(5)</font></span>

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">exten =&gt; 

1,1,NoOp(accepted) ; Dont set a reply so dial 
connects</font></span>

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">exten =&gt; 

i,1,Set(MACRO_RESULT=CONTINUE)
<br />&gt; exten =&gt; 

t,1,Set(MACRO_RESULT=CONTINUE)</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">[test]</font></span>

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">exten =&gt; 

_1234,1,Dial(SIP/2001,10,M(screen))
<br />&gt; exten =&gt; 

_1234,n,playback(sorry,noanswer)</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">This config 
plays to 

the caller &quot;sorry&quot; if I don't answer SIP/2001 - good 
</font></span>

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">and 

</font></span><span class="691071023-02022011"><font face="Arial" size="2">if I answer 

SIP/2001 but don't press ANY key (so timeout) the caller gets the sorry message 

- again 
good.</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">The problem I 
have 

is that the call gets connected whatever key I press - not just the &quot;1&quot; 

key.</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">I have seen 
various 

posts about using background within macros e.g. <a href="http://www.voip-info.org/wiki/view/Asterisk+cmd+BackGround">http://www.voip-info.org/wiki/view/Asterisk+cmd+BackGround</a></font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">but changing the 

macro to 
</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011">

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">[macro-screen]
<br />&gt; exten =&gt; 

s,1,Background(press1,,screen)</font></span>

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">....</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">or - I am not 
clear 

what the name should be 
</font></span></span>

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2"><span class="691071023-02022011">

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">[macro-screen]
<br />&gt; exten =&gt; 

s,1,Background(press1,,macro-screen)</font></span>

<br />&gt; <span class="691071023-02022011"><font face="Arial" size="2">....</font></span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />&gt; <span class="691071023-02022011">just produces the same result - If I can 
get 

this working it will be part of a bigger dialplan for which the followme app is 

not suitable hence the back to 
basics</span>

<br />&gt; <span class="691071023-02022011"> 
</span>

<br />&gt; <span class="691071023-02022011">can anybody point me in the right 
direction 

- pleeese 
:-)</span>

<br />&gt; <span class="691071023-02022011"></span> 

<br />
<br />Background does not work inside Macros.  Use READ to get the digits you need.
<br /></span></font></span>
<br />
<br />-- 

<br />
Carlos Chavez 

<br />
Director de Tecnología 

<br />
Telecomunicaciones Abiertas de México S.A. de C.V. 

<br />
Tel: +52-55-91169161 Ext 
2001
<br />
</font>
</BODY>
</HTML>