SayDigits($ {EXTEN} how to change it to German

SayDigits(${EXTEN} is what we use in the dial plan to say the digits that is dialed, it is in english .
want to play the say digit in German

Just add before; SayDigits(${EXTEN})
Set(CHANNEL(language)=ge)

“ge” it refer to the directory where have German recording files.

If you set the language option in the CHANNEL() function, it will control how numbers are read, etc. It will also look for sound prompts in that language, if they exist.

For example, do this in the dialplan:

Set(CHANNEL(language)=de)

Appreciate your response here , i am very new to this

so ${EXTEN} function refers to recording? or it is function that spells the digits without recording .
here is my dial plan. Where do i have to specify the channel language

exten => +49695880780272,1,Answer()
exten => +4969588123456,2,Wait(1)
exten => +4969588123456,3,Playback(de_sorry_g2m_1)
exten => +4969588123456,4,SayDigits({EXTEN}) exten => +4969588123456,5,Playback(de_sorry_g2m_2) exten => +4969588123456,6,Wait(1) exten => +4969588123456,7,Playback(G2MChg1) exten => +4969588123456,8,SayDigits({EXTEN})
exten => +4969588123456,9,Playback(G2MChg2)
exten => +4969588123456,10,Wait(1)
exten => +4969588123456,11,Hangup()

Appreciate your response here , i am very new to this

so ${EXTEN} function refers to recording? or it is function that spells the digits without recording .
here is my dial plan. Where do i have to specify the channel language

exten => +49695880780272,1,Answer()
exten => +4969588123456,2,Wait(1)
exten => +4969588123456,3,Playback(de_sorry_g2m_1)
exten => +4969588123456,4,SayDigits({EXTEN}) exten => +4969588123456,5,Playback(de_sorry_g2m_2) exten => +4969588123456,6,Wait(1) exten => +4969588123456,7,Playback(G2MChg1) exten => +4969588123456,8,SayDigits({EXTEN})
exten => +4969588123456,9,Playback(G2MChg2)
exten => +4969588123456,10,Wait(1)
exten => +4969588123456,11,Hangup()

Please edit your post to enclose your dialplan in 'Preformatted text' tags. As presented, I count a half dozen or so errors.

Please consider using 'same = n' instead of 'exten = +49xxxx,x'. It will make your life easier and your dialplan more readable.

'${EXTEN}' is a channel variable (usually, initially) with the value of the dialed number as presented by your provider. 'saydigits()' will say the digits :slight_smile:

If you are in Germany, maybe setting the 'defaultlanguage' in 'asterisk.conf' is your best solution.

If you choose not to set the system wide default language , your dialplan should look something like:

[incoming-calls-from-isp-xxx]
        exten = +49695880780272,        verbose(1,[${EXTEN}@${CONTEXT}])
        same = n,                       answer(1)
        same = n,                       set(CHANNEL(language)=de)
        same = n,                       playback(de_sorry_g2m_1)
        .
        .
        .

${EXTEN} function It refers to “+49695880780272” SayDigits will play 49695880780272

i wanted the digit to be said in German instead of english and yes don’t want to set the default language to German.

Can you format again what you mentioned above correctly it seems it got messed while pasting …Thanks

tried this but got the error

exten => 18722400000, Verbose(1,[{EXTEN}@{CONTEXT}])
same = n, Answer()
same = n, Set(CHANNEL(language)=de)
same = n, SayDigits(${EXTEN})
same = n, Hangup()

[May 22 23:16:15] WARNING [17574]: pbx_config.c : 1781 pbx_load_config : Label missing trailing ‘)’ at line 26 of extensions.conf

[May 22 23:16:15] WARNING [17574]: pbx_config.c : 1797 pbx_load_config : Can’t use ‘next’ priority on the first entry at line 27 of extensions.conf!

[May 22 23:16:15] WARNING [17574]: pbx_config.c : 1797 pbx_load_config : Can’t use ‘next’ priority on the first entry at line 28 of extensions.conf!

[May 22 23:16:15] WARNING [17574]: pbx_config.c : 1797 pbx_load_config : Can’t use ‘next’ priority on the first entry at line 29 of extensions.conf!

[May 22 23:16:15] WARNING [17574]: pbx_config.c : 1797 pbx_load_config : Can’t use ‘next’ priority on the first entry at line 30 of extensions.conf!

can the digits be played in german ?

Rats…

Live by the sword, eat your own dog food, karma’s a…

I didn’t actually test my suggestion :frowning:

'exten = +49695880780272, verbose(1,[${EXTEN}@${CONTEXT}])'

should be:

'exten = +49695880780272,1, verbose(1,[${EXTEN}@${CONTEXT}])'

But…

I don’t see any DE language options in asterisk-17-current.tar.gz. I found DE files on https://www.asterisksounds.org. They seem to work – at least they say something I can’t understand :slight_smile:

Good luck.

You will need third party sound files, or to record them yourself, for German, see https://www.asterisksounds.org/de/installieren

The syntax rules for Say for German are included as standard, although you may not need them for SayDigits.

I’m concerned that you did not know the significance of ${EXTEN}, and couldn’t see the missing priority in the provided code. Replies here generally assume that you have a basic understanding of dialplans and people generally will tell you key facts only and expect you to fill in the details. One reason for the latter is that people responding don’t have the time to actually test their answers, so if they try to provide actual code, they are likely to make mistakes.

Incidentally, although ${EXTEN} is officially a variable, it is actually implemented as a function. It directly reads an internal working variable and can’t be used to set it.

Setting the channel language to German will change it for the whole of the rest of the call. If there is some reason why it should only apply to SayDigits, and other voice announcements are possible, you should change it back again, after SayDigits.