<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>I am new to freeSWITCH and this mailing list and I appreciate your support in advance.<br><br>My Goal: To create a hunt group x7000 that sequentially dials an internal extension, i.e. x1000, and then a cell phone number, i.e. 6194548924, while playing music the entire time when each number is being tried.<br><br>The Issue: This was working great a few months back, but now music plays when only when x1000 is tried but NOT when the cell phone is tried.&nbsp; <br><br>Ideas? Please advise. <br><br>My hunt group code is below:<br><br><br><span style="color: rgb(96, 191, 0);">session.answer();</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var domain_name = session.getVariable("domain_name");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191,
 0);">var extension = '7000';</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var result;</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var timeoutpin = 7500;</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var objdate = new Date();</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var adjusthours = 0; //Adjust Server time that is set to GMT 7 hours</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var adjustoperator = "-"; //+ or -</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">if (adjustoperator == "-") {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var objdate2 = new Date(objdate.getFullYear(),objdate.getMonth(),objdate.getDate(),(objdate.getHours() -
 adjusthours),objdate.getMinutes(),objdate.getSeconds());</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">}</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">if (adjustoperator == "+") {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var objdate2 = new Date(objdate.getFullYear(),objdate.getMonth(),objdate.getDate(),(objdate.getHours() + adjusthours),objdate.getMinutes(),objdate.getSeconds());</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">}</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var Hours = objdate2.getHours();</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var Mins = objdate2.getMinutes();</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var Seconds = objdate2.getSeconds();</span><br style="color: rgb(96, 191, 0);"><span
 style="color: rgb(96, 191, 0);">var Month = objdate2.getMonth() + 1;</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var Date = objdate2.getDate();</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var Year = objdate2.getYear()</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var Day = objdate2.getDay()+1;</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">var exit = false;</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;function get_sofia_contact(extension,domain_name, profile){</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (profile == "auto") {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191,
 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; profile = "internal";</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.execute("set", "sofia_contact_"+extension+"=${sofia_contact("+profile+"/"+extension+"@"+domain_name+")}");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sofia_contact = session.getVariable("sofia_contact_"+extension);</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191,
 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (sofia_contact == "error/user_not_registered") {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; profile = "external";</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.execute("set", "sofia_contact_"+extension+"=${sofia_contact("+profile+"/"+extension+"@"+domain_name+")}");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191,
 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sofia_contact = session.getVariable("sofia_contact_"+extension);</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.execute("set",
 "sofia_contact_"+extension+"=${sofia_contact("+profile+"/"+extension+"@"+domain_name+")}");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sofia_contact = session.getVariable("sofia_contact_"+extension);</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console_log( "info", "sofia_contact "+profile+": "+sofia_contact+".\n" );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return sofia_contact;</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;}</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><br
 style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;function mycb( session, type, obj, arg ) {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp; try {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( type == "dtmf" ) {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console_log( "info", "digit: "+obj.digit+"\n" );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( obj.digit == "#" ) {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //console_log( "info", "detected pound sign.\n" );</span><br style="color: rgb(96, 191, 0);"><span
 style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit = true;</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return( false );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dtmf.digits += obj.digit;</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( dtmf.digits.length &gt;= digitmaxlength ) {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191,
 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit = true;</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return( false );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp; } catch (e) {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console_log( "err", e+"\n" );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191,
 0);">&nbsp;&nbsp;&nbsp; return( true );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;} //end function mycb</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">dialed_extension = session.getVariable("dialed_extension");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">domain_name = session.getVariable("domain_name");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">domain = session.getVariable("domain");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">us_ring = session.getVariable("us-ring");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">caller_id_name = session.getVariable("caller_id_name");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">caller_id_number =
 session.getVariable("caller_id_number");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">effective_caller_id_name = session.getVariable("effective_caller_id_name");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">effective_caller_id_number = session.getVariable("effective_caller_id_number");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">outbound_caller_id_name = session.getVariable("outbound_caller_id_name");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">outbound_caller_id_number = session.getVariable("outbound_caller_id_number");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">session.execute("set", "ringback=${hold_music}");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //set to ringtone</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191,
 0);">session.execute("set", "transfer_ringback=${hold_music}"); //set to ringtone</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">session.execute("set", "call_timeout=30");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">session.execute("export", "call_timeout=30");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">session.execute("set", "continue_on_fail=true");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">session.execute("set", "hangup_after_bridge=true");</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">//console_log( "info", "dialed extension:"+dialed_extension+".\n" );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">//console_log( "info", "domain: "+domain+".\n" );</span><br style="color: rgb(96, 191, 0);"><span
 style="color: rgb(96, 191, 0);">//console_log( "info", "us_ring: "+us_ring+".\n" );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">//console_log( "info", "domain: "+domain+".\n" );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">//console_log( "info", "domain_name: "+domain_name+".\n" );</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">//console_log( "info", "action call now don't wait for dtmf\n" );</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">if ( session.ready() ) {</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.answer();</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sofia_contact_1000 =
 get_sofia_contact("1000",domain_name, "auto");</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.execute("bridge", sofia_contact_1000);</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.execute("bridge", "sofia/gateway/flowroute.com/16194548924");</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //timeout</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (session.getVariable("originate_disposition")!="SUCCESS" &amp;&amp; session.getVariable("originate_disposition")!="ORIGINATOR_CANCEL"){</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191,
 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.execute("info", "");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.execute("transfer", "*991000");</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(96, 191, 0);"><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //clear variables</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dialed_extension = "";</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new_extension = "";</span><br style="color: rgb(96, 191,
 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domain_name = "";</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domain = "";</span><br style="color: rgb(96, 191, 0);"><span style="color: rgb(96, 191, 0);">} //end if session.ready</span><br><br><br>Thanks.<br><br>-Will<br><br><br><br><br><br></div>
</div><br>

      </body></html>