r2903 - in trunk: libminisip/source/sip libmsip/include/libmsip
libmsip/source libmsip/source/dialogs minisip/minisip/gui/gtkgui
mikma at minisip.org
mikma at minisip.org
Mon Nov 13 00:04:53 CET 2006
Author: mikma
Date: 2006-11-13 00:04:52 +0100 (Mon, 13 Nov 2006)
New Revision: 2903
Modified:
trunk/libminisip/source/sip/DefaultDialogHandler.cxx
trunk/libminisip/source/sip/Sip.cxx
trunk/libminisip/source/sip/SipDialogConfVoip.cxx
trunk/libminisip/source/sip/SipDialogPresenceClient.cxx
trunk/libminisip/source/sip/SipDialogVoipClient.cxx
trunk/libminisip/source/sip/SipSoftPhoneConfiguration.cxx
trunk/libmsip/include/libmsip/SipDialogConfig.h
trunk/libmsip/include/libmsip/SipUri.h
trunk/libmsip/source/SipDialogConfig.cxx
trunk/libmsip/source/SipUri.cxx
trunk/libmsip/source/dialogs/SipDialog.cxx
trunk/libmsip/source/dialogs/SipDialogRegister.cxx
trunk/minisip/minisip/gui/gtkgui/AccountsList.cxx
Log:
* Replace sipProxyAddressString, sipProxyPort and transport in SipProxy
with one SipUri, which can be used directly in the route header.
* SipDialog::updateState:
Update remote target on 2xx, a contact header may be missing from
the response that established the dialog.
Modified: trunk/libminisip/source/sip/DefaultDialogHandler.cxx
===================================================================
--- trunk/libminisip/source/sip/DefaultDialogHandler.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libminisip/source/sip/DefaultDialogHandler.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -844,8 +844,8 @@
// merr << "IN URI PARSER: Parsed port=<"<< port <<"> and proxy=<"<< proxy<<">"<<end;
try{
- dialogConfig->sipIdentity->getSipProxy()->sipProxyAddressString = proxy;
- dialogConfig->sipIdentity->getSipProxy()->sipProxyPort = iport;
+ // TODO: untested
+ dialogConfig->sipIdentity->setSipProxy(new SipProxy(proxy, iport));
}catch(HostNotFound & exc){
merr << "Could not resolve PSTN proxy address:" << end;
merr << exc.what();
@@ -899,7 +899,7 @@
//Add outbount proxy route
MRef<SipProxy *> proxy = phoneconf->defaultIdentity->getSipProxy();
if( !proxy.isNull() ){
- im->addRoute( proxy->sipProxyAddressString, proxy->sipProxyPort, proxy->getTransport() );
+ im->addRoute( proxy->getUri().getString() );
}
//FIXME: there should be a SipIMDialog, just like for register messages ...
Modified: trunk/libminisip/source/sip/Sip.cxx
===================================================================
--- trunk/libminisip/source/sip/Sip.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libminisip/source/sip/Sip.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -464,7 +464,7 @@
cerr << endl;
for (list<MRef<SipIdentity*> >::iterator i=phoneconfig->identities.begin() ; i!=phoneconfig->identities.end(); i++){
if ( (*i)->registerToProxy ){
- cerr << "Registering user "<< (*i)->getSipUri().getString() << " to proxy " << (*i)->getSipProxy()->sipProxyAddressString<< ", requesting domain " << (*i)->getSipUri().getIp() << endl;
+ cerr << "Registering user "<< (*i)->getSipUri().getString() << " to proxy " << (*i)->getSipProxy()->getUri().getIp()<< ", requesting domain " << (*i)->getSipUri().getIp() << endl;
CommandString reg("",SipCommandString::proxy_register);
reg["proxy_domain"] = (*i)->getSipUri().getIp();
reg["identityId"] = (*i)->getId();
Modified: trunk/libminisip/source/sip/SipDialogConfVoip.cxx
===================================================================
--- trunk/libminisip/source/sip/SipDialogConfVoip.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libminisip/source/sip/SipDialogConfVoip.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -1159,8 +1159,7 @@
modifyConfAck(ack);
MRef<SipProxy *> proxy = getDialogConfig()->sipIdentity->getSipProxy();
- ack->addRoute( proxy->sipProxyAddressString, proxy->sipProxyPort,
- proxy->getTransport() );
+ ack->addRoute( proxy->getUri().getString() );
MRef<SipMessage*> pref(*ack);
sendSipMessage(pref);
Modified: trunk/libminisip/source/sip/SipDialogPresenceClient.cxx
===================================================================
--- trunk/libminisip/source/sip/SipDialogPresenceClient.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libminisip/source/sip/SipDialogPresenceClient.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -146,7 +146,7 @@
requestTimeout(timeout, "timerDoSubscribe");
#ifdef DEBUG_OUTPUT
- merr << "Subscribed for presence for user "<< toUri->getSipUri()<< end;
+ merr << "Subscribed for presence for user "<< toUri->getSipUri.getString()<< end;
#endif
return true;
}else{
Modified: trunk/libminisip/source/sip/SipDialogVoipClient.cxx
===================================================================
--- trunk/libminisip/source/sip/SipDialogVoipClient.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libminisip/source/sip/SipDialogVoipClient.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -648,7 +648,7 @@
getDialogConfig()->inherited->getLocalSipPort(phoneconf->useSTUN),
SipUri(getDialogConfig()->sipIdentity->getSipUri()),
dialogState.seqNo,
- getDialogConfig()->sipIdentity->getSipProxy()->getTransport(),
+ getDialogConfig()->sipIdentity->getSipProxy()->getUri().getTransport(),
sipStack ) ;
addAuthorizations( inv );
Modified: trunk/libminisip/source/sip/SipSoftPhoneConfiguration.cxx
===================================================================
--- trunk/libminisip/source/sip/SipSoftPhoneConfiguration.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libminisip/source/sip/SipSoftPhoneConfiguration.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -220,8 +220,8 @@
backend->save( accountPath + "auto_detect_proxy", "yes" );
} else {
backend->save( accountPath + "auto_detect_proxy", "no");
- backend->save( accountPath + "proxy_addr", (*iIdent)->getSipProxy()->sipProxyAddressString );
- backend->save( accountPath + "proxy_port", (*iIdent)->getSipProxy()->sipProxyPort );
+ backend->save( accountPath + "proxy_addr", (*iIdent)->getSipProxy()->getUri().getIp() );
+ backend->save( accountPath + "proxy_port", (*iIdent)->getSipProxy()->getUri().getPort() );
}
if( (*iIdent)->getSipProxy()->sipProxyUsername != "" ){
@@ -249,7 +249,7 @@
backend->save( accountPath + "register", "no");
backend->save( accountPath + "register_expires", (*iIdent)->getSipProxy()->getDefaultExpires() );
}
- string transport = (*iIdent)->getSipProxy()->getTransport();
+ string transport = (*iIdent)->getSipProxy()->getUri().getTransport();
if( transport == "TCP" ){
backend->save( accountPath + "transport", "TCP" );
Modified: trunk/libmsip/include/libmsip/SipDialogConfig.h
===================================================================
--- trunk/libmsip/include/libmsip/SipDialogConfig.h 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libmsip/include/libmsip/SipDialogConfig.h 2006-11-12 23:04:52 UTC (rev 2903)
@@ -68,7 +68,7 @@
@param addr proxy string, it can be a name or an IP, with and without the :port
@param port port the proxy addr is set to, it has precedence over the :port in the addr param
*/
- SipProxy(std::string addr, int port = -1);
+ SipProxy(const SipUri &addr, int port = -1);
/**
Initialize a proxy with automatic discovery of settings via DNS SRV
@@ -76,10 +76,8 @@
@param transport transport to check for (_sip._udp, ... ). If TCP and fails, we will retry
with UDP. If TLS, there is no fallback (they are all unsecured).
*/
- SipProxy(std::string userUri, std::string transport);
+ SipProxy(const SipUri &userUri, std::string transport);
- void setProxy(std::string addr, int port);
-
std::string getDebugString();
/**
@@ -90,13 +88,8 @@
@param transport transport protocol to find the host:port settings for
@return the proxy hostname (the port is returned by reference)
*/
- static std::string findProxy(std::string uri, uint16_t &port, std::string transport="UDP");
+ static SipUri findProxy(const SipUri &uri, const std::string &transport="UDP");
- std::string sipProxyAddressString;
- //IPAddress * sipProxyIpAddr;
-
- int sipProxyPort;
-
std::string sipProxyUsername;
std::string sipProxyPassword;
@@ -110,8 +103,7 @@
std::string getDefaultExpires( );
int getDefaultExpires_int( ) {return defaultExpires;}
- std::string getTransport(){ return transport; };
- void setTransport( std::string transport ){this->transport = transport; };
+ const SipUri getUri() const{ return uri; }
std::string getMemObjectType() const {return "SipProxy";}
@@ -127,7 +119,10 @@
(except for TLS, which will just not connect ... we want security).
*/
bool autodetectSettings;
-
+
+ protected:
+ void setProxy(const SipUri &addr, int port=-1);
+
private:
/**
Default expires value.
@@ -145,12 +140,7 @@
*/
int registerExpires; //in seconds
- /**
- Transport to use: (if TCP, we can fallback to UDP)
- - UDP, TCP or TLS
- */
- std::string transport;
-
+ SipUri uri;
};
class LIBMSIP_API SipIdentity : public MObject{
Modified: trunk/libmsip/include/libmsip/SipUri.h
===================================================================
--- trunk/libmsip/include/libmsip/SipUri.h 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libmsip/include/libmsip/SipUri.h 2006-11-12 23:04:52 UTC (rev 2903)
@@ -41,8 +41,10 @@
#include<sys/types.h>
#include<map>
+#include<iostream>
#include<libmutil/MemObject.h>
+#include<libmutil/dbg.h>
/**
@@ -178,4 +180,6 @@
std::map<std::string, std::string> parameters;
};
+std::ostream& operator << (std::ostream& os, const SipUri& uri);
+
#endif
Modified: trunk/libmsip/source/SipDialogConfig.cxx
===================================================================
--- trunk/libmsip/source/SipDialogConfig.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libmsip/source/SipDialogConfig.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -35,16 +35,13 @@
int SipIdentity::globalIndex = 1; //give an initial value
-SipProxy::SipProxy(){
- sipProxyAddressString = "";
- //sipProxyIpAddr = NULL;
- sipProxyPort = 0;
+SipProxy::SipProxy(): uri(){
autodetectSettings = false; //dont autodetect ... the values are invalid
registerExpires=DEFAULT_SIPPROXY_EXPIRES_VALUE_SECONDS;
defaultExpires=DEFAULT_SIPPROXY_EXPIRES_VALUE_SECONDS;
}
-SipProxy::SipProxy(std::string addr, int port){
+SipProxy::SipProxy(const SipUri &addr, int port){
autodetectSettings = false;
try {
registerExpires=DEFAULT_SIPPROXY_EXPIRES_VALUE_SECONDS;
@@ -54,124 +51,85 @@
#ifdef DEBUG_OUTPUT
cerr << "SipProxy(str, int) throwing ... " << endl;
#endif
- throw HostNotFound( "[SipProxy " + addr + "]" );
+ throw HostNotFound( "[SipProxy " + addr.getString() + "]" );
}
}
-SipProxy::SipProxy(std::string userUri, string transportParam) { //note: this->transport is an class member, do not rename transportParam
- string addr;
- uint16_t port;
+SipProxy::SipProxy(const SipUri &userUri, string transportParam) {
+ SipUri addr;
+ bool unknown = true;
autodetectSettings = true;
registerExpires=DEFAULT_SIPPROXY_EXPIRES_VALUE_SECONDS;
defaultExpires=DEFAULT_SIPPROXY_EXPIRES_VALUE_SECONDS;
- if( getTransport() == "" ) {
- setTransport( transportParam );
- }
-
try {
- addr = SipProxy::findProxy( userUri, port, transportParam );
+ addr = SipProxy::findProxy( userUri, transportParam );
+ unknown = false;
}catch( NetworkException & ) {
- if( transportParam == "TCP" ) {
- //if tcp doesn't work, try find UDP
- addr = "unknown";
- }
}
//if tcp failed, retry with udp ...
- if( addr == "unknown" && transportParam == "TCP" ) {
+ if( unknown && transportParam == "TCP" ) {
try {
cerr << "Autodetect Sip proxy for [" << userUri << "] for transport TCP failed. Retrying with transport UDP." << endl;
transportParam = "UDP";
- addr = SipProxy::findProxy( userUri, port, transportParam );
+ addr = SipProxy::findProxy( userUri, transportParam );
+ unknown = false;
}catch( NetworkException & ) {
- addr = "unknown";
}
}
- if( addr == "unknown" ) {
+ if( unknown ) {
#ifdef DEBUG_OUTPUT
cerr << "SipProxy(str, str) throwing (1) ... " << endl;
#endif
- throw HostNotFound( "[SipProxy for <" + userUri + ">]" );
+ throw HostNotFound( "[SipProxy for <" + userUri.getString() + ">]" );
}
// addr = SipProxy::findProxy( userUri, (uint16_t)port, transportParam );
try {
- setProxy( addr, port );
- setTransport( transportParam );
+ addr.setTransport( transportParam );
+ setProxy( addr );
} catch (NetworkException & ) {
#ifdef DEBUG_OUTPUT
cerr << "SipProxy(str, str) throwing (2)... " << endl;
#endif
- throw HostNotFound( "[SipProxy <" + addr + "]" );
+ throw HostNotFound( "[SipProxy <" + addr.getString() + "]" );
}
}
//addr could be "IP:port" ... but the port param passed to the function has precedence ...
-void SipProxy::setProxy(std::string addr, int port){
- massert(addr.find("@")==std::string::npos);
+void SipProxy::setProxy(const SipUri &addr, int port){
+ massert(addr.getUserName()=="");
if( port > 65535 || port < 0 ) port = -1; //check the port
#ifdef DEBUG_OUTPUT
cerr << "SipProxy:setProxy(str) : addr = " << addr << endl;
#endif
- if (addr.find(":")!=std::string::npos){
- if( port == -1 ) {
- std::string portstr = addr.substr(addr.find(":")+1);
- portstr = portstr.substr( 0, portstr.find(":") ); //make sure only one port is there ...
- mdbg<< "parsed proxy port to <"<< portstr<<">"<<end;
- sipProxyPort = atoi(portstr.c_str());
- } else {
- sipProxyPort = port;
- }
- sipProxyAddressString = addr.substr(0,addr.find(":"));
-
- }else{
- sipProxyAddressString = addr;
- if( port == -1 ) {
- #ifdef DEBUG_OUTPUT
- cerr << "SipProxy: invalid port ... setting 5060" << endl;
- #endif
- sipProxyPort = 5060;
- } else {
- sipProxyPort = port;
- }
+
+ uri = addr;
+
+ if( port != -1 ){
+ uri.setPort(port);
}
-
- //sipProxyIpAddr = new IP4Address(sipProxyAddressString);
+
+ // Lose router
+ uri.setParameter( "lr", "true" );
}
std::string SipProxy::getDebugString(){
- return "proxyString="+sipProxyAddressString
- //+"; proxyIp="+ ((sipProxyIpAddr==NULL)?"NULL":sipProxyIpAddr->getString())
- +"; proxyString="+sipProxyAddressString
- +"; port="+itoa(sipProxyPort)
- +"; transport="+getTransport()
+ return "uri="+uri.getString()
+"; autodetect="+ (autodetectSettings?"yes":"no")
+"; user="+sipProxyUsername
+"; password="+sipProxyPassword
+"; expires="+itoa(defaultExpires);
}
-std::string SipProxy::findProxy(std::string uri, uint16_t &port, string transport){
-
- if (uri.find("@")==std::string::npos){
- return "unknown";
- }
- std::string domain = uri.substr(uri.find("@"));
- domain=domain.substr(1);
+SipUri SipProxy::findProxy(const SipUri &uri, const string &transport){
+ const std::string &domain = uri.getIp();
- //check if we find a colon ... and ignore that part
- if (uri.find(":")!=std::string::npos){
- uri = uri.substr( 0, uri.find(":") );
- #ifdef DEBUG_OUTPUT
- cerr << "SipProxy::findProxy : sanitizing malformed proxy uri ..." << endl;
- #endif
- }
-
//Do a SRV lookup according to the transport ...
string srv;
if( transport == "TLS" || transport == "tls") { srv = "_sips._tcp"; }
@@ -180,14 +138,20 @@
srv = "_sip._udp";
}
+ uint16_t port = 0;
+ std::string proxy = NetworkFunctions::getHostHandlingService(srv, domain, port);
#ifdef DEBUG_OUTPUT
cerr << "SipProxy::findProxy : srv=" << srv << "; domain=" << domain << "; port=" << port << endl;
#endif
- std::string proxy = NetworkFunctions::getHostHandlingService(srv, domain, port);
+
if (proxy.length()<=0){
- return "unknown";
+ throw HostNotFound( "[Proxy for <" + uri.getString() + ">]" );
}
- return proxy;
+
+ SipUri proxyUri(proxy);
+ proxyUri.setPort(port);
+
+ return proxyUri;
}
@@ -313,28 +277,9 @@
setSipProxy( NULL );
- if( !autodetect ) {
- try {
- this->sipProxy = new SipProxy(proxyAddr, proxyPort);
- #ifdef DEBUG_OUTPUT
- cerr << "SipIdentity::setProxy: manual sipproxy success ... " << endl;
- #endif
- proxySetSuccess = true;
- } catch ( NetworkException & exc ){
- #ifdef DEBUG_OUTPUT
- cerr << "SipIdentity::setProxy: manual settings for SIP proxy are wrong ... trying autodetect" << endl;
- cerr << "SipIdentity::setProxy: error = " << exc.what() << endl;
- #endif
- }
- }
-
- if( !proxySetSuccess || autodetect) {
+ if( autodetect ) {
try{
this->sipProxy = new SipProxy( userUri, transport );
- //the transport may have fallen back to UDP ...
- transport = getSipProxy()->getTransport();
- proxyAddr = getSipProxy()->sipProxyAddressString;
- proxyPort = getSipProxy()->sipProxyPort;
proxySetSuccess = true;
} catch( NetworkException & exc ){
#ifdef DEBUG_OUTPUT
@@ -351,19 +296,30 @@
#endif
}
- MRef<SipProxy *> prox = getSipProxy();
- if( ! prox ) {
- #ifdef DEBUG_OUTPUT
- cerr << "SipIdentity::setProxy: creating fake proxy ..." << endl;
- #endif
- //if creation of proxy failed ... make a fake one, to save some of the data
- setSipProxy( new SipProxy() );
- prox = getSipProxy();
- prox->autodetectSettings = autodetect;
- prox->sipProxyAddressString = proxyAddr;
+ if( !proxySetSuccess ) {
+ try {
+ SipUri proxyUri( proxyAddr );
+ proxyUri.setPort( proxyPort );
+ proxyUri.setTransport( transport );
+
+ this->sipProxy = new SipProxy( proxyUri );
+ #ifdef DEBUG_OUTPUT
+ if( autodetect )
+ cerr << "SipIdentity::setProxy: creating fake proxy ..." << endl;
+ else
+ cerr << "SipIdentity::setProxy: manual sipproxy success ... " << endl;
+ #endif
+ proxySetSuccess = true;
+ } catch ( NetworkException & exc ){
+ #ifdef DEBUG_OUTPUT
+ cerr << "SipIdentity::setProxy: manual settings for SIP proxy are wrong ... trying autodetect" << endl;
+ cerr << "SipIdentity::setProxy: error = " << exc.what() << endl;
+ #endif
+ }
}
- prox->sipProxyPort = proxyPort;
- prox->setTransport( transport );
+
+ MRef<SipProxy *> prox = getSipProxy();
+ prox->autodetectSettings = autodetect;
return ret;
}
Modified: trunk/libmsip/source/SipUri.cxx
===================================================================
--- trunk/libmsip/source/SipUri.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libmsip/source/SipUri.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -387,3 +387,7 @@
return getParameter( "transport" );
}
+ostream& operator << (ostream& os, const SipUri& uri){
+ return os << uri.getString();
+}
+
Modified: trunk/libmsip/source/dialogs/SipDialog.cxx
===================================================================
--- trunk/libmsip/source/dialogs/SipDialog.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libmsip/source/dialogs/SipDialog.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -123,7 +123,7 @@
MRef<SipProxy *> proxy = getDialogConfig()->sipIdentity->getSipProxy();
if( !proxy.isNull() ){
- req->addRoute( proxy->sipProxyAddressString, proxy->sipProxyPort, proxy->getTransport() );
+ req->addRoute( proxy->getUri().getString() );
}
}
else if( dialogState.routeSet.size() > 0 ) {
@@ -455,14 +455,15 @@
//merr << "dialog state has a routeset" << end;
}
- if( isEstablished && ( isEarly || toTag == remoteTag ) )
- // Update route set only for an existing dialog
- return true;
-
MRef<SipHeaderValueContact *> c = resp->getHeaderValueContact();
if( c ){
remoteTarget = c->getUri().getString();
}
+
+ if( isEstablished && ( isEarly || toTag == remoteTag ) )
+ // Update only route set and target for an existing dialog
+ return true;
+
remoteUri = resp->getHeaderValueTo()->getUri().getString();
localUri = resp->getHeaderValueFrom()->getUri().getString();
Modified: trunk/libmsip/source/dialogs/SipDialogRegister.cxx
===================================================================
--- trunk/libmsip/source/dialogs/SipDialogRegister.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/libmsip/source/dialogs/SipDialogRegister.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -145,7 +145,7 @@
CommandString cmdstr(
dialogState.callId,
SipCommandString::register_ok,
- getDialogConfig()->sipIdentity->getSipProxy()->sipProxyAddressString);
+ getDialogConfig()->sipIdentity->getSipProxy()->getUri().getIp());
cmdstr["identityId"] = getDialogConfig()->sipIdentity->getId();
if (getGuiFeedback()){
sipStack->getCallback()->handleCommand("gui", cmdstr );
@@ -204,7 +204,7 @@
CommandString cmdstr(
dialogState.callId,
SipCommandString::ask_password,
- getDialogConfig()->sipIdentity->getSipProxy()->sipProxyAddressString);
+ getDialogConfig()->sipIdentity->getSipProxy()->getUri().getIp());
cmdstr["identityId"] = getDialogConfig()->sipIdentity->getId();
sipStack->getCallback()->handleCommand("gui", cmdstr );
//extract authentication info from received response
@@ -228,7 +228,7 @@
CommandString cmdstr(
dialogState.callId,
SipCommandString::ask_password,
- getDialogConfig()->sipIdentity->getSipProxy()->sipProxyAddressString);
+ getDialogConfig()->sipIdentity->getSipProxy()->getUri().getIp());
cmdstr["identityId"] = getDialogConfig()->sipIdentity->getId();
sipStack->getCallback()->handleCommand("gui", cmdstr );
//extract authentication info from received response
@@ -296,7 +296,7 @@
CommandString cmdstr(
dialogState.callId,
SipCommandString::register_ok,
- getDialogConfig()->sipIdentity->getSipProxy()->sipProxyAddressString);
+ getDialogConfig()->sipIdentity->getSipProxy()->getUri().getIp());
cmdstr["identityId"] = getDialogConfig()->sipIdentity->getId();
//TODO: inform GUI
if (getGuiFeedback()){
@@ -335,7 +335,7 @@
CommandString cmdstr(
dialogState.callId,
SipCommandString::ask_password,
- getDialogConfig()->sipIdentity->getSipProxy()->sipProxyAddressString);
+ getDialogConfig()->sipIdentity->getSipProxy()->getUri().getIp());
cmdstr["identityId"] = getDialogConfig()->sipIdentity->getId();
sipStack->getCallback()->handleCommand("gui", cmdstr );
//extract authentication info from received response
@@ -361,7 +361,7 @@
CommandString cmdstr(
dialogState.callId,
SipCommandString::register_ok,
- getDialogConfig()->sipIdentity->getSipProxy()->sipProxyAddressString);
+ getDialogConfig()->sipIdentity->getSipProxy()->getUri().getIp());
cmdstr["identityId"] = getDialogConfig()->sipIdentity->getId();
if (getGuiFeedback()){
sipStack->getCallback()->handleCommand("gui", cmdstr );
@@ -702,7 +702,7 @@
getDialogConfig()->inherited->getLocalSipPort(true), //if udp, use stun
getDialogConfig()->sipIdentity->getSipUri(),
dialogState.seqNo,
- getDialogConfig()->sipIdentity->getSipProxy()->getTransport(),
+ getDialogConfig()->sipIdentity->getSipProxy()->getUri().getTransport(),
getDialogConfig()->sipIdentity->getSipProxy()->getRegisterExpires_int()
);
Modified: trunk/minisip/minisip/gui/gtkgui/AccountsList.cxx
===================================================================
--- trunk/minisip/minisip/gui/gtkgui/AccountsList.cxx 2006-11-12 18:22:40 UTC (rev 2902)
+++ trunk/minisip/minisip/gui/gtkgui/AccountsList.cxx 2006-11-12 23:04:52 UTC (rev 2903)
@@ -69,9 +69,9 @@
(*iter)[columns->name] = (*i)->identityIdentifier;
(*iter)[columns->uri] = (*i)->getSipUri().getUserIpString();
(*iter)[columns->autodetectSettings] = (*i)->getSipProxy()->autodetectSettings;
- (*iter)[columns->proxy] = (*i)->getSipProxy()->sipProxyAddressString;
- (*iter)[columns->port] = (*i)->getSipProxy()->sipProxyPort;
- (*iter)[columns->transport] = (*i)->getSipProxy()->getTransport();
+ (*iter)[columns->proxy] = (*i)->getSipProxy()->getUri().getIp();
+ (*iter)[columns->port] = (*i)->getSipProxy()->getUri().getPort();
+ (*iter)[columns->transport] = (*i)->getSipProxy()->getUri().getTransport();
(*iter)[columns->doRegister] = (*i)->registerToProxy;
(*iter)[columns->username] = (*i)->getSipProxy()->sipProxyUsername;
(*iter)[columns->password] = (*i)->getSipProxy()->sipProxyPassword;
More information about the Minisip-devel
mailing list