Hi, <div><br></div><div>The method Danny suggested is simple except I guess he swapped the priority and exten field. </div><div>The idea is to dial a different extension on B server if you need to use some other MOH class. If you don't want to change the dialled extension you can always add a single digit prefix in Server-A and Server-B which signifies the MOH class and use rest of the dialled extension as your real destination number !</div>
<div><br></div><div>BR</div><div>Sammy</div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Jul 3, 2012 at 7:16 PM, Danny Nicholas <span dir="ltr"><<a href="mailto:danny@debsinc.com" target="_blank">danny@debsinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Since you’re using IAX2 to contact Server B, you can use channel variables to control the moh class. There was a good thread in June on this. An “easier” way however would be to have each service dial a different IAX number, then have each IAX number on server B select it’s MOH Class.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Server A<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[service1]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Exten => N,1,Set(Service_name=service1)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Exten => N,n,Dial(IAX2,server2:1234)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[service2]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Exten => N,1,Set(Service_name=service2)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Exten => N,n,Dial(IAX2,server2:3456)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Server B<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[default]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Exten => N,1,Verbose(start)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Exten => N,1234,answer()<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Exten => N,n,Set(MOHClass=1)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Exten => N,3456,answer()<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Exten => N,n,Set(MOHClass=2)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>akhilesh chand<br>
<b>Sent:</b> Tuesday, July 03, 2012 9:11 AM<br><b>To:</b> <a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a><br><b>Subject:</b> Re: [asterisk-users] How to play different different hold music.<u></u><u></u></span></p>
<div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">hi,<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div>
<p class="MsoNormal">Server A ----> extentsion.conf<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">exten => N,n,Set(Service_name="Test")<u></u><u></u></p>
</div><div><p class="MsoNormal">exten => N,n,Dial(IAX2/<a href="http://server2:server2@192.168.14.112/$%7bresult%7d,$%7bService_name%7d" target="_blank">server2:server2@192.168.14.112/${result},${Service_name}</a>)<u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">but Server B doesn't identify service_name.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">
<u></u><u></u></p></div><div><p class="MsoNormal">extentsion.conf<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">[outgoing]<u></u><u></u></p></div><div><p class="MsoNormal">
exten => _X.,1,Set(_CALLTIME=${STRFTIME(,Asia/Calcutta,%d-%b-%y-%H-%M-%S)})<u></u><u></u></p></div><div><p class="MsoNormal">exten => _X.,1,Set(CHANNEL(musicclass)=${Service_name})<u></u><u></u></p></div><div><p class="MsoNormal">
exten => _X.,n,Set(CALLTIME=${STRFTIME(${EPOCH},Asia/Calcutta,%d-%b-%Y-%H-%M-%S)})<u></u><u></u></p></div><div><p class="MsoNormal">exten => _X.,n,Set(RECSUBDIR=${STRFTIME(${EPOCH},Asia/Calcutta,%d%b%Y)})<u></u><u></u></p>
</div><div><p class="MsoNormal">exten => _X.,n,Set(FILENAME=${EXTEN}_${CALLERID(num)}_${CALLTIME}.WAV)<u></u><u></u></p></div><div><p class="MsoNormal">exten => _X.,n,Set(RECORDFILENAME=${RECSUBDIR}/${FILENAME})<u></u><u></u></p>
</div><div><p class="MsoNormal">exten => _X.,n,MixMonitor(${RECORDING_PATH}${RECORDFILENAME})<u></u><u></u></p></div><div><p class="MsoNormal">exten => _X.,n,Dial(SIP/${EXTEN},120)<u></u><u></u></p></div><div><p class="MsoNormal">
exten => _X.,n,Hangup()<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">
<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Regards<u></u><u></u></p></div><div><p class="MsoNormal">Akhilesh<u></u><u></u></p>
</div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">On Tue, Jul 3, 2012 at 6:00 PM, akhilesh chand <<a href="mailto:omakhileshchand@gmail.com" target="_blank">omakhileshchand@gmail.com</a>> wrote:<u></u><u></u></p>
<div><p class="MsoNormal">Dear All,<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">I have two server 'A' and 'B' . In Server 'A', five different ivr (Sevices) is playing and call is <strong>forwarding </strong>into Server 'B'. Server 'B' basically use for agent login(Extension).<u></u><u></u></p>
</div><div><p class="MsoNormal">I want to play different hold music(Server 'B') bases on the corresponding services which is running into server 'A'.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p>
</div><div><p class="MsoNormal">A single agent takes the call from different different services but hold music is play astrisk own by default.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div>
<p class="MsoNormal">Is there any way to play different hold music bases on services which run into server A.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">I have some changes into musiconhold.conf (server B) but problem is no solve.<u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">please help me.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div>
<div><p class="MsoNormal">Regards<u></u><u></u></p></div><div><p class="MsoNormal"><span style="color:#888888">Akhilesh<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>