Am 10.11.2010 15:29, schrieb Patrick Schaaf:
> for some time now, we noticed annoying messages like in $subject,
> under "asterisk -r", several per second, from some newer Grandstream
> GXP phones, and only when they are configured for nobody users.
>
> This makes using "asterisk -r" for debugging, a bit challenging...
>
> I'm not sure what exactly is going wrong there; an older GXP firmware
> 01.01.06.46 does not show the phenomenon, phone with firmware
> 01.02.03.03 do...
This "problem" is also with Snom phones.
> I "solved" the problem by making a change to prov/grandstream/
> settings.php - see diff below - making the "Subscribe for WMI" depend
> on whether we are provisioning for a nobody user, or a real user.
>
> Questions:
>
> - is there a more suitable check for "nobodies", instead of looking at
> 6-digit $user_ext beginning in 9500?
The nobody-users are not always begins with 95xxxxx. You can change
$NOBODY_EXTEN_PATTERN in config file /etc/gemeinschaft/gemeinschaft.php.
Your changes are fixed at 9500.
> - does it make sense to have Subscribe for WMI 1 for nobodies? If not,
> could this change be put into a future gemeinschaft release?
This diff have no function, when $NOBODY_EXTEN_PATTERN != '95xxxx'
Sebastian
Ich glaube es gibt keine.
Könnte man entweder aus der Datenbank abfragen (ungetestet):
$is_nobody = (bool)$db->executeGetOne(
'SELECT `nobody_index` FROM `users` WHERE `id`='. (int)$user_id );
oder so bestimmen (bin grad nicht sicher was schöner ist):
$nbdy_ep = rtrim( gs_get_conf('NOBODY_EXTEN_PATTERN'), 'xX'); # e.g. "95"
$is_nobody = (substr($user_ext, 0, strlen($nbdy_ep)) == $nbdy_ep)
und dann entsprechend die mailbox/voicemail-Taste belegen und MWI-
Subscription anschalten oder eben nicht.
Wenn man das für Grandstream macht wäre es natürlich schön das auch
für die anderen Telefone zu haben.
Ist aber vielleicht kein Muß.
Evtl. könnte man den obigen Code in opt/gemeinschaft/inc/prov-fns.php
einbauen. Die Datei wird von allen Provisionings includet.
function gs_prov_is_nobody_user( $user_id )
{
//...
}
Philipp
Ich werde dies heute abend testen und dann commiten.
Bei Snoms bin ich gerade dran.
Sebastian