<html><body bgcolor="#FFFFFF" lang="EN-US" link="blue" vlink="purple"><div>M4. Does what you want and yes it Rocks. <br><br>Sent from my iPhone</div><div><br>On Sep 14, 2008, at 8:48 AM, Dror Wald <<a href="mailto:dror@jajah.com">dror@jajah.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<div class="Section1" dir="RTL">
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Hi,<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">It
might be nice to have an option to preprocess the opensips.cfg file and to be
able to include a #define, #ifdef, #else, #endif instructions in it.<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Please
let me know <font color="navy"><span style="color:navy">if you like this idea.</span></font><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Following
is an example of how it can make it simple for the user to use presence. <o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">#define
USE_PRESENCE<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">#ifdef
USE_PRESENCE<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">loadmodule
"presence.so"<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">loadmodule
"presence_xml.so"<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">#endif</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">#ifdef
USE_PRESENCE<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">modparam("presence|presence_xml",
"db_url",<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">
"mysql://opensips:opensipsrw@localhost/opensips")<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">modparam("presence_xml",
"force_active", 1)</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">modparam("presence",
"server_address", "sip:192.168.1.2:5060")</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>#endif</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">#ifdef
USE_PRESENCE<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">
if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address")
{<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">
# in-dialog subscribe requests<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">
route(2);</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>
exit;</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>
}</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>#endif</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">#ifdef
USE_PRESENCE<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">
if( is_method("PUBLISH|SUBSCRIBE"))<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">
route(2);<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">#endif</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">#ifdef
USE_PRESENCE<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">route[2]<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">{<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">
if (!t_newtran())</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span> {</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>
sl_reply_error();</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>
exit;</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span> };</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>
if(is_method("PUBLISH"))</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span> {</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>
handle_publish();</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>
t_release();</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span> }</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span> else</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span> if(
is_method("SUBSCRIBE"))</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span> {</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>
handle_subscribe();</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span>
t_release();</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span> }</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><span dir="LTR"></span> exit;</span></font><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:
Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><span dir="LTR"></span><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><span dir="LTR"></span>#endif<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span lang="HE" dir="RTL" style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Comments
are welcome.<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><st1:personname w:st="on"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Dror Wald</span></font></st1:personname><o:p></o:p></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">A
developer, VoIP team, Jajah Inc<o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">E-mail:
<a href="mailto:dror@jajah.com" title="blocked::mailto:dror@jajah.com"><a href="mailto:dror@jajah.com">dror@jajah.com</a></a> <o:p></o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal" dir="LTR" style="text-align:left;direction:ltr;unicode-bidi:
embed"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p> </o:p></span></font></p>
</div>
<br>
<br>
<br>
<br>
************************************************************************************<br>
This footnote confirms that this email message has been scanned by<br>
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.<br>
************************************************************************************<br>
<br>
<br>
D'text-align:left;direction:ltr;unicode-bidi:
embed'><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p> </o:p></span></font><p></p>
<br>
<br>
<br>
<br>
************************************************************************************<br>
This footnote confirms that this email message has been scanned by<br>
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.<br>
************************************************************************************<br>
<br>
<br>
****<br>
<br>
<br>
</o:smarttagtype></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Devel mailing list</span><br><span><a href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a></span><br><span><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a></span><br></div></blockquote></body></html>