Leave the tel: URIs untouched when sent on an outbound SIP call.
Also don't add sip: in front of sip:number URIs (we turned to sip:sip:number). git-svn-id: http://yate.null.ro/svn/yate/trunk@4194 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
c9a2c40f32
commit
5278f71b7f
|
@ -1970,18 +1970,21 @@ YateSIPConnection::YateSIPConnection(Message& msg, const String& uri, const char
|
|||
YateSIPLine* line = 0;
|
||||
if (m_line) {
|
||||
line = plugin.findLine(m_line);
|
||||
if (line && (uri.find('@') < 0)) {
|
||||
if (!uri.startsWith("sip:"))
|
||||
tmp = "sip:";
|
||||
tmp << uri << "@" << line->domain();
|
||||
}
|
||||
if (line)
|
||||
if (line) {
|
||||
if (uri.find('@') < 0 && !uri.startsWith("tel:")) {
|
||||
if (!uri.startsWith("sip:"))
|
||||
tmp = "sip:";
|
||||
tmp << uri << "@" << line->domain();
|
||||
}
|
||||
m_externalAddr = line->getLocalAddr();
|
||||
}
|
||||
}
|
||||
if (tmp.null()) {
|
||||
int sep = uri.find(':');
|
||||
if ((sep < 0) || ((sep > 0) && (uri.substr(sep+1).toInteger(-1) > 0)))
|
||||
tmp = "sip:";
|
||||
if (!(uri.startsWith("tel:") || uri.startsWith("sip:"))) {
|
||||
int sep = uri.find(':');
|
||||
if ((sep < 0) || ((sep > 0) && (uri.substr(sep+1).toInteger(-1) > 0)))
|
||||
tmp = "sip:";
|
||||
}
|
||||
tmp << uri;
|
||||
}
|
||||
m_uri = tmp;
|
||||
|
|
Loading…
Reference in New Issue