[Freeswitch-users] voicemail_say_phone_number

Darcy darcy at primrose.ws
Tue Feb 7 07:27:23 MSK 2012


If John’s works, use it, I could not make it work but the example I show below played the greeting before the clid, I have not added anything to play an annonymous greeting yet as I have not had time.

in mod_voicemail.c you have the following code:
if (!zstr(cbt->cid_number) && (vm_announce_cid = switch_channel_get_variable(channel, "vm_announce_cid"))) {
            switch_ivr_play_file(session, NULL, vm_announce_cid, NULL);
            switch_ivr_sleep(session, 500, SWITCH_TRUE, NULL);
            switch_ivr_say(session, cbt->cid_number, NULL, "name_spelled", "pronounced", NULL, NULL);
        }
Which indicates you will play the file in variable “vm_announce_cid”.   

Darcy
In Sunny Ottawa Canada

From: Bote Man 
Sent: Monday, February 06, 2012 11:14 PM
To: 'FreeSWITCH Users Help' 
Subject: Re: [Freeswitch-users] voicemail_say_phone_number

Well, now I'm cornfused. The original example by John used vm_announce_cid as a Boolean switch. But you've tested it as a string that points to the desired sound file?

 

I have no means to test this nor access to sources right now and I just added John's example to the wiki. I should back it out or correct it based on your results.

 

Please advise.

 

 

John Boteler

Bote Communications

in rainy Fort Lauderdale, FL

 

 

 

From: Darcy
Sent: Monday, 06 February, 2012 22:02



The message,   this_is_a_call_from actually has to be set in the dialplan it appears, the fs plays the file set in vm_announce_cid, a simple dial plan below reflects one way of doing this, tested and it works.   Needs more time to suit the total requirements, but this makes it a little more professional by adding the message in front of the number.

 

<extension name="vmain">

       <condition field="destination_number" expression="^\*98$">

             <action application="answer"/>

             <action application="set" data="vm_announce_cid=ivr/ivr-this_is_a_call_from.wav"/>             

             <action application="sleep" data="1000"/>

             <action application="voicemail" data="check default ${domain_name} ${sip_from_user}"/>

       </condition>

    </extension>

 

Darcy

 

…



On Mon, Feb 6, 2012 at 3:22 PM, John <freeswitch at earthspike.net> wrote:

Michael,

It does work, but it's a bit 'rough': all it does it speak the number just before the date.  So I can understand why it was not documented...
…

John

PS. For those who want to know where to insert this, put the line marked with + into your conf/dialplan/default.xml file:

    <!-- voicemail main extension -->
    <extension name="vmain">
      <condition field="destination_number" expression="^vmain$|^4000$|^\*98$">
        <action application="answer"/>
        <action application="sleep" data="1000"/>
+       <action application="set" data="vm_announce_cid=true" />
        <action application="voicemail" data="check default ${domain_name}"/>
      </condition>
    </extension>



On 06/02/12 22:00, Michael Collins wrote: 

Yuriy,

…Please set vm_announce_cid to true prior to checking voicemail and see if it works. If it does, please let me know. If you can add it to the wiki then do so, otherwise one of our intrepid community members will do it.

-MC

2012/2/6 Yuriy Nasida <nasida at live.ru>

Hello list,

 

I would like to have one simple ability to listen the phone number of caller when I check my voicemail. At present I listen date of message only. I have found the macro "voicemail_say_phone_number" in conf/lang/en/vm/sounds.xml. But... when FS uses it ?  Can I get it without modifying of source code of voicemail module ?

 

Please advise.

Thanks.

 

 



--------------------------------------------------------------------------------
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120206/9c9abe88/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list