G729 Licence Registration

I need to install Digium G729 codec licences on multiple Asterisk PBX’s, 300-400 to be more precise. I am comfortable with using the register utility and installing the codec itself however i need to speed up the licence registration process somehow as it is not feasible to install the codec licences on this many systems using manually using the registration utility.

Is there some way i can run the Digium register utility in a bash script so i can script the inputs ?

You should probably contact Sangoma directly for this. https://www.digium.com/company/contact-digium-sales

I would recommend using the Linux ‘script’ command to record the inputs to the register application, then you can play them back as needed.

You can also use an expect script for this. Here is a very basic example to get you started:

#!/usr/bin/expect -f

foreach id { <Key-ID1> <Key-ID2> <Key-IDn> } {
	spawn /your/path/register

	expect "Your Choice: "
	send "1\r"

	expect "Your Choice: "
	send "5\r"

	expect "Please enter your Key-ID: "
	send "$id\r"
}

This will loop you over each key id in the list, spawn the register program, select “Digium Products” and “G.729 Codec” menu options, and then enter the key id.

You’ll need to modify the script suit your needs of course, and possibly add more lines to the loop based on what’s expected. This hopefully will get you started though.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.