The logic of the macro is totally opposite of what it should be. I do
recall sending a corrected version of the script to someone a while
back, it might be on the mailing lists archive.
However, there is an option for the Dial() command to do exactly what you wish
p: This option enables screening mode. This is basically Privacy mode
without memory of how to handle the caller. It looks for the file
sounds/priv-callerintros/${IF($[ "${CALLERID(num)}" != ""
]?${CALLERID(num)}:NOCALLERID_${EXTEN}${CUT(CHANNEL,/,1)}=${CUT(CHANNEL,/,2)})}.gsm
and if it is not found, prompts the caller to say his name. It then
rings the called party and plays sounds/priv-callpending,
sounds/priv-callerintros/<see-above>, and
sounds/screen-callee-options. If the called party enters 1, the call
is accepted, 2, the DIAL command exits with ${DIALSTATUS} set to
NOANSWER, 3, set to TORTURE and 4, set to DONTCALL. If no valid entry
is made, the DIAL command exits with ${DIALSTATUS} set to ANSWER. The
check for pre-existence of the name recording may not be what you
want. For example, everyone from the same number is not necessarily
the same person, especially if the number is OUTOFAREA, but if the
file is there, no new name will be recorded. Since the files are never
removed, you may wish to remove them with a System(rm
/var/lib/asterisk/sounds/priv-callerintros/${IF($[ "${CALLERID(num)}"
!= ""
]?${CALLERID(num)}:NOCALLERID_${EXTEN}${CUT(CHANNEL,/,1)}=${CUT(CHANNEL,/,2)})}.*)
right before the Dial command and clean up old ones with a cron job.
On 4/1/07, Andy Hester <[EMAIL PROTECTED]> wrote:
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Philipp Kempgen
Sent: Sun 4/1/2007 4:02 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] [MACRO-SCREEN] and MACRO_RESULT
Andy Hester wrote:
> exten => s,n,Set(TIMEOUT(response=10))
Should be
exten => s,n,Set(TIMEOUT(response)=10)
Regards,
Philipp
------------------------------
Thanks Philipp,
I fixed this, but I still have the problem that the call is connected
regardless...
-Andy
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users