|Summary:||ASTERISK-10915: SMDI MWI configuration on a per-user basis|
|Reporter:||James Rothenberger (jaroth)||Labels:|
|Date Opened:||2007-11-28 13:10:28.000-0600||Date Closed:||2007-12-27 15:47:48.000-0600|
|Environment:||Attachments:||( 0) usesmdi.patch|
|Description:||This patch provides the ability to use SMDI for MWI on a per-user basis. By adding the directive "usesmdi=yes" in a user's voicemail configuration, that user can be notified via SMDI. This is useful for mixed environments where some users need SMDI notification and others do not. This patch also includes the ability to use a notification station number that is different than the extension. Currently the station is set to the user's extension. By adding the directive "smdistation=xxxx" to a user's voicemail configuration, a different SMDI station can be tied to that user. This is also useful in mixed environments.|
|Comments:||By: Mark Michelson (mmichelson) 2007-12-27 15:43:08.000-0600|
I have a couple of suggestions with regards to this patch:
1. Instead of making usesmdi a 4-byte buffer (presumably to store a value like "yes"), make it an int and set it to ast_true() on the value that the user set in voicemail.conf. That way you only have to call ast_true the one time and can just check to see if usesmdi is non-zero in run_externnotify. Another potential problem with the way it's implemented now is that if a user sets "usemsdi=true", this will not have the desired effect since ast_copy_string will only copy "tru" into usesmdi to account for the needed null byte at the end.
2. Use ast_strlen_zero instead of checking if smdistation is not NULL. The reason for this is that since smdistation is a statically sized character buffer, it will never be NULL.
By: Russell Bryant (russell) 2007-12-27 15:47:48.000-0600
Thank you for the contribution. I have another patch that is implemented in a different way to provide the same functionality.
Essentially, there is a thread in res_smdi in charge of monitoring MWI for the appropriate mailboxes. You also provide mappings between SMDI station numbers and asterisk voicemail boxes.
The code is in ...
The example configuration is in ...