Picture of Maikel Schaap
Registered 10 years 214 days
Maikel Schaap Wednesday, 15 November 2017, 02:08 PM
Voicemail XML - Name of first forwarder in e-mail
Hi,

I'm trying to send the name of the forwarding WQ, to show up in the subject of the e-mail i'm sending, using the standard Voicemail XML script.

According to the voicemail schema, this variable should be available through out-leg2-orig-name. Sadly, it won't show the name in the sent e-mail.

What I've tried...

In vm.xml I've tried to get this variable, by adding it to the pbx-getcallinfo object and assign it to a new variable:

<pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" out-leg2-orig-name="$queuename"/>

Then in e-mail.xml, I've added the newly created $queuename variable to the subject. Sadly, the value seems to be empty.

Any help with this would be appreciated smile

Best regards,
Maikel
Picture of Gerrit Beuko (innovaphone)
Moderator Registered 13 years 282 days
Gerrit Beuko (innovaphone) Thursday, 16 November 2017, 11:22 AM
Re: Voicemail XML - Name of first forwarder in e-mail
Moved to discussion. Maybe anyone else in the community already had the same requirement and have some hints.

Gerrit
Picture of Ole 60
Registered 15 years 301 days
Ole 60 Thursday, 16 November 2017, 05:29 PM in response to Maikel Schaap
Re: Voicemail XML - Name of first forwarder in e-mail
Hi
You can write your text to a file.txt, and use this file.txt as a variable in the exec command.
See how we do it in an "Advice on Busy" XML: http://wiki.innovaphone.com/index.php?title=Howto:Advice_On_Busy#Configuration

-ole
Picture of Maikel Schaap
Registered 10 years 214 days
Maikel Schaap Friday, 17 November 2017, 09:34 AM
Re: Voicemail XML - Name of first forwarder in e-mail
Hi Ole,

I'm not sure how I could use this. Let me explain the scenario:

An incoming call is routed to a WQ, e.g. with name Queue John and extension 300. A welcoming message is played and after this, the call is forwarded using a CFNR to another WQ, with the actual agents in it.

I need to know the name of the first WQ, so I can add this value in the subject of the e-mail, when people leave a voicemail message.

So I'm not sure how I can do this, with the text files.

> Maikel
Picture of Ole 60
Registered 15 years 301 days
Ole 60 Friday, 17 November 2017, 07:05 PM
Re: Voicemail XML - Name of first forwarder in e-mail
Hi Maikel
I have no experience with the out-leg2-orig-name option in the <pbx-get-callinfo command. So if the problem is to get this information, I can't help you.
But if the problem is to place it in the subject of an email, I have linked together several text phrases into the subject field in the email exec.

Here you see an example:

<exec url="mailto:$to?fromname=$fromname&amp;from=$from&amp;subject=$message_subject&amp;subject=$cgpn&amp;body=$message&amp;body=$cgpn&amp;srv=$server&amp;usr=$user&amp;pwd=$password&amp;file=$file"/>

$message_subject = "call from "
$cgpn = 12345678
Subject in Email will be: "call from 12345678"

-ole
Picture of Richard 184
Registered 13 years 31 days
Richard 184 Sunday, 19 November 2017, 10:31 AM in response to Maikel Schaap
1 of 1 users consider this post helpful
Re: Voicemail XML - Name of first forwarder in e-mail
Just saw this post.

Adjusted the scenario:
700 WQ-Welcome : CFNR to 701
701 WQ-Test001 : CFNR to 799701
799 Voicemail

Changed the XML to:
<pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" out-leg2-orig-name="$queuename" />

Result:
U heeft een nieuw voicemail bericht ontvangen van: WQ-Welcome

Seems to work fine @ 12r2 sr6 IPVA[12.5236], Bootcode[1000], Hardware[0]
Picture of Maikel Schaap
Registered 10 years 214 days
Maikel Schaap Monday, 20 November 2017, 09:21 AM
Re: Voicemail XML - Name of first forwarder in e-mail
Hi Richard,

That's strange, as that is exactly what I'm trying.

The complete scenario:
QUEUE 800: Company_name
Welcoming message and then a CFNR to 900
QUEUE 900: Agent queue
Agent queue with two announcements and CFNR to *25899
*25 -> VM
899 -> User with e-mailaddress

Vm.xml
<pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" out-leg2-orig-name="$queuename" />

email.xml
<exec url="mailto:$to?from=$to&amp;subject=$subject&amp;subject=$queuename&amp;srv=$server&amp;usr=$user&amp;pwd=$password&amp;file=$file" out-error="$exec-err"/>

My result:
U heeft een nieuw voicemail bericht ontvangen van:

Version of test PBX:
12r1 sr7 IPVA[12.1076]

I'll try and update the PBX to see if that fixes the issue. If not, I'll then upload both XML files. Maybe I made a mistake somewhere else.

> Maikel
Picture of Maikel Schaap
Registered 10 years 214 days
Maikel Schaap Monday, 20 November 2017, 11:41 AM in response to Richard 184
Re: Voicemail XML - Name of first forwarder in e-mail
Hi Richard,

I'm going crazy I think mixed.

I've updated my test PBX to 12 r2 SR6 and just like that, it worked. So I suspected a firmware issue.

After that, I copied the complete VM folder to our customers PBX and tested is. Still no value. Tried upgrading the firmware of our customers PBX, still no value.
Checked the VM settings, both the same. On one PBX I getting the WQ name in the e-mail. In the other, nothing.

What could be wrong now...
Picture of Maikel Schaap
Registered 10 years 214 days
Maikel Schaap Monday, 20 November 2017, 12:41 PM in response to Richard 184
1 of 1 users consider this post helpful
Re: Voicemail XML - Name of first forwarder in e-mail
Hi Richard,

I already found the issue... Hide connected endpoint was enabled on the VM user's object. After disabling this,the queue info was send in the subject.

I found out about this, after making a wireshark trace of both machines. On my test machine:

vm.9(T):diverted call diverting=207:'Maikel Schaap:Maikel Schaap' orig=297:'WQ_Welkom2' count=1 reason=1 orig-reason=1

You see the orig value is set. As soon as you enable the hide connected endpoint flag, this value is no longer set.

vm.9(T):diverted call diverting=207:'Maikel Schaap:Maikel Schaap' orig=: count=1 reason=1 orig-reason=1

Thank you all for the help smile

> Maikel
Picture of Richard 184
Registered 13 years 31 days
Richard 184 Sunday, 19 November 2017, 10:10 AM in response to Maikel Schaap
Re: Voicemail XML - Name of first forwarder in e-mail
Hi Maikel,

Can you explain the setup in more detail?

I did a test setup with the following objects:
700 WQ-Test001 (Waiting Queue object)
799 Voicemail (Voicemail Object)

Added a CFU on the 700 object to 799700
Added an e-mail address to the URL config of 700

Uploaded the voicemail scripts and adjusted it:
Vm.xml
<pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2"/>
<pbx-finduser-e164 e164="$cdpn" out-cn="$queuename" />
<pbx-finduser-e164 e164="$leg2" out-cn="$cn" />

email.xml
<exec url="mailto:$to?from=$to&amp;subject=$subject&amp;subject=$queuename&amp;srv=$server&amp;usr=$user&amp;pwd=$password&amp;file=$file" out-error="$exec-err"/>


this resulted in the function you require:
'U heeft een nieuw voicemail bericht ontvangen van: WQ-Test001'

So if you can explain your setup in detail i can check if i can get that scenario to work.
← You can define your color theme preference here