Hello Felix, I did it in this way:
In the extensions.conf Create this two Macros: [macro-ask-pass] exten => s,1,Set(ORI=${MACRO_EXTEN}) same => n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds same => n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds same => n,Background(vm-password) same => n,WaitExten(5) [macro-verify-pass] exten => s,1,Set(GO=${ODBC_PASS(${MACRO_EXTEN:2},${ARG1},${ARG2})}) same => n,Verbose(${GO}) same => n,Verbose(${ORI}) same => n,GotoIf($[${GO} = 0]?wrong:ok) same => n(wrong),Playback(vm-incorrect) same => n,Hangup() same => n(ok),Playback(auth-thankyou) Then in trunk ld I call the macro this way (all the passwords start with *1 (for example *1252525252, *1545288362): [trunkld] exten => _9X1NXXXXXXXXX,1,Macro(ask-pass) exten => _*1.,1,Macro(verify-pass,restricted,unlimited) same => n,Set(FILENAME=g ${CALLERID(all)}-${EXTEN}-${STRFTIME(${EPOCH},GMT+5,%C%y%m%d%H% M)}-${UNIQUEID}) same => n,Macro(dundi-e164,${ORI:1}) same => n,MixMonitor(${MONDIR}${FILENAME}.wav,b) same => n,Dial(${GLOBAL(TRUNK)}/${ORI:${GLOBAL(TRUNKMSD)}}) same => n,StopMixMonitor() In the func_odbc.conf [PASS] dsn=asterisk readsql=select count(*) from ast_passwd where passwd = '${SQL_ESC(${ARG1})}' and user_profile in ('${SQL_ESC(${ARG2})}','${SQL_ESC(${ARG3})}') 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. I hope this helps. Regards, Sergio Basurto On Mon, 2013-05-20 at 13:02 +0000, Felix Vazquez wrote: > How do I make a user dial a passcode if he wants to make an > international call? > > > > > > > > ______________________________________________________________________ > > 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. > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users