[asterisk-users] Asterisk callshops

Francisco Pérez Botella xerox at eivissaweb.net
Fri Feb 23 17:20:28 MST 2007


Hello:

I have some questions regarding using a striped version of asterisk compiled 
in a mips32 adsl router (probabilly broadcom 96348R Linux version 2.6.8.1 
(jyang at jyang.linux.comtrend.com) (gcc version 3.4.2)

I would like your comments on this dialplan 
(do you think it will work)

[frombooths]
exten => _X.,1,DBQuery(blroute,(${CALLERID},${EXTEN}),(IS_BLOCKED|DESTINATION|
RATE|PERIOD))
exten => _X.,n,GotoIf(${IS_BLOCKED} = 1 ?blockedphone,s,1)
¿¿¿ exten => _X.,n,Answer ??? ; As per docs.. ¿Implications on ringtones??? 
and variable ANSWEREDTIME, 
exten => _X.,n,SendText(${DESTINATION},${RATE})
exten => _X.,n,Dial(IAX2/user:pass at myprovider.com/${EXTEN},,M(counter,${RATE},
{PERIOD}))
exten => h,n,Hangup()



[macro-counter]
exten => s,1,Set(N=$[1])
exten => s,n,Set(PRICE=[${N}*${PERIOD}*{RATE}])
exten => s,n,Sendtext(${PRICE})
exten => s,n,While($[${DIALSTATUS} = ANSWER])
exten => s,n,While($[${ANSWEREDTIME} = $[${N}*${PERIOD}]])
exten => s,n,Set(N=$[${N}+1])
exten => s,n,Set(PRICE=$[${N}*${PRICE}])
exten => s,n,SendText(${PRICE})
exten => s,n,WhileEnd
exten => s,n,WhileEnd

[blockedphone]

¿¿¿ exten => s,1,Answer ???
exten => s,2,SendText(Telefono Bloqueado)
exten => s,3.Hangup (); probably some ringtone special or send some state 
different that bussy if its posible





-- 
Francisco J. Pérez Botella

-- 
Francisco J. Perez Botella
tecnico-comercial		tel: 669365228
				     647507437
email:f.perez at switch-global.com

Meridiam Phone
C/ Padre Mariana, 15 - 1º	03004 Alicante
Telf.: 965 201 550 / 902 947 884
Fax : 965 215 314 / 902 947 885
http://www.gruposati.com


-- 
Francisco J. Pérez Botella


More information about the asterisk-users mailing list