$records = Application_Model_Freeswitch::freeSwitch("api uuid_hold $__UUID__");<br>$records = Application_Model_Freeswitch::freeSwitch("api uuid_hold off $__UUID__");<br><br>Thanks<br>Shamun<br><br><div class="gmail_quote">
On Fri, Sep 10, 2010 at 1:44 PM, Chaitanya Bhatt // Viva <span dir="ltr"><<a href="mailto:chaitanya@vivainfomedia.com">chaitanya@vivainfomedia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hii<div><br></div><div>We are trying to play some hold music to that caller in freeswitch while carrying out some external task like lengthy database query. </div><div>We are using ESL to handle incoming calls(using outbound socket to a perl script). We had tried bgapi with start_local_stream but call hangs up immediately.</div>
<div><br></div><div><div>$conn->execute("event", "plain all");</div><div>$conn->bgapi("start_local_stream","default");</div><div><span style="white-space: pre-wrap;">                </span>while(1) {</div>
<div><span style="white-space: pre-wrap;">                        </span> my $e = $conn->recvEventTimed(100);</div><div><span style="white-space: pre-wrap;">                        </span> $e = $conn->recvEvent();</div><div>
<span style="white-space: pre-wrap;">                        </span> my $event_name;</div><div><span style="white-space: pre-wrap;">                        </span> if ($e) {</div><div><span style="white-space: pre-wrap;">                        </span> my $h = $e->firstHeader();<span style="white-space: pre-wrap;">        </span> </div>
<div><br></div><div><span style="white-space: pre-wrap;">                        </span> while ($h) {</div><div><span style="white-space: pre-wrap;">                                </span>if($h eq "Event-Name") {</div><div><span style="white-space: pre-wrap;">                                        </span>$event_name = $e->getHeader($h);</div>
<div><span style="white-space: pre-wrap;">                                        </span>}</div><div><span style="white-space: pre-wrap;">                                </span> #log header</div><div><span style="white-space: pre-wrap;">                                </span> $h = $e->nextHeader();</div>
<div><span style="white-space: pre-wrap;">                        </span> }<span style="white-space: pre-wrap;">        </span><span style="white-space: pre-wrap;">                </span><span style="white-space: pre-wrap;">                </span> </div>
<div><span style="white-space: pre-wrap;">        </span> }</div><div><span style="white-space: pre-wrap;">        </span>}</div><div><span style="white-space: pre-wrap;">W</span>e had tried valet_park but getting required result.</div>
<div><br></div><div>Can someone please guide us how to hold call with music or can provide some code snippet ?<span style="white-space: pre-wrap;">        </span></div><div><span style="white-space: pre-wrap;"><br>
</span></div>Incase of any further queries, Please feel free to mail me or contact me on the numbers provided below.<br><br>Thanks & Regards,<br>Chaitanya Bhatt<br>Software Engineer.<br><br>Viva Infomedia Pvt. Ltd.<br>
242, Oshiwara Industrial Centre,<br>New Link Road, Opp. Oshiwara Bus Depot,<br>Goregaon West, Mumbai 400104.<br><br>Direct: +91.22.40310356<br>Board: +91.22.40310310<br>Email : <a href="mailto:chaitanya@vivainfomedia.com" target="_blank">chaitanya@vivainfomedia.com</a><br>
<br>Viva Infomedia: Awarded as Best SME (E-Commerce) at CNBC Emerging India Awards 2009<br><br>
</div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>