Page 1 of 2
Change Class of service
Posted: 09 Nov 2014 12:29
by majid2236
Hi every one
I want to design a prepaid billing system. I want to change class of service feature by commands. how can I find these commands ?
Thanks
Majid
Re: Change Class of service
Posted: 09 Nov 2014 12:59
by cavagnaro
Re: Change Class of service
Posted: 09 Nov 2014 23:18
by majid2236
Thanks for your help
I read a lot about MGR script on alcatelunleashed site. can I change my COS with MGR script?
does Alcatel has a reference about MGR script?
Thanks
Re: Change Class of service
Posted: 10 Nov 2014 05:23
by cavagnaro
I'm not very familiar with it. Some other guy will answer you. Would be interesting
Re: Change Class of service
Posted: 10 Nov 2014 06:24
by vad
Example - Personal Calling Number changing :
mgr -nodico -X <file>; where "file" file with information.
The syntaxe is:
SET Subscriber "1": "3000"
{
PIN = {"54321","TRUE","PIN_Category","2"}
}
For file content - you can just run
mgr -log xxxx (filename),
You will have mgr action in log file,
you can do something in mgr, and read xxxx Log file in cd /usr3/mao.
You can use this log file via
mgr -nodico -X xxxx
Re: Change Class of service
Posted: 10 Nov 2014 07:10
by cavagnaro
Hey Vad you know if parameters can be defined on that script? Like to make the 3000 something that could vary, a %1 for example
Re: Change Class of service
Posted: 10 Nov 2014 16:25
by tgn
Hi cav,
you can use sed to manipulate a template.
Template file pin.mgr:
Code: Select all
SET Subscriber "1": "AaAvarNumberAaA"
{
PIN = {"54321","TRUE","PIN_Category","2"}
}
Quick and dirty shellscript sample:
Code: Select all
#!/bin/bash
sed s/AaAvarNumberAaA/$1/g pin.mgr > /tmpd/temp.mgr
mgr -nodico -X /tmpd/temp.mgr
rm /tmpd/temp.mgr
After this ...
...will set the pin of subscriber 123 to 54321.
The rest is 'all about the bash'
Regards...
Re: Change Class of service
Posted: 10 Nov 2014 18:16
by cavagnaro
\o/ Excellent tgn!! Thanks!! Guess this will help the initial poster too!
Re: Change Class of service
Posted: 13 Nov 2014 06:43
by majid2236
Thanks in advance.
It is wonderfull.
Re: Change Class of service
Posted: 13 Nov 2014 06:45
by majid2236
I found a way to send parameter to the mgr script and i wrote the script that can create user atuomaticaly for a range of users.
perfect way for do every things in alcatel PBX automaticaly.
for example:
#!/bin/bash
for i in 8002 8003 8004 8005 8006
do
rm -rf test.txt
echo CREATE Subscriber '"'1'"': '"'$i'"' >> test.txt
echo { >> test.txt
echo Entity_Number = '"'3'"' >> test.txt
echo } >> test.txt
mgr -nodico -X test.txt
done
above bash script create users from 8002 to 8006 with entity 3. we can change other parameter to create a better script.