I'm not sure if you can do that - maybe with some reflection. I am certain, however, that you do not want to do that.
Having a library rely on a global variable is not a good library interface. Instead of relying of a global variable that may or not exist, have your library clients specifically tell you what it is you need to know.
In your case, add something like this to your library:
public class Config {
private static String _outgoingSIP;
public static void setOutgoingSIP(string sip) { _outgoingSIP = sip; }
public static String getOutgoingSIP() { return _outgoingSIP; }
}
Your clients wlil call Config.setOutgoingSIP
, and your library will use Config.getOutgoingSIP
.
Note - you can make _outgoingSIP
a public static variable, and have your library code access it directly. I'm not too fond of this approach, but maybe it's my C# background talking.