[Asterisk-Dev] Re: [Asterisk-Users] app_valetparking / parking in
general
Christopher L. Wade
clwade at sparco.com
Fri Sep 24 10:15:20 MST 2004
Heres a patch for the app_valetparking not working with music on hold.
This patch was made against the version at
http://www.bkw.org/app_valetparking.c.
As you can see, the original author of app_valetparking simply forgot to
copy the chan->musicclass to the new masq'ed channel. I'm not entirely
sure this is the 'true' cause, simply because the
ast_channel_masquerade(chan, rchan); seems backwards to me anyway.
If my assumption of what went wrong in the original version of the
module is incorrect, please let me know. This module works great
without this patch, everything does what I expect it to, but now moh
works too :)
I'll be moving this thread to -dev as of this post. To continue
following this thread, please look to -dev from now on. To anyone
replying to this message, please reply on -dev.
If this patch needs a disclaimer, which I don't think it will - not in
core asterisk distro or cvs, please let me know.
Thanks,
Chirs
--- app_valetparking.c 2004-08-20 15:49:59.000000000 -0500
+++ apps/app_valetparking.c 2004-09-24 11:42:50.002331320 -0500
@@ -298,6 +298,8 @@
/* Setup the extensions and such */
strncpy(chan->context, rchan->context,
sizeof(chan->context) - 1);
strncpy(chan->exten, rchan->exten, sizeof(chan->exten)
- 1);
+ /* Make music on hold work with valet parking */
+ strncpy(chan->musicclass, rchan->musicclass,
sizeof(chan->musicclass) - 1);
chan->priority = rchan->priority;
/* Make the masq execute */
f = ast_read(chan);
--
Christopher L. Wade Unistar-Sparco Computers, Inc.
Senior Systems Administrator dba Sparco.com
Email: clwade at sparco.com 7089 Ryburn Drive
Phone: (901) 872 2272 / (800) 840 8400 Millington, TN 38053
Fax: (901) 872 8482 USA
More information about the asterisk-dev
mailing list