by wasca » Fri Mar 02, 2012 3:51 pm
Hi dpodolsky
Thanks for our reply. I'll try to explain in full why I'm trying to do all this.
Our support team policy works like this...
1. A client calls us and is asked to leave a message. This messages is saved to the support virtual extension 390.
2. The message is then emailed to a support team shared mailbox (in this case our custom internal crm system)
3. A Support staff member takes ownership of (claims) the voicemail email, no other staff will touch this email.
4. The Support staff member then proceeds to click the crafted url that I spoke about in earlier postings.
5. The voicemail is then sent to that support staff members pbx extension account.
6. Their snom300 phone is then automatically dialled to their voicemail and then the staff member listens to the message and then contacts the client if needed.
7. Once the staff member has listened to the message they delete it from their extensions voicemail account. If for some reason they need to listen to it again after they have deleted it, they simply go back to the email they claimed and click the link again and the process start's over again.
8. The original message that is saved in the virtual extension 390 is then (at the end of the working day) archived into our saved phone messages (I'm yet to write this code, so at the moment they will just stay in 390's inbox and be marked as read.)
Now onto answering your questions.
1. Feature Path
I'm aware of this option, however this will just blanket send to all our staff members, I would have no control over who is answering (claiming) the voicemail, so this wont work.
2. Forward from User
I was also aware of this but this too does not allow me to control who takes ownership of the voicemail.
3. Developer Path (your original path / question)
>>When the email gets generated it hasn't been stored yet and thus there isn't a valid message id
That's annoying that would have really helped, however when you do store message details in the database you could store the %VM_MSGNUM% in the same row with the message id, No? then in the api method Switchvox.users.voicemail.forward you could have the ability to reference a message perhaps like this <message_num>vm-F7D41S42a6mVNE8Lu5jJ4Q</message_num>. Now that would be super cool.
>>However, at that time you do have other information you can match up like caller id number, name, duration, date, etc.
Yes, I've discovered that already and that's what I've been doing so far, however it's not perfect. I've noticed the date time stamp put in the email template is nearly always about 2 seconds different to the date time stamp shown in the results from users.voicemail.getList.
Caller ID is not always dependable because some times there simply is no information for this i.e. Caller ID Blocked.
Duration is almost unusable. In the database you store the duration in seconds and miliseconds like this "24.67" however I noticed in the email template your code simply trims the miliseconds off and all I can send in the crafted url is "24"
>>The only problem with this is if you have had multiple voicemails being left in the same mailbox from the same caller, for the same duration, within seconds of each other (very unlikely but I have to point it out).
Yes I thought of this too, although it's possible, it would be highly unlikely to ever happen.
So what have I come up with so far? It's not perfect but it's working. I'm matching on a combination of Caller ID and date timestamp with a tolerance of +5 seconds. If the Caller ID is blocked, then I use date time stamp with a tolerance of +5 seconds and the "trimmed" duration.
So to finish up, it would be really handy if the %VM_MSGNUM% was stored in the database so we could reference it like this <message_num>vm-F7D41S42a6mVNE8Lu5jJ4Q</message_num> in the api
Wasca