[asterisk-users] change moh during a call?

Dovid B asteriskusers at dovid.net
Tue Jun 12 01:51:22 CDT 2007


I think a real simple solution is to use a variable and you can change it 
when ever you want. So you can do

exten => XXX,X,Musiconhold(${VARIABLE})

and then you can create an extension that will change the value of 
${VARIABLE}

something like:

exten => 123,1,Answer
exten => 123,2,Background(please-select-moh-to-use)

exten => 1,1,Set(VARIABLE=moh1)
exten => 1,1,Set(VARIABLE=moh2)
exten => 1,1,Set(VARIABLE=moh3)
exten => 1,1,Set(VARIABLE=moh4)

----- Original Message ----- 
From: "Thomas Stein" <thomas.stein at knowledgetools.de>
To: <asterisk-users at lists.digium.com>
Sent: Monday, June 11, 2007 4:37 PM
Subject: [asterisk-users] change moh during a call?


Hello.

Is it possible to change the defined moh sound file within an extension?

I have:

exten => 18,1,Answer
exten => 18,n,Wait(3)
exten => 18,n,SetMusicOnHold(durchwahl)
exten => 18,n,Dial(SIP/118,15,m)
exten => 18,n,Hangup

Now i have the situation someone calls and my phone is ringing while moh
(durchwahl) is playing. When i pickup the call and press the hold button
during the call moh (durchwahl) is playing as moh. Thats not what i want. 
Can
i define another file within this extension?

regards
t.
-- 
knowledgeTools®  ... managing complexity.
--------------------------------------------------
knowledgeTools International GmbH
Wallstraße 15 / 15 a
10179 Berlin

Fon: +49 30 726 169 20
Fax: +49 30 726 169 249

thomas.stein at knowledgetools.de
www.knowledgetools.de

Sitz  Berlin, AG Berlin-Charlottenburg, HRB 86378
Geschäftsführer: Oliver Seyboldt, Reinhard Kunz
--------------------------------------------------

This eMail communication (and any attachment/s) may contain confidential or
privileged information and is intended only for the individual(s) or entity
named above and to others who have been specifically authorized to receive
it. If you are not the intended recipient, please do not read, copy, use or
disclose the contents of this communication to others. Please notify the
sender that you have received this e-mail in error by reply e-mail, and
delete the e-mail subsequently. Thank you.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list