[asterisk-users] Changing volume via dialplan

Joshua Colp jcolp at digium.com
Tue Aug 25 13:00:09 CDT 2015


Matthew Murphy wrote:
> Greetings everyone,

Kia ora,

> I am attempting to adjust the volume of a call using *Set(VOLUME)* in my
> extensions.conf file. I am finding that*Set(VOLUME(TX)=x)*and
> *S**et(VOLUME(RX)=y)*have no discernable effect on my endpoints (Snom
> 300 IP phones). I have tried setting x and y to -30, -10, -3, -2, -1, 0,
> 1, 2, 3, 4, 10, and 100 and there appears to be no change on the phone
> volume. I can see that the Set(VOLUME) instruction is being executed on
> the Asterisk CLI.

I just did the following on 13.5.0:

exten => 1002,1,Answer
exten => 1002,2,Set(VOLUME(tx)=10)
exten => 1002,3,Playback(demo-congrats)

 From my D70 and confirmed the audio was ... louder/horrible.

Do you have any other endpoints you could test from?

>
> I have also tried using *Set(CHANNEL(txgain)=x)* and
> *Set(CHANNEL(rxgain)=y)* and those don't seem to have any effect either.
> I have tried setting x and y to -30, -10, -3, -2, -1, 0, 1, 2, 3, 4, 10,
> and 100 and there appears to be no change on the phone volume. I can see
> that the Set(CHANNEL) instruction is being executed on the Asterisk CLI.

These aren't applicable to PJSIP.

>
>
> I am using *PJSIP *and just upgraded to *Asterisk 13.5.0*. It wasn't
> working on 13.4.0 either, but when I saw the release notes on 13.5 and
> volume was addressed, I was hopeful that it might solve my problem for me.
>
>
> So I have a couple of questions:
>
>
> 1) Am I using the correct functions in the dial plan to adjust volume?
> It would be something like:
>
>     same => n,Set(VOLUME(TX)=3)
>
>     or
>
>     same =>n,Set(CHANNEL(rxgain)=0)

Yes, the VOLUME dialplan function should do the job.

>
> 2) If this is correct, what are the min/max values that I can use when
> adjusting volume? I was digging around the source code and it looked
> like maybe a min of -4 and max of +4 was expected - but I am unsure.

There is no enforced minimum/maximum. The value provided is in dB.

Cheers,

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list