Yes I see why now,<br><br>The template has the email addr in the To: header via the ${voicemail_email}<br>i added ${voicemail_notify_email} that is used in the new template.<br><br><br><div class="gmail_quote">On Wed, Jun 4, 2008 at 12:14 PM, Peder @ NetworkOblivion <<a href="mailto:peder@networkoblivion.com">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;">One issue. If you have both email and notify set, you get the email<br>
with the attachment, a notify to the notify address, but you also get a<br>
notify to the email address (3 messages total). It appears that the<br>
notify message is using the email header and then adding the notify<br>
email to the existing header, so you are getting the notify sent to two<br>
places. I haven't tried using a separate notify template yet.<br>
<div class="Ih2E3d"><br>
Anthony Minessale wrote:<br>
> 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<br>
> 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<br>
> notifications sent to"<br>
> vm-email-all-messages (default false) "send all messages to vm-mailto<br>
> addr (attachment based on vm-attach-file param)"<br>
> vm-notify-email-all-messages (default false) "send a notify email to<br>
> 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<br>
> also keep it locally as new vm for the phone.<br>
> when false means delete it as if<br>
> 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<br>
> define the new profile param "notify-template-file"<br>
><br>
><br>
><br>
><br>
><br>
> On Tue, Jun 3, 2008 at 1:25 PM, Peder @ NetworkOblivion<br>
</div><div class="Ih2E3d">> <<a href="mailto:peder@networkoblivion.com">peder@networkoblivion.com</a> <mailto:<a href="mailto:peder@networkoblivion.com">peder@networkoblivion.com</a>>> wrote:<br>
><br>
> 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>
><br>
> Anthony Minessale wrote:<br>
> > vm-mailto is just the value of your email address if you want to<br>
> send or<br>
> > not which is more specific than email-addr<br>
> > vm-email-all-messages is the actual param to adjust the<br>
> functionality.<br>
> ><br>
> ><br>
> > On Tue, Jun 3, 2008 at 12:39 PM, Peder @ NetworkOblivion<br>
> > <<a href="mailto:peder@networkoblivion.com">peder@networkoblivion.com</a> <mailto:<a href="mailto:peder@networkoblivion.com">peder@networkoblivion.com</a>><br>
</div>> <mailto:<a href="mailto:peder@networkoblivion.com">peder@networkoblivion.com</a><br>
<div><div></div><div class="Wj3C7c">> <mailto:<a href="mailto:peder@networkoblivion.com">peder@networkoblivion.com</a>>>> wrote:<br>
> ><br>
> > So I was messing with the voicemail to email and notify and<br>
> ran into an<br>
> > "issue". It appears that you have to have<br>
> vm-email-all-messages set to<br>
> > true and have an address in vm-mailto to send a notify. This<br>
> may or may<br>
> > not be the intention, but it just doesn't sound right to me.<br>
> I should<br>
> > be able to send a notify without sending an email as well. I<br>
> 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,<br>
> 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<br>
> email, or<br>
> > you have notify", then you are ok, which I think the below<br>
> will do:<br>
> ><br>
> > if (((send_mail && !switch_strlen_zero(email_vm)) ||<br>
> > !switch_strlen_zero(email_vm_notify)) &&<br>
> switch_file_exists(file_path,<br>
> > switch_core_session_get_pool(session)) ==<br>
> SWITCH_STATUS_SUCCESS) {<br>
> ><br>
> ><br>
> > The issue is that I kind of got lost in the logic below as to<br>
> how I<br>
> > would change these lines. This sends an email with attach<br>
> AND a notify<br>
> > if notify is set. If both are set, that is fine, but if<br>
> 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,<br>
> from,<br>
> > header_string, body, NULL);<br>
> > }<br>
> ><br>
> > switch_log_printf(SWITCH_CHANNEL_LOG,<br>
> 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<br>
> 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<br>
> that I don't<br>
> > match either of these with only notify set. Or is there an<br>
> 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<br>
> one per<br>
> > if/then/if so that we can see if it is with an attach,<br>
> 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",<br>
> 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",<br>
> email_vm);<br>
> > }<br>
> > if (!switch_strlen_zero(email_vm_notify)) {<br>
> > switch_simple_email(email_vm_notify,<br>
> from,<br>
> > header_string, body, NULL);<br>
> > switch_log_printf(SWITCH_CHANNEL_LOG,<br>
> > SWITCH_LOG_DEBUG, "Sending email notify to %s\n",<br>
> 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<br>
> and I am a<br>
> > rookie programmer and don't want to commit something that is<br>
> totally<br>
> > f'd up.<br>
> ><br>
> > Peder<br>
> ><br>
> > _______________________________________________<br>
> > Freeswitch-dev mailing list<br>
> > <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
> <mailto:<a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a>><br>
> > <mailto:<a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
> <mailto:<a href="mailto:Freeswitch-dev@lists.freeswitch.org">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>
> ><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">MSN:anthony_minessale@hotmail.com</a><br>
> <mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a>><br>
> > <mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a><br>
</div></div>> <mailto:<a href="mailto:MSN%25253Aanthony_minessale@hotmail.com">MSN%253Aanthony_minessale@hotmail.com</a>>><br>
<div class="Ih2E3d">> > GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
> <mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a>><br>
> > <mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a><br>
</div>> <mailto:<a href="mailto:PAYPAL%25253Aanthony.minessale@gmail.com">PAYPAL%253Aanthony.minessale@gmail.com</a>>><br>
<div class="Ih2E3d">> > 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>><br>
> <<a href="http://irc.freenode.net" target="_blank">http://irc.freenode.net</a>> #freeswitch<br>
> ><br>
> > FreeSWITCH Developer Conference<br>
> > <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
> <mailto:<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a>><br>
> > <mailto:<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a><br>
</div>> <mailto:<a href="mailto:sip%25253A888@conference.freeswitch.org">sip%253A888@conference.freeswitch.org</a>>><br>
<div class="Ih2E3d">> > <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
> <<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a>><br>
> > <<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a>><br>
> > <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
> <mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a>><br>
> > <mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a><br>
</div>> <mailto:<a href="mailto:googletalk%25253Aconf%25252B888@conference.freeswitch.org">googletalk%253Aconf%252B888@conference.freeswitch.org</a>>><br>
<div class="Ih2E3d">> > pstn:213-799-1400<br>
> ><br>
> ><br>
> ><br>
> ------------------------------------------------------------------------<br>
> ><br>
> > _______________________________________________<br>
> > Freeswitch-dev mailing list<br>
> > <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
</div><div><div></div><div class="Wj3C7c">> <mailto:<a href="mailto:Freeswitch-dev@lists.freeswitch.org">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>
> ><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">Freeswitch-dev@lists.freeswitch.org</a><br>
> <mailto:<a href="mailto:Freeswitch-dev@lists.freeswitch.org">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>
><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">MSN:anthony_minessale@hotmail.com</a><br>
> <mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a>><br>
> GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
> <mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">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>
><br>
> FreeSWITCH Developer Conference<br>
> <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
> <mailto:<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@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="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a>><br>
> <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
> <mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a>><br>
> pstn:213-799-1400<br>
><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org">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">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/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400