<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hello,<br>
    <br>
    There is no need to develop an extra module for this. <br>
    You can use the exec_avp() function from the exec module ( see #1)
    and call an external script ( bash, python, etc ) that runs your
    logic, and returns the result back to OpenSIPS. Based on the
    external script results, in the OpenSIPS script you can drop or
    further relay the message.<br>
    <br>
    1. <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/devel/exec#id250135">http://www.opensips.org/html/docs/modules/devel/exec#id250135</a><br>
    <br>
    Regards<br>
    <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
    <br>
    On 04/18/2012 04:15 AM, GTS2010 wrote:
    <blockquote
      cite="mid:5b4e846.108046.136c307cce7.Coremail.GTS2010@126.com"
      type="cite">
      <style type="text/css"> <!--@import url(scrollbar.css); --></style>
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      <style>                        BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}                        body{FONT-SIZE:12.1pt; COLOR:#001; FONT-FAMILY:宋体,serif;}                </style>
      <meta name="GENERATOR" content="MSHTML 8.00.6001.19222">
      <base target="_blank"><stationery>
        <div> </div>
        <div> </div>
        <div align="left"><font color="#c0c0c0" face="Verdana" size="2">2012-04-18
            <div><font color="#000000" face="宋体" size="3">
                <div style="" class="Section0">
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;">Hi:</span><span
                      style="font-family: '宋体'; font-size: 10.5pt;"><o:p></o:p></span></p>
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;">   I am a college student from China. I have just started working on opensips. Now I have some questions about it, and I hope you could help me out.</span><span
                      style="font-family: '宋体'; font-size: 10.5pt;"><o:p></o:p></span></p>
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;">   Our project want to add some additional functions on the sip server. The primary is when the server received an invite message from a sip phone, amd the server should get the src-ip and the des-ip of the session. Then send the src-ip and the dst-ip to another computer, in which we run a application that have the informations about the resource of the network (By the way,the server and the sip phones are all in an LAN). Then the application will tell the server whether it should allow this session. In another word, we want to add a judgement in the sip session.</span><span
                      style="font-family: '宋体'; font-size: 10.5pt;"><o:p></o:p></span></p>
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;">    My question is whether the opensips could do that for me? Should I add an additional module in the opensips? Or add some funcitions in some modules whick the opensips already have? How to?</span><span
                      style="font-family: '宋体'; font-size: 10.5pt;"><o:p></o:p></span></p>
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;">Thank you very much for your help!</span><span
                      style="font-family: '宋体'; font-size: 10.5pt;"><o:p></o:p></span></p>
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;">Hoping for your advance.</span><span
                      style="font-family: '宋体'; font-size: 10.5pt;"><o:p></o:p></span></p>
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;"><o:p></o:p></span></p>
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;">Thanks &amp; Regards,</span><span
                      style="font-family: '宋体'; font-size: 10.5pt;"><o:p></o:p></span></p>
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;">Li Peng Beijing China</span><span
                      style="font-family: '宋体'; font-size: 10.5pt;"><o:p></o:p></span></p>
                  <p style="margin-top: 0pt; margin-bottom: 0pt;"
                    class="p0"><span style="font-family: '宋体';
                      font-size: 10.5pt;">2012-04-18</span></p>
                </div>
                <!--EndFragment--></font></div>
          </font></div>
        <font face="Verdana" size="2">
          <hr style="width: 122px; height: 2px;" id="SignNameHR"
            align="left" size="2">
        </font>
        <div><font color="#c0c0c0" face="Verdana" size="2"><span
              id="_FlashSignName">GTS2010</span></font></div>
      </stationery>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
    </blockquote>
  </body>
</html>