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:
parent
17bd631324
commit
b0ccb30e5e
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue