<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
</HEAD>
<BODY LINK="#0000ff">
Hello Felix,<BR>
<BR>
I did it in this way:<BR>
<BR>
<B>In the extensions.conf</B><BR>
Create this two Macros:<BR>
<BR>
[macro-ask-pass]<BR>
exten => s,1,Set(ORI=${MACRO_EXTEN})<BR>
same => n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds<BR>
same => n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds<BR>
same => n,Background(vm-password)<BR>
same => n,WaitExten(5)<BR>
<BR>
[macro-verify-pass]<BR>
exten => s,1,Set(GO=${ODBC_PASS(${MACRO_EXTEN:2},${ARG1},${ARG2})})<BR>
same => n,Verbose(${GO})<BR>
same => n,Verbose(${ORI})<BR>
same => n,GotoIf($[${GO} = 0]?wrong:ok)<BR>
same => n(wrong),Playback(vm-incorrect)<BR>
same => n,Hangup()<BR>
same => n(ok),Playback(auth-thankyou)<BR>
<BR>
Then in trunk ld I call the macro this way (all the passwords start with *1 (for example *1252525252, *1545288362): <BR>
<BR>
[trunkld]<BR>
<BR>
exten => _9X1NXXXXXXXXX,1,Macro(ask-pass)<BR>
exten => _*1.,1,Macro(verify-pass,restricted,unlimited)<BR>
same => n,Set(FILENAME=g${CALLERID(all)}-${EXTEN}-${STRFTIME(${EPOCH},GMT+5,%C%y%m%d%H%M)}-${UNIQUEID})<BR>
same => n,Macro(dundi-e164,${ORI:1})<BR>
same => n,MixMonitor(${MONDIR}${FILENAME}.wav,b)<BR>
same => n,Dial(${GLOBAL(TRUNK)}/${ORI:${GLOBAL(TRUNKMSD)}})<BR>
same => n,StopMixMonitor()<BR>
<BR>
<B>In the func_odbc.conf</B><BR>
[PASS]<BR>
dsn=asterisk<BR>
readsql=select count(*) from ast_passwd where passwd = '${SQL_ESC(${ARG1})}' and user_profile in ('${SQL_ESC(${ARG2})}','${SQL_ESC(${ARG3})}')<BR>
<BR>
<BR>
I do not know if this is the better way to achieve this but this works, and ask password every time some one call to long distance number.<BR>
<BR>
<BR>
I hope this helps.<BR>
<BR>
Regards,<BR>
Sergio Basurto<BR>
<BR>
On Mon, 2013-05-20 at 13:02 +0000, Felix Vazquez wrote:
<BLOCKQUOTE TYPE=CITE>
How do I make a user dial a passcode if he wants to make an international call?<BR>
<BR>
<BR>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<HR ALIGN="center">
<BR>
<BR>
<FONT SIZE="1"><FONT COLOR="#bebebe">This electronic message contains information from BOSH Global Services which may be company sensitive, proprietary, privileged or otherwise protected from disclosure. The information is intended to be used solely by the recipient(s) named above. If you are not an intended recipient, be aware that any review, disclosure, copying, distribution or use of this transmission or its contents is prohibited. If you have received this transmission in error, please notify the sender immediately.</FONT></FONT>
<PRE>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <A HREF="http://www.api-digital.com">http://www.api-digital.com</A> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
<A HREF="http://www.asterisk.org/hello">http://www.asterisk.org/hello</A>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<A HREF="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A>
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>