Well, If bob is busy since he has another call then you can use dialog module, create dialog profile with values for callers and when second call comes in you can check profile size of bob to determine if his is busy, and do whatever you want to do.<div>
<br></div><div>If bob is just busy but not in call then you can choose one of below solutions,</div><div><br></div><div>1. Use AVPOPS module to query bob&#39;s presence from db and check it using TEXTOPS module.</div><div>
2. Load Perl module (if you are good in Perl) or EXEC module (if you want to use some other programming language) to run a custom script / program which would run for each incoming call. In that program you can implement even most complicated scenarios per your requirement. I personally recommend Perl since has much less overhead compared to EXEC module.<br>
<div><br></div><div>Thank you.</div><div><br><br><div class="gmail_quote">On Fri, Aug 24, 2012 at 4:39 PM, Pieri Mavarez <span dir="ltr">&lt;<a href="mailto:pasaportefacil@gmail.com" target="_blank">pasaportefacil@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>What im trying to do is:</div><div><br></div><div>For exemple, if somebody is trying to call Bob and its status is &#39;busy&#39;, then send the call to another entity. For that, it is necessary to enter to the Presentity table and read the file that is in the &#39;body&#39; field to find the status of the user.</div>

<div><br></div><div>Thanks, i hope i made myself clear :) i really dont know what to do. My boss adviced me to create a new module but i think that would be very hard to do.</div><div><br></div><div>Pierina M.</div><div class="HOEnZb">
<div class="h5"><div><br>
<br><div class="gmail_quote">2012/8/24 Muhammad Shahzad <span dir="ltr">&lt;<a href="mailto:shaheryarkh@googlemail.com" target="_blank">shaheryarkh@googlemail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Use AVPOPS module, you can connect to any database and runny any SQL on it from within opensips.cfg,<div><br></div><div><a href="http://www.opensips.org/html/docs/modules/1.8.x/avpops.html#id292750" target="_blank">http://www.opensips.org/html/docs/modules/1.8.x/avpops.html#id292750</a><br>


<div><br></div><div>However, using this method is mostly recommended for databases other then opensips own native database. If you can give some details about what you are trying to do then may be we can advise some OpenSIPs module or function to do the job without manually querying the native database.</div>


<div><br></div><div>Thank you.</div><div><br><br><div class="gmail_quote"><div><div>On Fri, Aug 24, 2012 at 1:54 PM, Pieri Mavarez <span dir="ltr">&lt;<a href="mailto:pasaportefacil@gmail.com" target="_blank">pasaportefacil@gmail.com</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi, im trying to read the content from the table Presentity, more specifically, i want to read the file from &#39;body&#39; field and use this information. <div>


<br></div><div>How can i enter the database from the opensips.cfg file to use this info?</div>
<div><br></div><div>Thanks</div><div><br></div><div>Pierina M</div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Muhammad Shahzad<br>-----------------------------------<br>CISCO Rich Media Communication Specialist (CRMCS)<br>
CISCO Certified Network Associate (CCNA)<br>
Cell: <a href="tel:%2B92%20334%20422%2040%2088" value="+923344224088" target="_blank">+92 334 422 40 88</a><br>MSN: <a href="mailto:shari_786pk@hotmail.com" target="_blank">shari_786pk@hotmail.com</a><br>Email: <a href="mailto:shaheryarkh@googlemail.com" target="_blank">shaheryarkh@googlemail.com</a><br>


</font></span></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Muhammad Shahzad<br>-----------------------------------<br>CISCO Rich Media Communication Specialist (CRMCS)<br>CISCO Certified Network Associate (CCNA)<br>
Cell: +92 334 422 40 88<br>MSN: <a href="mailto:shari_786pk@hotmail.com">shari_786pk@hotmail.com</a><br>Email: <a href="mailto:shaheryarkh@googlemail.com">shaheryarkh@googlemail.com</a><br>
</div></div>