Skip to content
Snippets Groups Projects
Commit f80d0bc2 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files
parents d5eebae9 101f2785
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,10 @@ YamlParser::YamlParser(const char *file) : filename_(file)
}
#define CHECK_AND_RETURN(x) \
if (!x) throw YamlParserException("Invalid node"); \
if (!x) { \
ERROR("%s", __PRETTY_FUNCTION__); \
throw YamlParserException("Invalid node"); \
} \
return x
SequenceNode *
......
......@@ -1244,6 +1244,10 @@ void ManagerImpl::saveConfig()
addressbookPreference.serialize(emitter);
hookPreference.serialize(emitter);
audioPreference.serialize(emitter);
#ifdef SFL_VIDEO
VideoControls *controls(Manager::instance().getDbusManager()->getVideoControls());
controls->getVideoPreferences().serialize(emitter);
#endif
shortcutPreferences.serialize(emitter);
emitter.serializeData();
......
......@@ -707,22 +707,16 @@ Call *SIPVoIPLink::newOutgoingCall(const std::string& id, const std::string& toU
sip_utils::stripSipUriPrefix(toCpy);
bool IPToIP = isValidIpAddress(toCpy);
const bool IPToIP = isValidIpAddress(toCpy);
Manager::instance().setIPToIPForCall(id, IPToIP);
try {
if (IPToIP) {
Manager::instance().associateCallToAccount(id, SIPAccount::IP2IP_PROFILE);
return SIPNewIpToIpCall(id, toUrl);
}
else {
} else {
return newRegisteredAccountCall(id, toUrl);
}
}
catch(...) {
throw;
}
}
Call *SIPVoIPLink::SIPNewIpToIpCall(const std::string& id, const std::string& to)
{
......@@ -1237,7 +1231,7 @@ SIPVoIPLink::SIPStartCall(SIPCall *call)
pjsip_dlg_set_route_set(dialog, sip_utils::createRouteSet(account->getServiceRoute(), call->inv->pool));
if (pjsip_auth_clt_set_credentials(&dialog->auth_sess, account->getCredentialCount(), account->getCredInfo()) != PJ_SUCCESS) {
ERROR("Could not initiaize credential for invite session authentication");
ERROR("Could not initialize credential for invite session authentication");
return false;
}
......
......@@ -46,8 +46,9 @@ VideoPreference::VideoPreference() :
std::map<std::string, std::string> VideoPreference::getSettings()
{
std::map<std::string, std::string> args;
std::stringstream ss;
if (not device_.empty()) {
args["input"] = v4l2_list_->getDeviceNode(device_);
std::stringstream ss;
ss << v4l2_list_->getChannelNum(device_, channel_);
args["channel"] = ss.str();
args["video_size"] = size_;
......@@ -55,6 +56,7 @@ std::map<std::string, std::string> VideoPreference::getSettings()
args["width"] = size_.substr(0, x_pos);
args["height"] = size_.substr(x_pos + 1);
args["framerate"] = rate_;
}
return args;
}
......@@ -73,7 +75,7 @@ void VideoPreference::serialize(Conf::YamlEmitter &emitter)
preferencemap.setKeyValue(videoSizeKey, &size);
preferencemap.setKeyValue(videoRateKey, &rate);
emitter.serializePreference(&preferencemap, "videoPreferences");
emitter.serializePreference(&preferencemap, "video");
}
void VideoPreference::unserialize(const Conf::MappingNode &map)
......
---
accounts:
- alias: SFL test
codecs: 0/3/8/9/110/111/112/
audioCodecs: 0/3/8/9/110/111/112/
credential:
- Account.password: 1234
Account.realm:
......@@ -44,12 +44,13 @@ accounts:
type: SIP
updateContact: false
username: sfltest
videoCodecs:
zrtp:
displaySas: true
displaySasOnce: false
helloHashEnabled: true
notSuppWarning: true
- alias:
- alias: IP2IP
codecs: 0/
credential:
- password:
......@@ -65,7 +66,6 @@ accounts:
port: 5060
publishAddr:
publishPort: 5060
registrationExpire: true
ringtoneEnabled: true
ringtonePath: /usr/share/sflphone/ringtones/konga.ul
sameasLocal: true
......@@ -105,7 +105,6 @@ preferences:
notifyMails: false
order: Account:1328115463/Account:1328115393/Account:1328115062/Account:1316122317/Account:1316122284/Account:1316121900/Account:1316121889/Account:1316121691/Account:1316121662/Account:1316121661/Account:1316121654/Account:1316121611/Account:1316121607/Account:1316121605/Account:1316121602/Account:1312584532/Account:1312398082/Account:1312398066/Account:1309188361/Account:1309187807/Account:1309187723/Account:1309187670/Account:1309187609/Account:1309187081/Account:1308839853/Account:1308839662/Account:1308839447/Account:1308839359/Account:1308839335/Account:1308838875/Account:1308838713/Account:1308838236/Account:1307975440/Account:1307975347/Account:1307974800/Account:1307974672/Account:1307974527/Account:1303487773/Account:1303247743/Account:1302895321/Account:1302892836/Account:1302891834/Account:1302882519/Account:1302207377/Account:1302207262/Account:1302204136/Account:1302204108/Account:1294850905/Account:1294850775/Account:1294850618/Account:1294849651/Account:1294849602/Account:1294849310/Account:1288964768/Account:1288964603/Account:1288964434/Account:1288964141/Account:1288964134/
portNum: 5060
registrationExpire: 180
searchBarDisplay: true
zeroConfenable: false
zoneToneChoice: North America
......@@ -150,6 +149,11 @@ audio:
recordPath:
volumeMic: 100
volumeSpkr: 100
video:
v4l2Channel:
v4l2Dev:
v4l2Rate:
v4l2Size:
shortcuts:
hangUp:
pickUp:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment