Alternatively you can also try Perl or Python modules if you are good with scripting languages and need to do something advance, parse message, build reply etc. etc.<div><br></div><div>Thank you.<br><br><br><div class="gmail_quote">
On Wed, Apr 18, 2012 at 4:41 PM, Vlad Paiu <span dir="ltr">&lt;<a href="mailto:vladpaiu@opensips.org">vladpaiu@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>

  
    
  
  <div 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 href="http://www.opensips.org/html/docs/modules/devel/exec#id250135" target="_blank">http://www.opensips.org/html/docs/modules/devel/exec#id250135</a><br>
    <br>
    Regards<br>
    <pre cols="72">Vlad Paiu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre><div><div class="h5">
    <br>
    On 04/18/2012 04:15 AM, GTS2010 wrote:
    </div></div><blockquote type="cite"><div><div class="h5">
      
      
      
      
      <u></u>
        <div> </div>
        <div> </div>
        <div align="left"><font color="#c0c0c0" face="Verdana">2012-04-18
            <div><font color="#000000" face="宋体" size="3">
                <div>
                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt">Hi:</span><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt"><u></u><u></u></span></p>

                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;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:&#39;\005b8b\004f53&#39;;font-size:10.5pt"><u></u><u></u></span></p>

                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;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:&#39;\005b8b\004f53&#39;;font-size:10.5pt"><u></u><u></u></span></p>

                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;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:&#39;\005b8b\004f53&#39;;font-size:10.5pt"><u></u><u></u></span></p>

                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt">Thank you very much for your help!</span><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt"><u></u><u></u></span></p>

                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt">Hoping for your advance.</span><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt"><u></u><u></u></span></p>

                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt"><u></u><u></u></span></p>
                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt">Thanks &amp; Regards,</span><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt"><u></u><u></u></span></p>

                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt">Li Peng Beijing China</span><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt"><u></u><u></u></span></p>

                  <p style="margin-top:0pt;margin-bottom:0pt"><span style="font-family:&#39;\005b8b\004f53&#39;;font-size:10.5pt">2012-04-18</span></p>
                </div>
                </font></div>
          </font></div>
        <font face="Verdana">
          <hr style="width:122px;min-height:2px" align="left" size="2">
        </font>
        <div><font color="#c0c0c0" face="Verdana"><span>GTS2010</span></font></div>
      <u></u>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
Devel mailing list
<a href="mailto:Devel@lists.opensips.org" target="_blank">Devel@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
    </blockquote>
  </div>

<br>_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</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>