[asterisk-dev] AGI SAY DATETIME not working as expected

Tilghman Lesher tlesher at digium.com
Fri Jan 29 10:48:25 CST 2010


On Friday 29 January 2010 10:03:54 Bryant Zimmerman wrote:
> Tilghman
>
> Thanks for your response.
>
>     1. Based on your respone the wiki is incorrect and the T option is not
> avaible as the time zone. It sounds like time zone prompts would need to be
> recored if nessassary then.
>      http://www.voip-info.org/wiki/view/say+datetime. Should I be able to
> specify a full path to our custom prompts folders so that they don't get
> wiped durring upgrades?

Custom prompts should never get wiped during an upgrade, assuming that you
use names that aren't otherwise in a sound package.

>     2.  As for specifying the [timezone] value. I tried putting in
> US/Centar and Central
>         They are listed under /usr/share/zoneinfo/US

US/Central (assuming you spell it correctly) should work fine as the timezone
name.  My personal preference is America/Chicago.

>         Here is what I came up with.
>             1. If the time zone file is under /usr/share/zoneinfo   You can
> specify it by name and it will use it.

Correct.

>             2. If the time zone is under a sub folder
> /usr/share/zondinfo/US/  ie.. Central, Eastern   You must specify the full
> path so it can use it.  /usr/share/zondinfo/US/Central

You should not have to.  The relative path should be fine.  I just verified
this on my own system:

<SIP/103-00000006>AGI Rx << SAY DATETIME 1264783622 "#" "IMp" US/Central
    -- <SIP/103-00000006> Playing 'digits/10.gsm' (language 'en')
    -- <SIP/103-00000006> Playing 'digits/40.gsm' (language 'en')
    -- <SIP/103-00000006> Playing 'digits/7.gsm' (language 'en')
    -- <SIP/103-00000006> Playing 'digits/a-m.gsm' (language 'en')
<SIP/103-00000006>AGI Tx >> 200 result=0
<SIP/103-00000006>AGI Rx << SAY DATETIME 1264783622 "#" "IMp" US/Eastern
    -- <SIP/103-00000006> Playing 'digits/11.gsm' (language 'en')
    -- <SIP/103-00000006> Playing 'digits/40.gsm' (language 'en')
    -- <SIP/103-00000006> Playing 'digits/7.gsm' (language 'en')
    -- <SIP/103-00000006> Playing 'digits/a-m.gsm' (language 'en')
<SIP/103-00000006>AGI Tx >> 200 result=0
<SIP/103-00000006>AGI Rx << SAY DATETIME 1264783622 "#" "IMp" US/Pacific
    -- <SIP/103-00000006> Playing 'digits/8.gsm' (language 'en')
    -- <SIP/103-00000006> Playing 'digits/40.gsm' (language 'en')
    -- <SIP/103-00000006> Playing 'digits/7.gsm' (language 'en')
    -- <SIP/103-00000006> Playing 'digits/a-m.gsm' (language 'en')
<SIP/103-00000006>AGI Tx >> 200 result=0

>             3. If you know the GMT numeric offset you can multiply it by -1
> and then pass it as a numeric as long as your time is in UTC

Your raw time is always in UTC.  This is part of what makes localization so
easy.

> And confirmations of this would be apperciated.
> If this information is correct I will update the wiki with it so that
> others don't have to go throught the same trial and errors I have.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list