Commit d565fb90 authored by llea's avatar llea

Fix config-file and apply feature

parent e41417c7
......@@ -30,18 +30,6 @@ using namespace std;
AudioCodec::AudioCodec (void) {
// Init array handleCodecs
#if 0
handleCodecs[0] = matchPayloadCodec(
Config::gets(QString("Audio/Codecs.codec1")));
handleCodecs[1] = matchPayloadCodec(
Config::gets(QString("Audio/Codecs.codec2")));
handleCodecs[2] = matchPayloadCodec(
Config::gets(QString("Audio/Codecs.codec3")));
handleCodecs[3] = matchPayloadCodec(
Config::gets(QString("Audio/Codecs.codec4")));
handleCodecs[4] = matchPayloadCodec(
Config::gets(QString("Audio/Codecs.codec5")));
#endif
handleCodecs[0] = matchPayloadCodec(Config::gets("Audio", "Codecs.codec1"));
handleCodecs[1] = matchPayloadCodec(Config::gets("Audio", "Codecs.codec2"));
handleCodecs[2] = matchPayloadCodec(Config::gets("Audio", "Codecs.codec3"));
......
......@@ -48,15 +48,6 @@ AudioRtp::AudioRtp (SIP *sip, Manager *manager) {
this->sip = sip;
this->manager = manager;
RTXThread = NULL;
#if 0
if (!manager->useStun()) {
if (Config::gets("Signalisations/SIP.sipproxy")) {
svr = Config::gets("Signalisations/SIP.sipproxy");
}
} else {
svr = Config::gets("Signalisations/SIP.hostPart");
}
#endif
if (!manager->useStun()) {
if (Config::gets("Signalisations", "SIP.sipproxy") == NULL) {
svr = Config::gets("Signalisations", "SIP.sipproxy");
......
......@@ -18,69 +18,12 @@
*/
#include <qstring.h>
#include <qsettings.h>
#include "configuration.h"
#include "configurationtree.h"
static ConfigurationTree *globalConfigTree = NULL;
#if 0
QString
Config::gets (QString key) {
return Config::get (key, QString(""));
}
QString
Config::get (QString key, QString defval) {
QSettings settings;
return settings.readEntry (QString(CFG_PFX) + QString("/") + key, defval);
}
int
Config::geti (QString key) {
return Config::get (key, 0);
}
int
Config::get (QString key, int defval) {
QSettings settings;
return settings.readNumEntry (QString(CFG_PFX) + QString("/") + key,defval);
}
bool
Config::getb (QString key) {
return Config::get (key, false);
}
bool
Config::get (QString key, bool defval) {
QSettings settings;
return settings.readBoolEntry (QString(CFG_PFX) + QString("/") + key,
defval);
}
QString
Config::set (QString key, QString val) {
QSettings settings;
settings.writeEntry (QString(CFG_PFX) + QString("/") + key, val);
return val;
}
int
Config::set (QString key, int val) {
QSettings settings;
settings.writeEntry (QString(CFG_PFX) + QString("/") + key, val);
return val;
}
bool
Config::set (QString key, bool val) {
QSettings settings;
settings.writeEntry (QString(CFG_PFX) + QString("/") + key, val);
return val;
}
#endif
string
Config::gets (const char *section, const char *key) {
return Config::get (section, key, "");
......
......@@ -1214,7 +1214,7 @@ Montreal, Quebec H2T 1S6&lt;/p&gt;</string>
</widget>
<images>
<image name="image0">
<data format="PNG" length="4927">89504e470d0a1a0a0000000d49484452000000ad0000003008060000006357fade0000130649444154789ced5d6d685b579a7e4ef01635b88354da6287b4c4a52d91a729234ff2c3ceb644eeec8f959242a5b6503b3330929d21767797a99dfe49d221b5d3a575d4928e9d92c6ca10623be0b15448240da46379f0ac14686279712a39346005a728c12db1f11a8d3085677f5c4bd695ae3eaee4f463aaf3e7c1bee7bce73de7bee739ef7def7bae700fc020808d4292e43c49928135e42ab9d1fd54f0a78b651ba8e7cb1803f3a4e1f438719cc4b1b19c681c26bb2e874992dff7c02bf8e3c5921a861748cf1ca97578083789e363aa51eb236d175931e00aaa46550d48d278ae30a3aa45e330195b8e575c880a16854555e42a198895c6a86ab067325c31dc0a16c48215c20b711a9c1bcbacf9d0707abce23254302fe6adc00552ebbbff0c9b895a87a762b815cc89392f8417e2d43a4a60cc010fe124717a9c709226f71449722c12e354ac7839daf7c6ca365c92ec3f3d48dbc10edada3bd6d046dbc10ef639fac83932168bfd685c1292f45cf490f18d5bd0f1e538fb1c31dada3bd8b8c7485bbb8d9c2b4dfefdd04f09378661dff3706e99e432f396c01cbf13c6659c0c8f86a9df6960cfce3eea771a68d8d998f3efc3c77a7e14cc7ef8584f4a7fae6e8cbee327c7b3e6a3eb5057490bf97ee85714d3c657a99a618b2936df54493e6e298c6b3bd821bb11a6bd16f69f1e2417c8a1e131ce396234ee35a5ae1b7636722a34f583675c52d29f0b1b63105ca06c9e0c3b1b696bef2879016fb47e4533ad31a4d207f51736d8c6d140593eaef15ca06883222963d480732ae704f24b9233a4c7e7c92b9f5f72435c95bcd7cb6026c6a89ad948b2718f316b079abb1ccb3b5fdf857e8ce59f6f3108c002c00dc0b44c6ef9d0055459816f8b439b2104e7bf372057b1ff2584b3d30d45cbcb8543fbeec0f4dc16e14ed35709a3a129b61d78030924a081068dc626f4f6390ab64b47fb0269fdaf56446f465372d2d16434a1b3dd0eed334f0af31e23132b0968aa35088efae17c4c887479d393011e79fb0896569660d0ebd17c7e4424f54c5c00baaf7623b19290c937e8f530fcc280ee37bbe114ebf29a1d319a2f98a18106273e3801c30bbbc5c8e9413acf3853edb5353a2cdd5d44020944ce86e07c4eae4f12937a2b8d2f321a82f34921ec7364f37f9a53f2d2eb69aa351834f643d7ae83668b745f8ad14f53ad498d37a99f9de4c0274ef82ef910bd1b95f5a3add1c1f5f21034af6a90f8d966e106b02975a348d69ff1023bac005c4563ebb3b90d361805ce261a54c9cb856f7c550bdd2a59c8e01a0c0db209ae9da8c1febd16365f8e71763240fb2a59c870eb4d0d88de8c4253ad41643484d04810916008cdc626b4a005be091f5a3becd0c5c9d6aa56249040622501b3cd9c252ffa41144b2b4bd04083a5c5255800381dfd6c3bf006da26da605a31a1b6a6167dbf3e01c32e033ab59d989e9dc5c80537ea7735c03eb7aeaff982192d68910cbbca0037007da24e36dee6bbc6d4df473eedcd39cee0477e249048c94bb61f3c3808d4accdc36b0d68be6b446d4d2d22a3210c7ed29f9a87c44a02af5cda0f5f871f6af433ad9864fad94936199be13ce344f46e145d5bbb60da6782f75d2fea9eae43f35d23767ffc225eb498a1fb52baff29a6edbe38c5b3d74b60c447fce0816645a3ed8c02a7ce97c7b0e9d873d08adac7949943c6947364fd6b0d590c92c9147abd1ecdffda8cd616ab8cd1ec2443d321d435fc328ba177ef3430c54893210c9c77229d49bc175d29e6b193acdfb5ae47643404ef175e1c7de7381248405bad45677b274cadafc8fab1cf90f5b6b476be109c8f0931b0b391c97eeced76b4fcae4d74b777707a7a3a8ba95b5e6d41d34b7b856f788c75ff5b07e7d20050a541c32f1ad079c00ea710a26586fc655a3f967d16d4fde168c179c81ad76408cecdeaf533ef33c37ea013c9eb26a309fabee3b2fbeb38d643df251f1248a07157239a3e3e25365900e856497755898cf86833225f2b33ed4035ca66d874749cf7c2cec24ce97c5288c8d5105a5e6f45cfcb3d8a8c625a31e1cad52b707ce840fdae065882f1945ca71022fd46454353b4cf90fbf75a5206db8216e006d079c00e4db5665dfe2d6d4a8f23eff4a6faebdada05e79342dc3dbb946adfd9916db01600cee784187b6b28a56f775f372c804cff961d2d52fd67adb2f1053e0aa0f9fc88687a69af7003707ce840db441beaa6f5b872f50a9c679c18feb30b16000f7e0ba48fa777df11b91e19f3a00b91f619d2bccf2c9bcfd08d5049fae1265206db821644bf8ac2be40464353b4af92ba49d25065485dbf72f50aec24c5204af365d3b1f1652b823b940df7c495280e4dd46d08d34abe6d14a6e79e54e5a35a00246231d66a6be1bf1684e1a61e6d7f7d23cb678d5c0dc129245faef3e36e4c5f0da5b67645df6f8d61161d319e5df3e534d51a0427fc88de8ca2f5803dd5bee7edc3687a69af9031f55a7f4afa4e4f06d8fd66778a91ed7f9bc8c164364e4fcfa6f4eabc76258ba9eedcbd037c0ba00ad0543f8881f74f48e38c93f52f643366fa8ea5661ed4ea97d97f21d4566b317ed12bf9b4e60be531e2954b2e658b05d0dd58873ee3c6316e74a5ae68434d47cd962dc2b95908c30bbb85dbfeb018bc30227ade392c630ce7274e348e8659ff5a03ae4c04010091b321842e0611b91a42d75b5d8a0cd3fd7aad8cc1eb7735c0dad28aa59525b4a005b535b548329facfd7428a7becd5b9b520ca3abd6a5982cd93ec964adcfb6ca6e6ca69cae3f1c154d1f9f1227ce9c124d1f9f12bd7d0e915c28a11b21c5f1b801d49c1c67fd6b0da89da881ae5a27f9f669f390b9e394a25f66ffa67d26448221745ebb2202d7a64526daff3621123fdb2c362596e39cfe06c07517006bc9e89abd93c77081b1ed7724c62cb39fa39fb90aba0876ae6d3105ea99f798318291d4842eae98f0cafbfb658ce97c4e88c52d42388510a6d75e11fe9a8954fd86ed0d700358dc2284699f091a6864f2927f0fbd3cb81edd30ac3f1d8f5c70e75c68d6c3ada9f67dbb7aa48597267fe4fa082c0086bf70c9fa53b3901bb637c8f44d8ec7be401e3adf0d0d34f055fbe0bde482f3c9f579687dd52a1b1fb6a324fd1a0cf2fe7b0f1e81f301e59d27118ba51ec237a1ea4194cd805a3facfada9c460b00567d2d781018ff6df98c3b7c3dbfc1d6ef6a80ef801ff5bb1aa0774ed1373a26f94871d24e727632c0c6d1b06c6beadada85ee5d72c6c4b45ceef1435d4c867fd219c60da0f7ed23729f6e8d41b45a2d74afeb52f59c0303a9ebbe091ff4ce29269f8a9306d3f67a0b0d370da9f6f5edf545fb8c6a7620dc90fbb4c9f178af7953f25005d98e6027696d692dd9a7cdf499bdef7a53d79b5e6b96454b7471d2128cd3bcc748e74bc3ebd1035ba95183246abd608739afc12a15f1891ff8a6b9a47ebb7e6b85fe09e515a9598eb3adb30dd3b3b345fb4a06bd1ebd477b51f7741dac2df2f8acb64687c4ca3f147dba4c1fb0f15898af5cda2fab97f4ed640b6b816cb629c73fd3b1aea60efd1f9c80f619c98777ee3132a98792cf585753078bc75d30ba92330a90f4e9d7c250e971dc62e6c1bdd7c2649c5549bfa46f9ea947fa3341aef9a87bba0eae9161388510e857fb062c0d2d6bc930a596c3fe70896fc80abf99e102d9e7e8a3d2bb75fd4e03c78e7ba49c838ce410921c1a1da3e7e4386d073b387e729c5d87bac8194aaf7a83710e9e1e246748c6e57a24731e6c073be83939ce3e475f5e3d3d3e8fac7eb2bf3e47bfe2ab508fcfb3aecfda1b2392a9f681c9e2df1ca6cf53723c596ff04e0f727c4d2fcfc97169be664886289b8762f5cbf7e651a93fdbc10e8647c3e4a47c9e5152deeb49296b6b234a60ee1e31a0ae7fade3879fdc52c1fb8750cb74435fb2603697eab24cf6cda8d323dfc0b84ac6e264d765d218920e53c6e2ac9c0afe27c1e299f6bde2b2b9ca296af26df30d6c5b0ee63638cb67e8f8aaa46b60fe1e496579e9d703f3f73674a1c4732cbcc0fc3d8617a4234b3d0bd229e98de8affff339dae6a4a4a5f002195e908fc7f3658cc661e9ba84e3ec5928fdcc5f78e11e7b16e4f22c11b9bce29876e0bedb6baac496cb67da52db15833d41b9bc4cc32595fb0dc4cacf124b9e7e369ccef0a59795f39403f3e5ed2cfd9f67cbd5fae4e3188ae4be4f5d978b3ff34792963cd980e9f3bca9607cf4a60becc077566a1f02e60e168ed7ba91fba9b8d476c5e0d1cfe4f27aff1e91c757ff1c54ec77f719178687494d11493f4a3870358aa58419b8eec2f43719e37d088ae3f56b4a1fa71bc0e2b66cb94b57e57172cb5380719bf27c3baed6e3c5d3e305e3e57692751f79e1bed9a42827f06b796ec8a6427151be652d6467aa4be46be0c475c03bab7cbd4e07c47e9f5fafbcf1c712db158359f29ead97dfe8a79a72f63f71cb85ddd7803b0bea0dd7f8545dce71046f67eb851d56591cb914c40d65b9c1dbebf5120f08d1da2a44ec90155a4d7696e0f4a3cdd07de0454b0ec335c549dd075edc7adc9cd5cf36ad177cdb8ad98cf0e6a66db7bdc8c54c8dfb36de6001a0fe51e0d0a72eecfd1410a7bc38b1082cfe9fbc4eed4380e55565bd0c35df1fd366c9fb229271dd9fb7ffe9cf5cd87d1e989dbfa7ce70bf88e41c47d3e3d97ae1ba0b96ede52d50cb7665b94d8f67d7f76d1662f14d330c5f678f7f2961c6e6775ce81d200726c3bcb3401ebf1c66ef00b9a5cf95da41d2db75554710ed302be666e48ed3faa8182588af92163789a0f47006378973ea7d57f815fa3d1790575a267159213e3c9adf57bb9f3e6da6bcf03db98fa726ee3d3453bccf19be977b1c9c57f669cbfd8e44cfa4721c9d057ce59e49657d8a41adafb0fc4d8b2bf2159c44532224f94a6ba57b2202f111b0f9bf5d70cf02f8cc057c2bd59ffa37a82f371518e9ab2688f7d3926f1e022c2ba1ac7a3d7b0a6ce1df23d3baae2bfbb44ab8ff9294c75c2ed32207d3627b7d59e3c5f67a65b90a4c9b8e9d2f0811d8b908ada6f89c92e40e1afb15b0f884c89bc597f36957c68a03e3795788275202d306f3afb8d8f23ab3ab7d2afe3e9936f38c9d21487ad2ce98911203a69f76b68c0652d74b61da404ea62d2f7a908b318b8d4aa839d5bdcdcfa2e3e89b9c420845cb5f2be29417586acebb42cc7aa82f057cbf2d1fbad0741dd8fc27793ded4d17f48556e20fc8a70dec049a9e11a97440a710a2f3859f8bd8af00cbcb523df7cd26347ce2cf9bbd76f6da0fdba755bc0f8f024b578b655a2ff02fc5c9dd640160791a594f7dfedb80f8c00bd4663fd5c9f0f9121fd67634e7979bccd37d545e6fe8d5c286f77d460fac69e3326e0d22f180f2024b3c2084a95e8840fbfa53b678d7057d8cd42da7657d911cf99c74acd4e71c0772440fdc3722e58df74644791e6f176e6fa7141528367befd6e3e6820b37899bdc005caf22cbf25ffc930b5078aacbc2dbc19c7699b71460da5ca8ab5a2c6c5879da2796e325c5498b655a994f5bd55450deec1621e287a41d2419cf157f041e3e36c6b6e3a478c785373e53e8377dbcf7c9a75ddaa6dea7d5ac92fa79496fa5a8403e9cfea619baf75d302de737dc4dc92d6bdbf3c5ad884c1c3736e536cc7ca508a6cd44e35640ffc4c3058fdae49553f5e07d655aec488bd37e5b9cdc910784587c4b39ce59cc8e11f93a5b2fecb0c2ff97f25c21d725657d721d11d2cd93f5ff03ec3eafacb7e11120fc1f56f43c1f41a05d8ac366d65b7ada8a2d7f74211192ef38594c6b01d0fbc81d94c27c8e6ba17ca699bb7ca6ae1f5c77c1ff9b220d2b9fafdce742708e9c9dbf57f04d4d294c2bdb41aa8a97eb14b9e39c857cf3dac784508ab74f7c050c4c864bda59ba2f4ef1d6523653daaab28f08d929c55dc579e0d6dfb3f535d45811d8b988f1df0971e561c9a79fdd2244a873afe8df1a558c32bc71c905dd1960e4f3b92cfd654f65c673257c0926a83e724095dff4c2f1311a43c5bfbb2f353f5809fb43d2d37f52be9a38ad9a2fe3a4a3ed62e1f9c96c47e6fe32bbf11c1967e1a773ae4af5b60d28cb51fa0c2bf3d42f36e782cba4214f34c9788eb27e655f98b153f245a0f22401df56f730a6f67b08da6a2b22edff8066ed0b238598a2ed38b951a77f93387858da121f3e36c6f4fff73c1f41e70b3f4fe995fefd08e35356b4b616fe4e8312fa66e6b8ff52ee53cc497d3219afee232f6ead9873b6336e0d42b7ab09866f22521cf64604fedbf5585af1633acf4912e3563ffcbf694eb9069a55f2e85dc0f127e5fada2a1762bfb76224c7992f250cce916773d845babc2ccb8fc5d533d2617f585d8c56e56f35a87973740f40d7e5d24e44e4c2f4374b99715825e659cf722a2f4eca796506329c1ecf2b776886cccc462b158722ca71d97cd95dc67385e3ceb930df8e81e3638c93546c689ba3ba930cef4927108a296abf9e68bb58dad70c33f35e4bc55c135be8fa46fe8644a65e6ada0dcdccc9f253b79df428ceb3e1f4388dc3d28b8e643e6e3ec31b9a91f268b5ef49ed8de702b44436268f9724fb3f9f4be5d3e2b8a477f2b73972fa36f97c0c45f44bdf9fcd57fa82ea7cd9527dc20afe73635ea62ae5b716721d76340c07d4c929e2d566057f9a58b082676ee37cc362b15497a0823f0d2caa626c79dd77b99fbf6ea375483ed80f61622af8c3c5a22b92928f79bf18d61822b95c392d5bc1c2a8ba4160fe1e8dc31bc7b0e584472af8d3c4921b92521c729bd2098402b86dc0c340acc2ac152c0d374490140f8c31bc203df5679e83b744a4007d7cb5f21bb8152c1fff1fb8f17d8d233650dc0000000049454e44ae426082</data>
<data format="PNG" length="4288">89504e470d0a1a0a0000000d49484452000000ad0000003008060000006357fade0000108749444154789ced5d5f685b579efe6e098b5adca20cc31087cc600fdb82dd61a8b4f6839d9912b92f3b761266a476a176b70f529c12bbfbd0dadd97fc5912252ca9e32c9db5a638910261ac04b2561e6cd903d98db278472ad4d1f59022071cb08ba7dc04136c238c224ce0db876b5deb4af75edd7be5b4e954f7e523b9e7fcceef1c9dfbddeffceeef1c8300c200760c49729924c9e4167293dcf1766af883c5aa27687c41626685748dde26ce91383dae8b9e2839702b4392fcae3b5ec3ef2fdaaa9859219312e91c8e13d324ce8d5b466782f44fb036816b6819ad5520e9b95a9951ada2274a4ad95c4d42d4d0149a2ac84d32b36a8f51ad607026539bb835ac88150b64567274457696598dd0357abb26196a68888605b8423a13cf9e614bd1391caf4ddc1aeaa2ee8dcc4a8ece611b8c198a131112a3b78908d979334d921c9f97b8b86ade8ef3fc78f51397e4c86898fe637df4f7f66da19ffe637d1c1a1e22255292a4ef8f2421199fd8d9073a97cd716838477f6f1fdb0e78e8eff593924dfbcfc03f2ddc19863d1fe7ea26c92c0dafe422bf15c6658e94262436b5b838d21266538b8bae9636dd7f1f3f1dfc5e30fbf1d341c5ff9df2373d9a2e1b8f814f066c3dc8cfc23f534c9bdba465863573f9a7d3b634ae1dc6f51feb53fd109d07bd1c190d9359722c3aced5e11c3d073b95fbae9636a6c5f4f3cfb894fd677687264496aa7172b5b4d1dfdb677fc2edb47f3a58f61f9e798b1a345579c2b6dd4856a5713d5793e62714a962d44c74517700b94072818c4fc70ded7381d53347a5fa55d8a764c33f926d073c656fa0d5999cf1787d0bfe552a2f840104004400746f922ffd7b0cd8e5039e9a43bf4b44e4376ee85d813f89b832e7366d4f0fc70e3d44cf2ff70a91227fb55014d33c72f443e49187030eb479da111a1aae584f8559d2f7410f961e2c29768ab1d3d389fede001a5ffbb9d07ec0c3fc461e8e3a07521309445e1184627b8999244f9c3a81f58d75b89a9ad0f1c76b42c14fc7f5dd38321b407e23afb2ef6a6a82eb0d17063f1e4444d8b6e71dce71fff5fd70c0810b172fa0e3cdfd426834ccc8e58852dfb96737d61fad218f3ce6af8988bca6f6a78005bfb5fa373f2122b257100212d971b44bb1575cce51e740cc13057a81fabdf2ef62c63f479d43e9afe21fc9d0a508a627a7b1f46849d58e73cf6e247e378527ef3cc18bafbc244400bca07484e4deff9c025a7d0062a6b1bf457fc2a696802b705bb2a7871f3eae0736c94a13ceed72ab06b8f94e13ba0e7ae99dc9313593648064a589dbdce1c6d2832538ea1c989f10215e4b617e564487a71dfde8c7f49d69f4f405801cd9bfab1f79e491dfc8a3abbbabccdedac535ac6facc30107d6d7d6110070617884478e7e88b7eff8d0b3d183fa3df508f786e16a75e1b8f338e6eedfc7b5eb37d1dcea4640daf677fff5fde887dc5e475d3b2200dae052f5d7f7c8abfcfbc4f5b3bafd4c5d4a208fbc62af507ffca318e0dc1a87c36ef81e7951bfa71ef31322c297469471c86fe4f1d66417527d22acf8d7b3d1a3f68f64bba70391cb112c3d5a42705f109d873a91bc9844e3ab8df03df2a2f97337def276010bf2efaf306d6022cd2b5fd960c41f27c0a31d9a93b6ff21f087cbd5316c31063ff2a1fe156de650a144361f769731482953343535a1e3571de8e9f6a9182d40529c13e176ff43194337b7b8a830d2ac88d0a5088a99646a22a6304f806473ebb61ff31322a6ee4ee1e49973c8230f679d13fdbdfde8e9795bddce02d9dc5d542f2122f28a20845ada586827d01b40ff074784406f1fe7e6e6ca98bafb9d6e741d3e2844a3e374fdc58de1f5b3c02e07dc6fb8d17f3420f7b7a41def212f1affed64e57128edd7ac888860c3bf435d081ced47e17ea7a7134d43e754bfef89d3414e4f4e238f3cda5adbd0fef91f0459436c56178fcdace888d9156bd1821d8d26901c1a1ee1ede1a4a92802457dbb69314d2e909d07bdaafa14b734fb01cff6aab9c8cef1d341a5fcf86fe30c0318ff6d5ca93f76635c572316a21fae96366535afe56f726bf5afd57e1880567f0bed5264797f0cc69522b7c6a15365afb088b5ea1f17d4ed7bdfed26b394ed91e40ccb7e3f9214c2b0a7658bb1ed5d1f52af6a922d2e7cb1844fee34ee08d3cada76093dbffcb9358d0ae0a124b1bebe1e89ff4ba1e3413b7cff53ae590b8c1190c8feff18c4dcaca8bcda35b5df56f9b5e11caf6c6939479d03a93b092c3d5842cfd180523f78ea38ba0e1f144a995ac5f04598984972f0e341859103ff7b4787c9fc9c9bbbaff8d57ff78b32a67af8e821f014c02ec051f722429f5e90dbd561cce237969571b0ec5f49fb95d059e7c4ed892979c6bb46ab6744a36b28b5738c3b62c08856313e1d5731467834cc62866b3be02117c8c26a76ecc6b826c350a2611cb8f3a0576130adfa9afe492cabafc558a571562bfd4f8b69cdfe943264e741af3c0645e3a0c5d056fd2b6ddf6cbcfc8587d91ce71e03988d01f0d9c6d8fd87da540b60b00d186f7828336695ed7c381943c5c51449514c575c7475fda60b21849427796da31b6f9de9523166e43541c05e41880882d0f34f6f0bb13d3795f26e971b1100d82b089d873ae1804365aff0efa9dfc5b6a31b2e51b97fedfa4ddd37836fa047a91f6e1d410450d90fcd46100010ba1b51b567e50de476b955fe16fa13c892472e1f81030e44eba2989a8c21b2b7681cdef1a9fa07176cf957dafed98f4ee8be791e4a92b2087fc1f9f28ba87a75ef4cc0d754af3b6901c0d7540f1e03d2c7aa8b22a0d587e857c613b6b9d58d2f8ecea1b9d58db6e822a337c61920891c1920999a49b2734252bd9a82fb82186c7d51b5cac59cdaeee027032c847ffad1afba7ff6d409d5abacb08a763a9dc0bbdbe5229742cafde93bd3688b2eb2b02a56c26def76b3e3418752bfbeb71e01406dbf3520976f09a8dab32299300795bf85fe4cfd794ab1875d803827aac6c1d7dda38a3a14ee5bf64f1084e4c5a472bffd70872a5a821c1910c9f6031ede3c3cbd1d3df0db8d1a14d03905f675194e58ad4bb894001e77d86a77e0980f4d3fd17e229f64733cd27f0473f7ef9bd64aaea6269c3d79560eb174abb5ae73cf6ee4379e686aba520dd8795ae25b935daa72056d571a07eee8d68e7f1663e39e468c5cbc80c6d7640d1f39e061c10f2dcdd8b8a711def8cdcad1959207bcac3f5b61a8e238ae9971b879d0cb429c55cbbf82362f0b0b16ad09f4c6a3f1d546c4ae45111104016356bf8015a1772b19c6ee753c91b1f985cc78951b86fc89726878885adfd69b5a5cbc3d9c9435546972c896664b8ea6e93fd6c7f4685a5ebd2f6cad6a45323c1a96b56e4eed4721e7c17fac8fc9d1b49c9463e0677c3aae2a5f686f687844f353687c3abeed4f41fb914afde48c852f8745e354e84fd917bad130d35b7e2547d3f2782d50d6b06279bd4afe197e79d468cf7fac8fd28444cea8c719b6f25e3f93b3b676e24a2eae12216bed3b879fffe4961a3e3b8455a68b2fb3623697e52b4b86172c462b0c3ac64d9904076e919e797933658eaced0afe1b41f34c7bde5c36573597957c5ba38e35e830b72b523d43e736655f93cbab2475ec15dd4f2eafeee88392d379f092cbab94b2f296a56056de25bd13ed8d7cb948bf24272d495932b3a2ee4f7c41a2272adf97f1368359fb7bfe322bab0c66d5f6bc8b6a7be69836f4cce7ab72e536ab675abbf5cce088581e9f2e9db05aed6656abcf122bec7e768daa272eb3da71f0e4b2f604373f61cbed3a13ea7ec417f57fa7815b16f6fc91f41a6403168f7365a6fd1618b6f45acd55c7b476eb997a3595d82bdd8ce9bd91d4f5db13951f4abb8ca7db0f6ab717ac32af3598d5b65b3c81729ba427aa3fdea6f6fc916cf82cae3b6e991575fd8a4cfb2caecc8aac61e3f3fa652a31ee77c5b4a5f6a49c7a402be523bbc4ad5c0d8bed4a39fd7e2497b599363863bd9d620cce9867f01cf5cfc130ca1931aad710d2ae07a319deb6f04ce62cc9a27642710ee5c8558dc59d77d99e36fd2e99d6ccb910ce61eb5a373893b1ccb452954c2b9960da523f8c4e1a6a086d6bee815b19eaad3d70cef82422fd386d82ba5102ef4d12a22c1d304de2aa8d499bd268f76a525d284b62a6bc9cf7069f5ba6b512f71ebb67dc0fb34c4b5da6adee1c89e08c761c9d15b4b21e439b4167a2b2fd17961ecf43eb1b7fe7ba08bc0ce51abc330fe1f7807026869bf7014cc680a772f9c543b07e7d95286ff79b76089fc6b6cbbc0c781f8b65e546fed1f84b8f51ee82d5ecb0b24f9fa5f6eeceabcbcda60cdb2fc6f726e53c6653eddf55ff4eaafefeb4dc2fccc680379aabea2fde68d6b6fb53e37a27de1484e42fd6e07458cb2d71edf141fa15809f0986597cbaab5d152b866e1b3e2146da54976945e327ae105ad2f2afd2aaf879d2b42e918c17ef31a3cc80c5f9cbde1bc9edfb3aed3eef9a560badecea6e48d1741c5d57036e4f587dcd6b65376ed9a43571ca62db427939e7f9ca13ef79d2b47ad182dc26e95ddc2e5769953d70eb7ba0694b51c72f2d6cf8cc7c823f08c07ba3fc894aaf9030732aa289ddb89a93b602d3ea61d2c44112cf8ba635b38bb8f48cb4cc2ae5b544d10faf152f7d9e356dc16faba76a9a3d124bde234652386333cb6b5f0a7cbf1d562fbb595ec97f5e43fbcf7e64a8798e9c23f5ea4bfff204f55bbb3aed683de1f4388bed057f3d8f136fbeaed8ebb89ae49d6fda81a73178fede879e1e137bda48eefe3486f5a7e6c7217c5cbda74debf733bda74e07efaf90c39f97dbe5299f6edeeb934d72691d785da39e1974ee8a41fac8876b7fa7efb732831bb456f32630adb73fec1930ada9ec2ec0906973665f6d3a6845d39af5d70e3315d7cfe8ecc5b3d4be063684b4fdd1d5b0cba4d13c728d92524e7e036456e538ac5effc6e64bde3845f84261069fad7b083b3b094efe5984ad6bd2face85c4fb2657bd06765e3a13434a2253cbaba6b6935b8d1e60b6282ab2cb02b30982b0f671175c7fd588aa54888234ff44101a1e4c9595bbf30d707626632e3a5182818934bf5eef2a6bd7ff542c2f4f72f05686c21f81afff5b3b2a90fcc51ac40f0461fa254138f1e6ebc2173f1284a5fe83c2c88f9734a30ceffd570cbb2f03a12f17cbfc57cd60cf551b27c1883668d6e2995e38374ecfbc7986b4f3c6307ae2e34527abecb4a6d542ff44e5f1b1c2d49e421cbdc2ea9c5b111b3d06d4d49c06e50b1abd527f99255d066fde82ff6a4d5bf4c4d8d1b63ce58395cbea7908ce3a1fe67bcd6b51234d6b170b1ab292a62d3e3fc2b4a6d5c0e8bd45be37a9bf8b59a5698b7ebfc6df4fe1eb8d2edd7a9e7d29ecfe753b5cdfcccb71d8bfcc23f1d766ac6f243067b0c6f0ec4b20f17e87a2659f6c9227d7012dcd5bd0a66bffaaaf7db53025915774e645b1bdb2999fa375463a9ec858d3b316579556be1c29e1a11d62dad25578691c568b790af7076e55a729b9accd40aed1db8676c7ee91a5d9687631bea81d9735caeef25cad1c77b6abed4952b3a25fa2b59d0ce7e51d08662eaba727fa27ec9d66589af76a17f506b6d2fd1dfd1b12a57e59a837766f51959faa976be21abd4d4f54fed0a1e4e31a4cbcb17b721eadf3bc5cdf733549efe20ee5f1921cf97251c9a72dc4713d51795c75b58d91c6d0c4947cfeacd165f5fc03bb9ab0867fdb68c85476fed682de664757543fcf54d38e894f9b35fc6162c5024969e7b4a159b42b096af8c3405305739bdbdac52af35a41e7b0acc19e8781a9e1f38be62b50d698cf8a613d065f406a58c362b45c21b9bc6ab827c82a56151ea9e10f12ed1ba01c87b493b3d0108a976733d5b0862671670c911cbb2751cacaab7e39bea6deb71e9c913f40d4fe066e0dabc5ff077529ed1596bde0d30000000049454e44ae426082</data>
</image>
</images>
<connections>
......@@ -1242,6 +1242,12 @@ Montreal, Quebec H2T 1S6&lt;/p&gt;</string>
<receiver>ConfigurationPanel</receiver>
<slot>saveSlot()</slot>
</connection>
<connection>
<sender>buttonApply</sender>
<signal>clicked()</signal>
<receiver>ConfigurationPanel</receiver>
<slot>applySlot()</slot>
</connection>
</connections>
<tabstops>
<tabstop>fullName</tabstop>
......@@ -1284,6 +1290,7 @@ Montreal, Quebec H2T 1S6&lt;/p&gt;</string>
</includes>
<slots>
<slot>saveSlot()</slot>
<slot>applySlot()</slot>
<slot>changeTabSlot()</slot>
</slots>
<functions>
......
......@@ -50,6 +50,10 @@ void ConfigurationPanel::init()
playTones->setChecked(Config::get("Signalisations", "DTMF.playTones", (int)true));
pulseLength->setValue(Config::get("Signalisations", "DTMF.pulseLength", 250));
sendDTMFas->setCurrentItem(Config::get("Signalisations", "DTMF.sendDTMFas",1));
STUNserver->setText(Config::get("Signalisations", "STUN.STUNserver",
"stun.fwdnet.net:3478"));
useStunYes->setChecked(Config::get("Signalisations", "STUN.useStunYes", (int)false));
useStunNo->setChecked(Config::get("Signalisations", "STUN.useStunNo", (int)true));
// For audio tab
ossButton->setChecked(Config::get("Audio", "Drivers.driverOSS", (int)true));
......@@ -62,16 +66,17 @@ void ConfigurationPanel::init()
// For preferences tab
SkinChoice->setCurrentText(QString(Config::getchar(
"Preferences", "Themes.skinChoice", "metal")));
"Preferences", "Themes.skinChoice", "metal")));
confirmationToQuit->setChecked(Config::get(
"Preferences", "Options.confirmQuit", (int)true));
"Preferences", "Options.confirmQuit", (int)true));
zoneToneChoice->setCurrentText(QString(Config::getchar(
"Preferences", "Options.zoneToneChoice", "North America")));
"Preferences", "Options.zoneToneChoice", "North America")));
checkedTray->setChecked(Config::get(
"Preferences", "Options.checkedTray", (int)false));
"Preferences", "Options.checkedTray", (int)false));
autoregister->setChecked(Config::get(
"Preferences", "Options.autoregister", (int)true));
"Preferences", "Options.autoregister", (int)true));
voicemailNumber->setText(Config::get("Preferences", "Themes.voicemailNumber", "888"));
// Init tab view order
Tab_Signalisations->show();
Tab_Audio->hide();
......@@ -112,6 +117,9 @@ void ConfigurationPanel::saveSlot()
Config::set("Signalisations", "DTMF.pulseLength", pulseLength->value());
Config::set("Signalisations", "DTMF.playTones", playTones->isChecked());
Config::set("Signalisations", "DTMF.sendDTMFas" , sendDTMFas->currentItem());
Config::set("Signalisations", "STUN.STUNserver", STUNserver->text());
Config::set("Signalisations", "STUN.useStunYes", useStunYes->isChecked());
Config::set("Signalisations", "STUN.useStunNo", useStunNo->isChecked());
Config::set("Audio", "Drivers.driverOSS", ossButton->isChecked());
Config::set("Audio", "Drivers.driverALSA", alsaButton->isChecked());
......@@ -124,19 +132,55 @@ void ConfigurationPanel::saveSlot()
Config::set("Preferences", "Themes.skinChoice", SkinChoice->currentText());
Config::set("Preferences", "Options.zoneToneChoice",
zoneToneChoice->currentText());
zoneToneChoice->currentText());
Config::set("Preferences", "Options.confirmQuit",
confirmationToQuit->isChecked());
confirmationToQuit->isChecked());
Config::set("Preferences", "Options.checkedTray", checkedTray->isChecked());
Config::set("Preferences", "Options.autoregister",autoregister->isChecked());
Config::set("Preferences", "Options.voicemailNumber", voicemailNumber->text());
#if 0
QMessageBox::information(this, "Save settings",
"You must restart SFLPhone",
QMessageBox::Yes);
#endif
accept();
}
void ConfigurationPanel::applySlot()
{
Config::set("Signalisations", "SIP.fullName", fullName->text());
Config::set("Signalisations", "SIP.userPart", userPart->text());
Config::set("Signalisations", "SIP.username", username->text());
Config::set("Signalisations", "SIP.password", password->text());
Config::set("Signalisations", "SIP.hostPart", hostPart->text());
Config::set("Signalisations", "SIP.sipproxy", sipproxy->text());
Config::set("Signalisations", "DTMF.pulseLength", pulseLength->value());
Config::set("Signalisations", "DTMF.playTones", playTones->isChecked());
Config::set("Signalisations", "DTMF.sendDTMFas" , sendDTMFas->currentItem());
Config::set("Signalisations", "STUN.STUNserver", STUNserver->text());
Config::set("Signalisations", "STUN.useStunYes", useStunYes->isChecked());
Config::set("Signalisations", "STUN.useStunNo", useStunNo->isChecked());
Config::set("Audio", "Drivers.driverOSS", ossButton->isChecked());
Config::set("Audio", "Drivers.driverALSA", alsaButton->isChecked());
Config::set("Audio", "Codecs.codec1", codec1->currentText());
Config::set("Audio", "Codecs.codec2", codec2->currentText());
Config::set("Audio", "Codecs.codec3", codec3->currentText());
Config::set("Audio", "Codecs.codec4", codec4->currentText());
Config::set("Audio", "Codecs.codec5", codec5->currentText());
Config::set("Preferences", "Themes.skinChoice", SkinChoice->currentText());
Config::set("Preferences", "Options.zoneToneChoice",
zoneToneChoice->currentText());
Config::set("Preferences", "Options.confirmQuit",
confirmationToQuit->isChecked());
Config::set("Preferences", "Options.checkedTray", checkedTray->isChecked());
Config::set("Preferences", "Options.autoregister",autoregister->isChecked());
Config::set("Preferences", "Options.voicemailNumber", voicemailNumber->text());
}
// Handle tab view according to current item of listbox
void ConfigurationPanel::changeTabSlot()
{
......@@ -199,3 +243,6 @@ void ConfigurationPanel::changeTabSlot()
}
This diff is collapsed.
/****************************************************************************
** Form interface generated from reading ui file 'configurationpanel.ui'
**
** Created: Mon Jan 10 17:49:57 2005
** Created: Tue Jan 11 12:49:32 2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
......@@ -121,6 +121,7 @@ public:
public slots:
virtual void saveSlot();
virtual void applySlot();
virtual void changeTabSlot();
protected:
......
......@@ -301,6 +301,11 @@ Manager::handleRemoteEvent (int code, char * reason, int remotetype) {
gui()->lcd->setStatus("Logged in");
break;
// Registration failure
case EXOSIP_REGISTRATION_FAILURE:
gui()->lcd->setStatus("Registration failure");
break;
// Remote callee answered
case EXOSIP_CALL_ANSWERED:
if (!gui()->transfer)
......@@ -342,7 +347,7 @@ Manager::handleRemoteEvent (int code, char * reason, int remotetype) {
gui()->lcd->setStatus("Ringing");
// if error code
} else {
} else {
if (code > 399) {
qinfo = QString::number(code, 10) + " " +
QString(reason);
......
......@@ -47,10 +47,10 @@ public:
AudioRtp *audioRTP;
AudioDrivers *audiodriver;
ToneGenerator *tone;
QString *DirectCall; // from argv[1]
QString *DirectCall; // from argv[1]
bool mute;
bool tonezone;
string path;
std::string path;
inline
QtGUIMainWindow*gui (void) { return this->phonegui; }
......
/****************************************************************************
** Form implementation generated from reading ui file 'phonebook.ui'
**
** Created: Mon Jan 10 17:49:57 2005
** Created: Tue Jan 11 12:49:31 2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
......
/****************************************************************************
** Form interface generated from reading ui file 'phonebook.ui'
**
** Created: Mon Jan 10 17:49:57 2005
** Created: Tue Jan 11 12:49:31 2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
......
......@@ -190,6 +190,8 @@ QtGUIMainWindow::QtGUIMainWindow (QWidget *parent, const char *name, WFlags f,
// Connect to apply settings
connect (panel->buttonApply, SIGNAL(clicked()), this, SLOT(applySlot()));
// Connect to save settings
connect (panel->buttonSave, SIGNAL(clicked()), this, SLOT(save()));
// Handle keyboard events
// Connect for clicked numeric keypad button
......@@ -246,23 +248,17 @@ QtGUIMainWindow::QtGUIMainWindow (QWidget *parent, const char *name, WFlags f,
connect (dtmf_button, SIGNAL(clicked()), this, SLOT(dtmfKeypad()));
// Connect to reduce
// if (Config::getb(QString("Preferences/Options.checkedTray"))) {
if (Config::getb("Preferences", "Options.checkedTray")) {
connect (reduce_button, SIGNAL(clicked()), this, SLOT(clickHandle()));
} else {
connect (reduce_button, SIGNAL(clicked()), this, SLOT(showMinimized()));
}
connect (reduce_button, SIGNAL(clicked()), this, SLOT(reduceHandle()));
// Connect to quit with keyboard
connect (this, SIGNAL(keyPressed(int)), this, SLOT(quitApplication()));
// Connect to quit with quit button
connect (quit_button, SIGNAL(clicked()), this, SLOT(quitApplication()));
// To register when program is launched
// if (Config::getb(QString("Preferences/Options.autoregister"))
if (Config::getb("Preferences", "Options.autoregister")
and panel->password->text() == "") {
//if (Config::getb("Preferences", "Options.autoregister")
// and panel->password->text() == "") {
// configuration ();
}
//}
// Change window title and Icon.
this->setCaption(PROGNAME);
......@@ -284,7 +280,6 @@ QtGUIMainWindow::QtGUIMainWindow (QWidget *parent, const char *name, WFlags f,
NULL, mypop, parent, name);
trayicon->show();
connect(trayicon, SIGNAL(clickedLeft()), this, SLOT(clickHandle()));
connect (panel->buttonSave, SIGNAL(clicked()), this, SLOT(save()));
}
......@@ -342,17 +337,6 @@ QtGUIMainWindow::initBlinkTimer(void) {
*/
QString
QtGUIMainWindow::setPathSkin (void) {
/* QString pathskin;
if (apply) {
pathskin = panel->SkinChoice->currentText();
apply = false;
} else {
pathskin = Config::get(QString("Preferences/Themes.skinChoice"),
QString("default"));
}
return pathskin;*/
// return Config::get(QString("Preferences/Themes.skinChoice"),
// QString("metal"));
return QString(Config::getchar(
"Preferences", "Themes.skinChoice", "metal"));
}
......@@ -796,7 +780,6 @@ void
QtGUIMainWindow::button_msg (void) {
stopTimerMessage();
lcd->clear("Voicemail");
//lcd->appendText(Config::gets("Preferences/Options.voicemailNumber"));
lcd->appendText(Config::getchar("Preferences","Options.voicemailNumber",""));
dial();
}
......@@ -992,18 +975,12 @@ void
QtGUIMainWindow::quitApplication (void) {
bool confirm;
// Show QMessageBox
if (apply) {
confirm = panel->confirmationToQuit->isChecked();
apply = false;
} else {
//confirm = Config::get (QString("Preferences/Options.confirmQuit"),true);
confirm = Config::get("Preferences", "Options.confirmQuit", (int)true);
confirm = Config::get("Preferences", "Options.confirmQuit", (int)true);
}
if (confirm) {
if (QMessageBox::question(this, "Confirm quit",
"Are you sure you want to quit SFLPhone ?",
QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes) {
QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
QApplication::exit(0);
callmanager->quitLibrary();
}
......@@ -1067,34 +1044,32 @@ QtGUIMainWindow::pressedKeySlot (int id) {
// Handle dtmf
key->startTone(code);
key->generateDTMF(buf, SAMPLING_RATE);
if (apply) {
pulselen = panel->pulseLength->value();
apply = false;
} else {
//pulselen = Config::get(QString("Signalisations/DTMF.pulseLength"), 250);
pulselen = Config::get("Signalisations", "DTMF.pulseLength", 250);
}
pulselen = Config::get("Signalisations", "DTMF.pulseLength", 250);
callmanager->audiodriver->writeBuffer(buf, pulselen * (OCTETS/1000));
}
// Apply new settings
void
QtGUIMainWindow::applySlot() {
apply = true;
panel->SkinChoice->setCurrentItem(panel->SkinChoice->currentItem());
panel->confirmationToQuit->setChecked(
panel->confirmationToQuit->isChecked());
panel->pulseLength->setValue(panel->pulseLength->value());
panel->zoneToneChoice->setCurrentItem(panel->zoneToneChoice->currentItem());
}
// Save settings in config-file
void
QtGUIMainWindow::save() {
Config::tree()->saveToFile(callmanager->path.data());
}
// Handle operation to minimize the application
void
QtGUIMainWindow::reduceHandle (void) {
if (Config::getb("Preferences", "Options.checkedTray")) {
clickHandle();
} else {
showMinimized();
}
}
// Handle mouse left-button click to minimize/maximize the application
void
QtGUIMainWindow::clickHandle (void) {
......
......@@ -165,6 +165,7 @@ public slots:
void button_conf (void);
void applySlot (void);
void clickHandle (void);
void reduceHandle (void);
void save (void);
void pressedKey0 (void);
......
......@@ -119,8 +119,6 @@ SIP::initSIP (void) {
stunSvrAddr.addr = 0;
// Stun server
//QString svr = Config::gets("Signalisations/STUN.STUNserver");
//qDebug("address server stun = %s", svr.ascii());
string svr = Config::gets("Signalisations", "STUN.STUNserver");
qDebug("address server stun = %s", svr.data());
......@@ -338,18 +336,7 @@ SIP::checkUrl(char *url) {
int
SIP::setRegister (void) {
int reg_id = -1;
#if 0
QString qproxy = "sip:" + Config::gets("Signalisations/SIP.sipproxy");
char * proxy = (char*)qproxy.ascii();
QString qhostname = "sip:"+Config::gets("Signalisations/SIP.hostPart");
char * hostname = (char*)qhostname.ascii();
QString qfrom = fromHeader(NULL,
Config::gets("Signalisations/SIP.userPart"),
Config::gets("Signalisations/SIP.hostPart"));
char * from = (char*)qfrom.ascii();
#endif
string qproxy = "sip:" + Config::gets("Signalisations", "SIP.sipproxy");
char * proxy = (char*)qproxy.data();
......@@ -371,7 +358,6 @@ SIP::setRegister (void) {
eXosip_lock();
setAuthentication();
//if (Config::gets("Signalisations/SIP.sipproxy") != "") {
if (Config::gets("Signalisations", "SIP.sipproxy") != "") {
reg_id = eXosip_register_init(from, proxy, NULL);
} else {
......@@ -398,31 +384,6 @@ SIP::setRegister (void) {
int
SIP::setAuthentication (void) {
#if 0
QString login, pass, realm;
login = Config::gets("Signalisations/SIP.username");
if (login == "") {
login = Config::gets("Signalisations/SIP.userPart");
}
pass = Config::gets("Signalisations/SIP.password");
if (callmanager->useStun()) {
realm = Config::gets("Signalisations/SIP.hostPart");
} else {
if (Config::gets("Signalisations/SIP.sipproxy") != "") {
realm = Config::gets("Signalisations/SIP.sipproxy");
} else {
realm = Config::gets("Signalisations/SIP.hostPart");
}
}
if (eXosip_add_authentication_info(login.ascii(), login.ascii(),
pass.ascii(), NULL, NULL) != 0) {
qDebug ("No authentication");
return -1;
}
#endif
string login, pass, realm;
login = Config::gets("Signalisations", "SIP.username");
if (login == "") {
......@@ -441,7 +402,6 @@ SIP::setAuthentication (void) {
}
if (eXosip_add_authentication_info(login.data(), login.data(),
//pass.data(), NULL, realm.data()) != 0) {
pass.data(), NULL, NULL) != 0) {
qDebug ("No authentication");
return -1;
......@@ -449,34 +409,12 @@ SIP::setAuthentication (void) {
return 0;
}
// Form the From header field
#if 0
QString
SIP::fromHeader (QString name, QString user, QString host) {
if (name != NULL) {
return ("sip:" + user + "@" + host);
} else {
return ("sip:" + user + "@" + host);
}
}
#endif
string
SIP::fromHeader (string user, string host) {
return ("sip:" + user + "@" + host);
}
// Form the To header field
#if 0
QString
SIP::toHeader(QString to) {
if (to.contains("sip:") == 0) {
return ("sip:" + to );
} else {
return to;
}
}
#endif
string
SIP::toHeader(string to) {
if (to.find("sip:") == string::npos) {
......@@ -539,40 +477,7 @@ int
SIP::outgoingInvite (void) {
char * from;
char * to;
#if 0
// Form the From header field basis on configuration panel
QString qfrom = fromHeader(Config::gets("Signalisations/SIP.fullName"),
Config::gets("Signalisations/SIP.userPart"),
Config::gets("Signalisations/SIP.hostPart"));
from = (char*)qfrom.ascii();
// Form the To header field
QString qto = toHeader(callmanager->bufferTextRender());
if (qto.contains('@') == 0 and
Config::getb(QString("Preferences/Options.autoregister"))) {
qto = qto + "@" + Config::gets("Signalisations/SIP.hostPart");
}
to = (char*)qto.ascii();
qDebug ("From: <%s>", from);
qDebug ("To: <%s>", to);
// If no SIP proxy setting
if (Config::gets("Signalisations/SIP.sipproxy") == "") {
if (startCall(from, to, NULL, NULL) <= 0) {
return -1;
}
return 0;
}
QString qroute = "<sip:" + Config::gets("Signalisations/SIP.sipproxy")
+ ";lr>";
char * route = (char*)qroute.ascii();
if (startCall(from, to, NULL, route) <= 0) {
return -1;
}
#endif
// Form the From header field basis on configuration panel
string qfrom = fromHeader(Config::gets("Signalisations", "SIP.userPart"),
Config::gets("Signalisations", "SIP.hostPart"));
......@@ -621,7 +526,6 @@ SIP::setLocalPort (int port) {