Usage of outside variable ( C++ program ) in sip.conf

I want to use outside variable to assign in sip.conf

Ex., [globals]
iNumberOfUnits = n;

n should read from a c++ application
Thanks in Advance

The only functionality to do that would be the exec line[1] config files to execute an external application, and incorporate the result.

[1] Using The include, tryinclude and exec Constructs - Asterisk Project - Asterisk Project Wiki

What are you actually trying to do. Perhaps there’s another way? Also would you like to just read from the application on Asterisk startup/config reload, or every time Asterisk might need that setting? (Which btw. doesn’t seem to be a stock Asterisk value, and as such makes not sense to me.)