/// <summary> /// Construye y envía el notify con los miembros de la conferencia. /// El primer miembro soy yo mismo, con todos los numeros a los que atiendo. /// Se llama cuando alguien se suscribe (1) y cuando se añaden miembros a la conferencia (2). /// Tiene un parametro opcional callId. Si viene, se envia el notify al miembro que /// contiene ese callId (1). El comportamiento por defecto es que si no viene el parámetro /// se envia a todos los miembros de la conferencia (2). /// </summary> /// <param name="callId" parámetro opcional, callId ></param> /// <returns> </returns> private void NotifyConfInfo(int callId = -1) { _Logger.Trace("NotifyConfInfo "); if (_Members.Count > 0) { CORESIP_ConfInfo info = new CORESIP_ConfInfo(); info.Version = ++_Version; info.Users = new CORESIP_ConfInfo.ConfUser[SipAgent.CORESIP_MAX_CONF_USERS]; int j = 0; foreach (StrNumeroAbonado num in Top.Cfg.HostAddresses) { info.Users[j].Id = string.Format("<sip:{0}@{1}>", num.NumeroAbonado, Top.SipIp);; info.Users[j++].Name = Top.Cfg.PositionId; } int i; info.UsersCount = (uint)(_Members.Count + j);; for (i = j; i < info.UsersCount; i++) { TlfPosition member = _Members[i - j]; info.Users[i].Id = member.Uri; info.Users[i].Name = member.Literal; if (member == _Intruder) { info.Users[i].Role = "Intruder"; } } foreach (TlfPosition member in _Members) { if ((callId == -1) || (callId == member.CallId)) { SipAgent.SendConfInfo(member.CallId, info); } } } }