Hi everybody,
I want to know if somebody implemented an application like this with SEMS:
- Call arrives to sems
- app get user from SIP from
- app make a query into db using user as key (something like "select
balance from accounts where user = $user")
- app play the balance. "Your account balance is x dollars"
I made this using asterisk and would like to know if I can get the
same with SEMS.
This is the asterisk extension doing this:
exten => 888,1,Set(FROM_USER=${CUT(SIP_HEADER(From), ,1)})
exten => 888,n,MYSQL(Connect connid 192.168.1.10 business testing123 business)
exten => 888,n,MYSQL(Query resultid ${connid} select bal_int from
business.accounts where user=${FROM_USER})
exten => 888,n,Wait(1)
exten => 888,n,MYSQL(Fetch fetch ${resultid} BAL_INT)
exten => 888,n,MYSQL(Clear ${resultid})
exten => 888,n,MYSQL(Query resultid ${connid} select bal_decimal from
business.accounts where user=${FROM_USER})
exten => 888,n,Wait(1)
exten => 888,n,MYSQL(Fetch fetch ${resultid} BAL_DEC)
exten => 888,n,MYSQL(Clear ${resultid})
exten => 888,n,Playback(astcc-account-balance-is)
exten => 888,n,SayNumber(${BAL_INT})
exten => 888,n,Playback(dollars)
exten => 888,n,Playback(with)
exten => 888,n,SayNumber(${BAL_DEC})
exten => 888,n,Playback(cents)
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems