diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-07 11:35:03 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-07 11:58:23 +0200 |
commit | 351ee39c1f117b96329726cf292e301a141643b6 (patch) | |
tree | ef0400879fad165602a3a3baa8082a167c4752b0 /main/freeswitch | |
parent | 681accfd53574470ff4f1faf0b73266e3e52b4a5 (diff) | |
download | aports-351ee39c1f117b96329726cf292e301a141643b6.tar.bz2 aports-351ee39c1f117b96329726cf292e301a141643b6.tar.xz |
main/freeswitch: fix reset of voicemail greeting
Upstream bug and pull request:
https://freeswitch.org/jira/browse/FS-1772
Diffstat (limited to 'main/freeswitch')
-rw-r--r-- | main/freeswitch/APKBUILD | 12 | ||||
-rw-r--r-- | main/freeswitch/fix-voicemail-greet-reset.patch | 48 |
2 files changed, 56 insertions, 4 deletions
diff --git a/main/freeswitch/APKBUILD b/main/freeswitch/APKBUILD index 1fc2e4af4a..e48a529cb2 100644 --- a/main/freeswitch/APKBUILD +++ b/main/freeswitch/APKBUILD @@ -3,7 +3,7 @@ # Contributor: Cameron Banta <cbanta@gmail.com> pkgname=freeswitch pkgver=1.4.20 -pkgrel=2 +pkgrel=3 pkgdesc="A communications platform written in C from the ground up" url="http://www.freeswitch.org" arch="all" @@ -70,6 +70,7 @@ source="http://files.freeswitch.org/$pkgname-$pkgver.tar.xz freeswitch-mod_shout-textrels.patch system-lame.patch 0001-FS-7969-resolve-Freeswitch-segfaults-due-to-pthread_.patch + fix-voicemail-greet-reset.patch " _builddir="$srcdir/$pkgname-$pkgver" @@ -223,7 +224,8 @@ c608cca8ad773acebf201f581438c7e7 freeswitch.confd 90b133b14a42c86d53d5e54dcbfbaf58 libshout-disable-examples.patch 4cd4923463c89bed053e6295b5a4ec40 freeswitch-mod_shout-textrels.patch 6a6c4aba80e99c236ef712b17f3cdd01 system-lame.patch -0d9dc1f09b6c150622bc59cdba86b89c 0001-FS-7969-resolve-Freeswitch-segfaults-due-to-pthread_.patch" +0d9dc1f09b6c150622bc59cdba86b89c 0001-FS-7969-resolve-Freeswitch-segfaults-due-to-pthread_.patch +ca7ef52c092f66b06dbf76dce2d05eb3 fix-voicemail-greet-reset.patch" sha256sums="46bb7e7f83dd616f268085c7e36fd45b48c3f02821dbea110211f0e10da16b09 freeswitch-1.4.20.tar.xz 816fb2d4baab09e2f51a7c1be75bc9e03ed09d4cf3c2cd03c183f433bb9b565f freeswitch-json-c-0.9.tar.gz 678c3860fd539402b5d1699b921239072af6acb4e72dc4720494112807cae411 freeswitch-flite-2.0.0-release.tar.bz2 @@ -237,7 +239,8 @@ aa0d89221ffa47eba4a0e085f6041ee198476409dd15d1e90c5c357ba683f432 freeswitch.ini db0d3c252b5664ecb071bcf6868eff77c85dd7943a63fcfcac7e19db6a0ff61f libshout-disable-examples.patch be1009327de615f04956ba0b0f44183f31c263e380af8027f94b976a84bcb09a freeswitch-mod_shout-textrels.patch 11b107ca8632bb9c8fcb2aedfcfb421af24929aace4f56c34d4e701eb410e190 system-lame.patch -1e3c67da8c17130d872213c718b8113f7cb08e67e166a91e2507facd8cd15b58 0001-FS-7969-resolve-Freeswitch-segfaults-due-to-pthread_.patch" +1e3c67da8c17130d872213c718b8113f7cb08e67e166a91e2507facd8cd15b58 0001-FS-7969-resolve-Freeswitch-segfaults-due-to-pthread_.patch +5581489ce522d8c46f9bfccb8ab2c581cc4cd6c2da9a8d9ed80ebfe8cbd59b70 fix-voicemail-greet-reset.patch" sha512sums="f7f3209ed5c6de4b0c92edd772d12f7a62342289db142d05f7559b0053f9e4e17d65f1d7680abdbda1743a4b30764bc13941c24edb9541265d2c08f99cbe0a64 freeswitch-1.4.20.tar.xz 38b8729275bbfebaee783e703d19481f3d32b50cfdeb338644b8db2742573ea025702c789b5ce8d5067dcde23c5a16b46231eaadf0b9c5dbff392d410912c772 freeswitch-json-c-0.9.tar.gz e2b353721d0316fbd7948f90f9c9561d080eebd50e8dd0449a9c803ffbdb060a469385fadd63f535ade8d627cba37928d8e72ac61d5bcf98f73ca5ebb66549f8 freeswitch-flite-2.0.0-release.tar.bz2 @@ -251,4 +254,5 @@ a585f6411185a26206137a1ad97a06fd6c73e80c5439e9be45eabfa70e7a83120169ba882971fcd3 91a6d7c8456de65855930b371f568f0230c28422e667453aa48fababd185b47677c06ff0c79f94c2a02182439b012d48cb54548cbde3d12b8d0e1ffbb9b229cc libshout-disable-examples.patch 5f085254ca9f5dc196afd39fc55e083b1998e776d9de2428e5657d99077526c33c1fc13f12432598184ce63138447fed7c318c384b743681703f5682dc8e1e50 freeswitch-mod_shout-textrels.patch 398dd0f2665415ff40348dc94d26ec7008fb59ec033f9d2c64dc1aa01071021f83f47954e95efc58c4033f22bb6da159e83e3b0d36b99189d5e7535ed6ae70bd system-lame.patch -342abf9f41b7d957759228d5d81aceba1f0862871e29e55f7b46b45001e77e40bc577020fc0f3e693645f39c54a69a13d16ad17776bc49b1f0f05a244c98d5f8 0001-FS-7969-resolve-Freeswitch-segfaults-due-to-pthread_.patch" +342abf9f41b7d957759228d5d81aceba1f0862871e29e55f7b46b45001e77e40bc577020fc0f3e693645f39c54a69a13d16ad17776bc49b1f0f05a244c98d5f8 0001-FS-7969-resolve-Freeswitch-segfaults-due-to-pthread_.patch +2cceb0d8a108499467047874a312046e17b252c3b5c0fa722069750345a9bd62fdfd6c4d13bc7fa7b1bd7be3b4b783f649f78995863c509949ead35a2270d704 fix-voicemail-greet-reset.patch" diff --git a/main/freeswitch/fix-voicemail-greet-reset.patch b/main/freeswitch/fix-voicemail-greet-reset.patch new file mode 100644 index 0000000000..10ab99a26e --- /dev/null +++ b/main/freeswitch/fix-voicemail-greet-reset.patch @@ -0,0 +1,48 @@ +diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c +index 624bb70..7aa96b7 100644 +--- a/src/mod/applications/mod_voicemail/mod_voicemail.c ++++ b/src/mod/applications/mod_voicemail/mod_voicemail.c +@@ -2214,10 +2214,10 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p + + + num = atoi(input); +- file_path = switch_mprintf("%s%sgreeting_%d.%s", dir_path, SWITCH_PATH_SEPARATOR, num, profile->file_ext); +- if (num < 1 || num > VM_MAX_GREETINGS) { ++ if (num < 0 || num > VM_MAX_GREETINGS) { + status = SWITCH_STATUS_FALSE; +- } else { ++ } else if (num > 0) { ++ file_path = switch_mprintf("%s%sgreeting_%d.%s", dir_path, SWITCH_PATH_SEPARATOR, num, profile->file_ext); + switch_file_handle_t fh = { 0 }; + memset(&fh, 0, sizeof(fh)); + greeting_args.input_callback = control_playback; +@@ -2234,15 +2234,25 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p + switch_event_t *params; + + TRY_CODE(switch_ivr_phrase_macro(session, VM_CHOOSE_GREETING_SELECTED_MACRO, input, NULL, NULL)); +- sql = +- switch_mprintf("update voicemail_prefs set greeting_path='%s' where username='%s' and domain='%s'", file_path, myid, ++ if (file_path == NULL) { ++ sql = ++ switch_mprintf("update voicemail_prefs set greeting_path=NULL where username='%s' and domain='%s'", myid, + domain_name); ++ } else { ++ sql = ++ switch_mprintf("update voicemail_prefs set greeting_path='%s' where username='%s' and domain='%s'", ++ file_path, myid, domain_name); ++ } + vm_execute_sql(profile, sql, profile->mutex); + switch_safe_free(sql); + + switch_event_create_subclass(¶ms, SWITCH_EVENT_CUSTOM, VM_EVENT_MAINT); +- switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Action", "change-greeting"); +- switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Greeting-Path", file_path); ++ if (file_path == NULL) { ++ switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Action", "remove-greeting"); ++ } else { ++ switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Action", "change-greeting"); ++ switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Greeting-Path", file_path); ++ } + switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-User", myid); + switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Domain", domain_name); + switch_channel_event_set_data(channel, params); |