Skip to content
Snippets Groups Projects
Commit 648cf5cf authored by yanmorin's avatar yanmorin
Browse files

Add a Local_IP variable inside the configuration file,
but later it will use the IP inside the request/response.

I finally call the asterisk phone with my computer.
parent 8bd0584d
No related branches found
No related tags found
No related merge requests found
...@@ -106,9 +106,10 @@ AudioRtpRTX::AudioRtpRTX (SipCall *sipcall, ...@@ -106,9 +106,10 @@ AudioRtpRTX::AudioRtpRTX (SipCall *sipcall,
_audioDevice = driver; _audioDevice = driver;
// TODO: Change bind address according to user settings. // TODO: Change bind address according to user settings.
InetHostAddress local_ip("127.0.0.1"); std::string localipConfig = Manager::instance().getConfigString(SIGNALISATION,LOCAL_IP);
InetHostAddress local_ip(localipConfig.c_str());
_debug("RTP: listening on local port : %d\n", _ca->getLocalAudioPort()); _debug("RTP: listening on IP %s local port : %d\n", localipConfig.c_str(), _ca->getLocalAudioPort());
if (!_sym) { if (!_sym) {
_sessionRecv = new RTPSession (local_ip, _ca->getLocalAudioPort()); _sessionRecv = new RTPSession (local_ip, _ca->getLocalAudioPort());
_sessionSend = new RTPSession (local_ip); _sessionSend = new RTPSession (local_ip);
......
...@@ -1004,6 +1004,7 @@ ManagerImpl::initConfigFile (void) ...@@ -1004,6 +1004,7 @@ ManagerImpl::initConfigFile (void)
fill_config_int(SEND_DTMF_AS, SIP_INFO_STR); fill_config_int(SEND_DTMF_AS, SIP_INFO_STR);
fill_config_str(STUN_SERVER, DFT_STUN_SERVER); fill_config_str(STUN_SERVER, DFT_STUN_SERVER);
fill_config_int(USE_STUN, NO_STR); fill_config_int(USE_STUN, NO_STR);
fill_config_int(LOCAL_IP, LOCAL_IP_DEFAULT);
section = AUDIO; section = AUDIO;
fill_config_int(DRIVER_NAME, DFT_DRIVER_STR); fill_config_int(DRIVER_NAME, DFT_DRIVER_STR);
......
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
#define CODEC4 "Codecs.codec4" #define CODEC4 "Codecs.codec4"
#define CODEC5 "Codecs.codec5" #define CODEC5 "Codecs.codec5"
#define RING_CHOICE "Rings.ringChoice" #define RING_CHOICE "Rings.ringChoice"
#define LOCAL_IP "Local.IP"
#define LOCAL_IP_DEFAULT "127.0.0.1"
// speakers and volume 0 to 100 // speakers and volume 0 to 100
#define VOLUME_SPKR "Volume.speakers" #define VOLUME_SPKR "Volume.speakers"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment