Added "address" and "version" settings so MGCP can become operational even if no RSIP is received.

git-svn-id: http://voip.null.ro/svn/yate@2738 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2009-06-25 18:27:24 +00:00
parent 17bd631324
commit b0ccb30e5e
2 changed files with 26 additions and 1 deletions

View File

@ -44,12 +44,23 @@
; user: string: Remote MGCP resource name
;user=
; host: ipaddress: IP address of the gateway, mandatory
; host: ipaddress: IP address or hostname of the gateway, mandatory
;host=
; port: int: Remote port to send packets to
;port=2427
; address: ipaddress: IP address of the gateway, if present will override
; resolving the host name and will immediately make the span operational
; without waiting for a remote RSIP
;address=
; version: string: Protocol name and version to use initially, if left blank
; will autodetect from first received RSIP, until then uses MGCP 1.0
; Depending on remote capabilities and settings it is possible to use the SGCP
; or TGCP protocols too.
;version=
; default: bool: This is the default gateway to send commands to
; The first gateway which is not explicitely disabled or the last that is
; explicitely enabled will become default

View File

@ -852,6 +852,20 @@ bool MGCPSpan::init(const NamedList& params)
if (clear)
circuit->needClear();
}
if (ok) {
m_version = config->getValue("version");
const char* addr = config->getValue("address");
if (addr) {
MGCPEpInfo* ep = s_endpoint->find(epId().id());
if (ep) {
SocketAddr a(ep->address);
a.host(addr);
operational(a);
}
}
}
return ok;
}