If you create a SIP extension, you can do this to play music on hold instead of the normal ringing tone: In the device options|dial put something like
SIP/200||tm
(the m being what plays the music on hold). This works as intended, sort of, although it passes a couple of extra arguments apparently - in the AGI you see this:
-- Executing Dial("SIP/250-8d3c", "SIP/200||tm||tr") in new stack
That ending
||tr
should be stripped off if it is already included in the dial string, but it doesn't hurt anything.
However, consider the situation where you want to play music from other than the default category - let's say you have created a "test" category. In device options|dial you should then be able to use something like
SIP/252||tm(test)
- however if you do that, the right parenthesis gets eaten somewhere, and in the AGI you see this:
-- Executing Dial("SIP/250-b58b", "SIP/200||tm(test||tr") in new stack
Again, note that the only real problem here is the missing right parenthesis - the extra
||tr
while not necessary, doesn't seem to bother the proper execution of the string.
Also note that the dial string DOES get written correctly to extensions-additional.conf:
exten => 200,1,Macro(exten-vm,novm,200)
exten => 200,hint,SIP/200||tm(test)
This is what makes me think the problem is in dialparties.agi
PLEASE NOTE BEFORE ANYONE THINKS ABOUT CHANGING THIS TO A FEATURE REQUEST:
I consider this a bug because the Dial Command Options are all documented on the page at:
http://aussievoip.com.au/wiki/index.php?page=DM-Installation
Where it says, and I quote, "The following are the dial command options available to you:" and then lists a whole bunch of them, including the one I'm trying to use. About the m option, it specifically says:
m([class]) Provide hold music to the calling party until a requested channel answers. A specific MusicOnHold? class can be specified.
Now as far as I'm concerned, if these options are documented in a manual that the developers often point people to in the IRC channel, and they can't be used as documented, that's a BUG, not a FEATURE REQUEST.
And also note, we don't need any extra text fields in the extensions.conf to fix this, since that might not help anyway if dialparties.agi continues to eat right parentheses. If you want to add an extra dial command options field somewhere down the road so that people can specify their options separately instead of in the "dial" field, I don't know why it would be necessary but you could do it. But, it won't help if you enter tm(something) and it comes out looking like tm(something - see the point?
If I were requesting a new option, that would be a feature request. But I just want something to work the way the guide that you guys always tell people to read says it should work, and if it doesn't work that way, I call it a bug!