Paddy Grice
2011-Feb-02 23:42 UTC
[asterisk-users] Problems using Background within a macro on V 1.4
Hi List 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 ;-) I am using Version 1.4.33.1 build from the Debian "lenny" distros I am trying to implement a simple screening [macro-screen] exten => s,1,Background(press1) exten => s,n,WaitExten(5) exten => 1,1,NoOp(accepted) ; Dont set a reply so dial connects exten => i,1,Set(MACRO_RESULT=CONTINUE) exten => t,1,Set(MACRO_RESULT=CONTINUE) [test] exten => _1234,1,Dial(SIP/2001,10,M(screen)) exten => _1234,n,playback(sorry,noanswer) This config plays to the caller "sorry" if I don't answer SIP/2001 - good and if I answer SIP/2001 but don't press ANY key (so timeout) the caller gets the sorry message - again good. The problem I have is that the call gets connected whatever key I press - not just the "1" key. I have seen various posts about using background within macros e.g. http://www.voip-info.org/wiki/view/Asterisk+cmd+BackGround but changing the macro to [macro-screen] exten => s,1,Background(press1,,screen) .... or - I am not clear what the name should be [macro-screen] exten => s,1,Background(press1,,macro-screen) .... 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 can anybody point me in the right direction - pleeese :-) Paddy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110202/9d957104/attachment.htm>
Carlos Chavez
2011-Feb-03 00:21 UTC
[asterisk-users] Problems using Background within a macro on V 1.4
On Wed, 2 Feb 2011 23:42:51 -0000, Paddy Grice wrote> Hi List > ? > 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 ;-) > ? > I am using Version 1.4.33.1 build from the Debian "lenny" distros > ? > I am trying to implement a simple screening > ? > [macro-screen] > exten => s,1,Background(press1) > exten => s,n,WaitExten(5) > exten => 1,1,NoOp(accepted) ; Dont set a reply so dial connects > exten => i,1,Set(MACRO_RESULT=CONTINUE) > exten => t,1,Set(MACRO_RESULT=CONTINUE) > ? > [test] > exten => _1234,1,Dial(SIP/2001,10,M(screen)) > exten => _1234,n,playback(sorry,noanswer) > ? > This config plays to the caller "sorry" if I don't answer SIP/2001 - good > and if I answer SIP/2001 but don't press ANY key (so timeout) the caller gets the sorry message - again?good. > ? > The problem I have is that the call gets connected whatever key I press - not just the "1" key. > ? > I have seen various posts about using background within macros e.g. http://www.voip-info.org/wiki/view/Asterisk+cmd+BackGround > ? > but changing the macro to > ? > > [macro-screen] > exten => s,1,Background(press1,,screen) > .... > ? > or - I am not clear what the name should be > > [macro-screen] > exten => s,1,Background(press1,,macro-screen) > .... > ? > 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 > ? > can anybody point me in the right direction - pleeese :-) > ?Background does not work inside Macros.? Use READ to get the digits you need. -- Carlos Chavez Director de Tecnolog?a Telecomunicaciones Abiertas de M?xico S.A. de C.V. Tel: +52-55-91169161 Ext 2001 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110202/2ad385a4/attachment.htm>