void write( Writer wtr, IvrSettings settings, Domain domain, Location location, String mwiAddresses, int mwiPort, Address restApi, Address adminApi, Address apacheApi, Address imApi, Address imbotApi, Address fsEvent) throws IOException { KeyValueConfiguration config = KeyValueConfiguration.equalsSeparated(wtr); config.writeSettings(settings.getSettings()); config.write("freeswitch.eventSocketPort", fsEvent.getPort()); // potential bug: name "operator" could be changed by admin. this should be configurable // and linked with vm dialing rule config.write("ivr.operatorAddr", "sip:operator@" + domain.getName()); // required services if (mwiAddresses == null) { throw new ConfigException("MWI feature needs to be enabled. No addresses found."); } config.write("ivr.mwiAddresses", mwiAddresses); config.write("ivr.mwiPort", mwiPort); if (adminApi == null) { throw new ConfigException("Admin feature needs to be enabled. No addresses found."); } config.write("ivr.configUrl", adminApi.toString()); if (apacheApi != null) { config.write("ivr.emailAddressUrl", apacheApi.toString()); } // optional services if (restApi != null) { config.write("ivr.3pccSecureUrl", restApi.toString()); config.write("ivr.callHistoryUrl", restApi.toString() + "/cdr/"); } if (imApi != null) { config.write("ivr.openfireHost", imApi.getAddress()); config.write("ivr.openfireXmlRpcPort", imApi.getPort()); } if (imbotApi != null) { config.write("ivr.sendIMUrl", imbotApi.toString()); } }
public boolean requestToAddMyAssistantToRoster(String userName) { Address imbotRestAddress = m_addressManager.getSingleAddress(ImBot.REST_API); try { m_restTemplate.put(ADD_TO_ROSTER_URL, null, imbotRestAddress.toString(), userName); } catch (RestClientException ex) { return false; } return true; }