|
546 | 546 | as the same as the from.</para>
|
547 | 547 | </description>
|
548 | 548 | </manager>
|
| 549 | + <managerEvent language="en_US" name="VoicemailPasswordChange"> |
| 550 | + <managerEventInstance class="EVENT_FLAG_USER"> |
| 551 | + <synopsis>Raised in response to a mailbox password change.</synopsis> |
| 552 | + <syntax> |
| 553 | + <parameter name="Context"> |
| 554 | + <para>Mailbox context.</para> |
| 555 | + </parameter> |
| 556 | + <parameter name="Mailbox"> |
| 557 | + <para>Mailbox name.</para> |
| 558 | + </parameter> |
| 559 | + <parameter name="NewPassword"> |
| 560 | + <para>New password for mailbox.</para> |
| 561 | + </parameter> |
| 562 | + </syntax> |
| 563 | + </managerEventInstance> |
| 564 | + </managerEvent> |
549 | 565 | ***/
|
550 | 566 |
|
551 | 567 | #ifdef IMAP_STORAGE
|
@@ -1849,6 +1865,16 @@ static int reset_user_pw(const char *context, const char *mailbox, const char *n
|
1849 | 1865 | res = 0;
|
1850 | 1866 | }
|
1851 | 1867 | AST_LIST_UNLOCK(&users);
|
| 1868 | + if (!res) { |
| 1869 | + struct ast_json *json_object; |
| 1870 | + |
| 1871 | + json_object = ast_json_pack("{s: s, s: s, s: s}", |
| 1872 | + "Context", S_OR(context, "default"), |
| 1873 | + "Mailbox", mailbox, |
| 1874 | + "NewPassword", newpass); |
| 1875 | + ast_manager_publish_event("VoicemailPasswordChange", EVENT_FLAG_SYSTEM | EVENT_FLAG_USER, json_object); |
| 1876 | + ast_json_unref(json_object); |
| 1877 | + } |
1852 | 1878 | return res;
|
1853 | 1879 | }
|
1854 | 1880 |
|
@@ -1892,7 +1918,7 @@ static void vm_change_password(struct ast_vm_user *vmu, const char *newpassword)
|
1892 | 1918 | ast_copy_string(vmu->password, newpassword, sizeof(vmu->password));
|
1893 | 1919 | break;
|
1894 | 1920 | } else {
|
1895 |
| - ast_verb(4, "Writing voicemail password to file %s failed, falling back to config file\n", secretfn); |
| 1921 | + ast_log(LOG_WARNING, "Writing voicemail password to file %s failed, falling back to config file\n", secretfn); |
1896 | 1922 | }
|
1897 | 1923 | /* Fall-through */
|
1898 | 1924 | case OPT_PWLOC_VOICEMAILCONF:
|
|
0 commit comments