1 | изначальная версия редактировать | |
**core show function CUT**
-= Info about function 'CUT' =-
[Syntax]
CUT(<varname>,<char-delim>,<range-spec>)
[Synopsis]
Slices and dices strings, based upon a named delimiter.
[Description]
varname - variable you want cut
char-delim - defaults to '-'
range-spec - number of the field you want (1-based offset)
may also be specified as a range (with -)
or group of ranges and fields (with &)
2 | No.2 Revision редактировать |
**core core show function CUT** CUT
-= Info about function 'CUT' =-
[Syntax]
CUT(<varname>,<char-delim>,<range-spec>)
[Synopsis]
Slices and dices strings, based upon a named delimiter.
[Description]
varname - variable you want cut
char-delim - defaults to '-'
range-spec - number of the field you want (1-based offset)
may also be specified as a range (with -)
or group of ranges and fields (with &)
3 | No.3 Revision редактировать |
core show function CUT
-= Info about function 'CUT' =-
[Syntax]
CUT(<varname>,<char-delim>,<range-spec>)
[Synopsis]
Slices and dices strings, based upon a named delimiter.
[Description]
varname - variable you want cut
char-delim - defaults to '-'
range-spec - number of the field you want (1-based offset)
may also be specified as a range (with -)
or group of ranges and fields (with &)
в Вашем случае это будет так
exten => s,n,NoOp(${Dolg})
exten => s,n,GotoIf($[${Dolg}>0]?:200)
exten => s,n,PlayBack(vm-youhave)
exten => s,n,SayNumber(${CUT(${Dolg},\,,1)})
exten => s,n,PlayBack(rubls); rubls.alaw - скажет рублей
exten => s,n,SayNumber(${CUT(${Dolg},\,,2)})
exten => s,n,PlayBack(kopeek); rubls.alaw - скажет рублей
4 | No.4 Revision редактировать |
core show function CUT
-= Info about function 'CUT' =-
[Syntax]
CUT(<varname>,<char-delim>,<range-spec>)
[Synopsis]
Slices and dices strings, based upon a named delimiter.
[Description]
varname - variable you want cut
char-delim - defaults to '-'
range-spec - number of the field you want (1-based offset)
may also be specified as a range (with -)
or group of ranges and fields (with &)
в Вашем случае это будет так
exten => s,n,NoOp(${Dolg})
exten => s,n,GotoIf($[${Dolg}>0]?:200)
exten => s,n,PlayBack(vm-youhave)
exten => s,n,SayNumber(${CUT(${Dolg},\,,1)})
exten => s,n,PlayBack(rubls); rubls.alaw - скажет рублей
exten => s,n,SayNumber(${CUT(${Dolg},\,,2)})
exten => s,n,PlayBack(kopeek); rubls.alaw kopeek.alaw - скажет рублей
копеек
5 | No.5 Revision редактировать |
core show function CUT
-= Info about function 'CUT' =-
[Syntax]
CUT(<varname>,<char-delim>,<range-spec>)
[Synopsis]
Slices and dices strings, based upon a named delimiter.
[Description]
varname - variable you want cut
char-delim - defaults to '-'
range-spec - number of the field you want (1-based offset)
may also be specified as a range (with -)
or group of ranges and fields (with &)
в Вашем случае это будет так
exten => s,n,NoOp(${Dolg})
exten => s,n,GotoIf($[${Dolg}>0]?:200)
exten => s,n,PlayBack(vm-youhave)
exten => s,n,SayNumber(${CUT(${Dolg},\,,1)})
s,n,SayNumber(${CUT(${Dolg},.,1)})
exten => s,n,PlayBack(rubls); rubls.alaw - скажет рублей
exten => s,n,SayNumber(${CUT(${Dolg},\,,2)})
s,n,SayNumber(${CUT(${Dolg},.,2)})
exten => s,n,PlayBack(kopeek); kopeek.alaw - скажет копеек
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании
Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией
GNU GPL.