This feature was a patch we probably should have looked at closer?<br><br>I reverted it and wrote a new one, please test as i am not able to atm this is a blind commit.<br><br>vm-mailto (default undef) "the addr you want main email"<br>
vm-notify-mailto (default same as vm-mailto) "the addr you want notifications sent to"<br>vm-email-all-messages (default false) "send all messages to vm-mailto addr (attachment based on vm-attach-file param)"<br>
vm-notify-email-all-messages (default false) "send a notify email to vm-notify-mailto when a vm is left (never has attachment)"<br>vm-keep-local-after-email (default true) when you email the main message also keep it locally as new vm for the phone.<br>
when false means delete it as if it never happened and just email it.<br>vm-attach-file (default true) attach the audio file to the main email<br><br>the notify email will use the same template as the main email unless you define the new profile param "notify-template-file"<br>
<br><br><br><br><br><div class="gmail_quote">On Tue, Jun 3, 2008 at 1:25 PM, Peder @ NetworkOblivion <<a href="mailto:peder@networkoblivion.com" target="_blank">peder@networkoblivion.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Right, but if you don't have "vm-email-all-messages" and "vm-mailto",<br>
you can't send a notify. In other words it is either email only, or<br>
email and notify. You can't just do notify.<br>
<div><br>
Anthony Minessale wrote:<br>
> vm-mailto is just the value of your email address if you want to send or<br>
> not which is more specific than email-addr<br>
> vm-email-all-messages is the actual param to adjust the functionality.<br>
><br>
><br>
> On Tue, Jun 3, 2008 at 12:39 PM, Peder @ NetworkOblivion<br>
</div><div><div></div><div>> <<a href="mailto:peder@networkoblivion.com" target="_blank">peder@networkoblivion.com</a> <mailto:<a href="mailto:peder@networkoblivion.com" target="_blank">peder@networkoblivion.com</a>>> wrote:<br>
><br>
> So I was messing with the voicemail to email and notify and ran into an<br>
> "issue". It appears that you have to have vm-email-all-messages set to<br>
> true and have an address in vm-mailto to send a notify. This may or may<br>
> not be the intention, but it just doesn't sound right to me. I should<br>
> be able to send a notify without sending an email as well. I think I<br>
> found the culprit at line 1926, it is:<br>
><br>
> if (send_mail && !switch_strlen_zero(email_vm) &&<br>
> switch_file_exists(file_path, switch_core_session_get_pool(session)) ==<br>
> SWITCH_STATUS_SUCCESS) {<br>
><br>
><br>
> My thought was to instead say "if you have email-all and an email, or<br>
> you have notify", then you are ok, which I think the below will do:<br>
><br>
> if (((send_mail && !switch_strlen_zero(email_vm)) ||<br>
> !switch_strlen_zero(email_vm_notify)) && switch_file_exists(file_path,<br>
> switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {<br>
><br>
><br>
> The issue is that I kind of got lost in the logic below as to how I<br>
> would change these lines. This sends an email with attach AND a notify<br>
> if notify is set. If both are set, that is fine, but if only notify is<br>
> set, I don't want to send an email. Line 2014:<br>
><br>
><br>
> if (email_attach) {<br>
> switch_simple_email(email_vm, from,<br>
> header_string, body, file_path);<br>
> } else {<br>
> switch_simple_email(email_vm, from,<br>
> header_string, body, NULL);<br>
> }<br>
> if (!switch_strlen_zero(email_vm_notify)) {<br>
> switch_simple_email(email_vm_notify, from,<br>
> header_string, body, NULL);<br>
> }<br>
><br>
> switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,<br>
> "Sending message to %s\n", email_vm);<br>
><br>
><br>
> I wasn't sure if I needed to say "if email_attach and send_mail and<br>
> !zero(email_vm)" and then the else would be an elseif of "if<br>
> email_attach and send_mail and zero(email_vm)" to make sure that I don't<br>
> match either of these with only notify set. Or is there an easier way<br>
> to say it to make sure I don't miss something?<br>
><br>
> Also, I think the log message would be better if there was one per<br>
> if/then/if so that we can see if it is with an attach, without, or just<br>
> a notify.<br>
><br>
> if (email_attach) {<br>
> switch_simple_email(email_vm, from,<br>
> header_string, body, file_path);<br>
> switch_log_printf(SWITCH_CHANNEL_LOG,<br>
> SWITCH_LOG_DEBUG, "Sending email with attachment to %s\n", email_vm);<br>
> } else {<br>
> switch_simple_email(email_vm, from,<br>
> header_string, body, NULL);<br>
> switch_log_printf(SWITCH_CHANNEL_LOG,<br>
> SWITCH_LOG_DEBUG, "Sending email without attachment to %s\n", email_vm);<br>
> }<br>
> if (!switch_strlen_zero(email_vm_notify)) {<br>
> switch_simple_email(email_vm_notify, from,<br>
> header_string, body, NULL);<br>
> switch_log_printf(SWITCH_CHANNEL_LOG,<br>
> SWITCH_LOG_DEBUG, "Sending email notify to %s\n", email_vm_notify);<br>
> }<br>
><br>
> switch_safe_free(body);<br>
><br>
><br>
> And before anybody says it, I don't have cvs commit access and I am a<br>
> rookie programmer and don't want to commit something that is totally<br>
> f'd up.<br>
><br>
> Peder<br>
><br>
> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">Freeswitch-dev@lists.freeswitch.org</a><br>
</div></div>> <mailto:<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">Freeswitch-dev@lists.freeswitch.org</a>><br>
<div>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Anthony Minessale II<br>
><br>
> FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
> ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
><br>
> AIM: anthm<br>
> <a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
</div>> <mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com" target="_blank">MSN%3Aanthony_minessale@hotmail.com</a>><br>
<div>> GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
</div>> <mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com" target="_blank">PAYPAL%3Aanthony.minessale@gmail.com</a>><br>
> IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> <<a href="http://irc.freenode.net" target="_blank">http://irc.freenode.net</a>> #freeswitch<br>
<div>><br>
> FreeSWITCH Developer Conference<br>
> <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
</div>> <mailto:<a href="mailto:sip%253A888@conference.freeswitch.org" target="_blank">sip%3A888@conference.freeswitch.org</a>><br>
<div>> <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
</div>> <<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a>><br>
<div>> <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
</div>> <mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org" target="_blank">googletalk%3Aconf%2B888@conference.freeswitch.org</a>><br>
> pstn:213-799-1400<br>
><br>
><br>
> ------------------------------------------------------------------------<br>
<div><div></div><div>><br>
> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">Freeswitch-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400