12-06-2022 05:23 PM
Hello,
Need help on setting up a macro that will switch IPv4/H.323 settings. Does anyone have sample macro code for updating the IPv4 settings? I have H.323 setting macro working already but unsuccessful on changing IPv4 address. Thank you.
12-06-2022 07:34 PM
Below are the Macro's im working with. The file titled ".H.323" switches just the H.323 settings and is working properly. The file title "H.323 with IPv4" currently doesn't work but would like it to. The reason im doing this is to allow our customers to be able to switch between the different networks (and Gatekeepers associated with those networks) that we provide . The custom UI has been made and works when using the H.323 macro only. When I create a new custom UI to reflect the "H.323 with IPv4" macro, it doesn't work. I'm assuming my code/syntax for the IPv4 settings is what causing the issue. Any help is greatly apricated. Thank you.
12-07-2022 10:49 AM
THe original 'H.323 with IPv4.txt' had some mismatched " and '...got it to work using the 'new' syntax, as:
function listenToGui() {
xapi.Event.UserInterface.Extensions.Widget.Action.on((event) => {
if (event.Type === 'clicked') {
const profile = profiles[event.WidgetId];
if (profile === 'nipr1') {
xapi.Config.Network[1].IPv4.Address.set('192.168.2.2');
xapi.Config.Network[1].IPv4.Gateway.set('192.168.2.1');
xapi.Config.Network[1].IPv4.SubnetMask.set('255.255.255.0');
xapi.Config.H323.CallSetup.Mode.set('Gatekeeper');
xapi.Config.H323.Gatekeeper.Address.set('192.168.1.5')
xapi.Config.H323.H323Alias.E164.set('1234567')
}
if (profile === 'nipr2') {
xapi.Config.Network[1].IPv4.Address.set('192.168.3.2');
xapi.Config.Network[1].IPv4.Gateway.set('192.168.3.1');
xapi.Config.Network[1].IPv4.SubnetMask.set('255.255.255.0');
xapi.Config.H323.CallSetup.Mode.set('Gatekeeper')
xapi.Config.H323.Gatekeeper.Address.set('192.168.1.6')
xapi.Config.H323.H323Alias.E164.set('7654321')
}
}
});
}
12-07-2022 04:43 PM
Thank you. I've made the changes to reflect the new syntax but it's still not working. i forgot to mention I'm running RoomOS 10.15.3. I did how ever notice that on an older software version CE9.7 it works but we cannot run anything CE9, we have to upgrade all our systems to RoomOS 10.
12-07-2022 05:21 PM
Thank you so much, i had misspelling. Everything working. Thank you again!!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide