<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css> <!--@import url(scrollbar.css); --></STYLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE>                        body{FONT-SIZE:12pt; FONT-FAMILY:宋体,serif;}                </STYLE>
<META name=GENERATOR content="MSHTML 8.00.6001.19222"><BASE
target=_blank></HEAD>
<BODY
style="LINE-HEIGHT: 1.3; BORDER-RIGHT-WIDTH: 0px; MARGIN: 12px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px"
marginheight="0" marginwidth="0">
<DIV><FONT color=#000000 size=3 face=宋体>Hi Paiu:</FONT></DIV>
<DIV> First, thank you very much for your help. Today I have read the
web you give to me ,and I have some more questions about how to
use the exec_avp() fuction , in the web I saw a simple
ex:exec_avp("print-contact.sh"$ct""). The questions are where should I
put my own script in ? And how to read the $ct in my own script (ex:
python)?</DIV>
<DIV> </DIV>
<DIV>Hoping for your help!</DIV>
<DIV> </DIV>
<DIV>Thanks & Regards,</DIV>
<DIV>Li Peng beijing China</DIV>
<DIV> </DIV>
<DIV>2012-04-19</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV align=left><FONT color=#c0c0c0 size=2 face=Verdana>2012-04-19</FONT></DIV>
<DIV align=left><FONT size=2 face=Verdana>
<HR style="WIDTH: 122px; HEIGHT: 2px" id=SignNameHR align=left SIZE=2>
</FONT></DIV>
<DIV align=left><FONT color=#c0c0c0 size=2 face=Verdana><SPAN
id=_FlashSignName>GTS2010</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Verdana>
<HR>
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>发件人:</STRONG>devel-request</FONT></DIV>
<DIV><FONT size=2
face=Verdana><STRONG>发送时间:</STRONG>2012-04-18 23:26</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>主题:</STRONG>Devel Digest, Vol 46, Issue
31</FONT></DIV>
<DIV><FONT size=2
face=Verdana><STRONG>收件人:</STRONG>"devel"<devel@lists.opensips.org></FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>抄送:</STRONG></FONT></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV><FONT size=2 face=Verdana>
<DIV>Send Devel mailing list submissions to </DIV>
<DIV> devel@lists.opensips.org </DIV>
<DIV> </DIV>
<DIV>To subscribe or unsubscribe via the World Wide Web, visit </DIV>
<DIV> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel </DIV>
<DIV>or, via email, send a message with subject or body 'help' to </DIV>
<DIV> devel-request@lists.opensips.org </DIV>
<DIV> </DIV>
<DIV>You can reach the person managing the list at </DIV>
<DIV> devel-owner@lists.opensips.org </DIV>
<DIV> </DIV>
<DIV>When replying, please edit your Subject line so it is more specific </DIV>
<DIV>than "Re: Contents of Devel digest..." </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Today's Topics: </DIV>
<DIV> </DIV>
<DIV> 1. Re: question (Vlad Paiu) </DIV>
<DIV> 2. (no subject) (Guan Xsun) </DIV>
<DIV> 3. opensips error (Guan Xsun) </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>---------------------------------------------------------------------- </DIV>
<DIV> </DIV>
<DIV>Message: 1 </DIV>
<DIV>Date: Wed, 18 Apr 2012 14:41:01 +0300 </DIV>
<DIV>From: Vlad Paiu <vladpaiu@opensips.org> </DIV>
<DIV>Subject: Re: [OpenSIPS-Devel] question </DIV>
<DIV>To: devel@lists.opensips.org </DIV>
<DIV>Message-ID: <4F8EA84D.5010506@opensips.org> </DIV>
<DIV>Content-Type: text/plain; charset="utf-8"; Format="flowed" </DIV>
<DIV> </DIV>
<DIV>Hello, </DIV>
<DIV> </DIV>
<DIV>There is no need to develop an extra module for this. </DIV>
<DIV>You can use the exec_avp() function from the exec module ( see #1) and </DIV>
<DIV>call an external script ( bash, python, etc ) that runs your logic, and </DIV>
<DIV>returns the result back to OpenSIPS. Based on the external script </DIV>
<DIV>results, in the OpenSIPS script you can drop or further relay the message. </DIV>
<DIV> </DIV>
<DIV>1. http://www.opensips.org/html/docs/modules/devel/exec#id250135 </DIV>
<DIV> </DIV>
<DIV>Regards </DIV>
<DIV> </DIV>
<DIV>Vlad Paiu </DIV>
<DIV>OpenSIPS Developer </DIV>
<DIV>http://www.opensips-solutions.com </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>On 04/18/2012 04:15 AM, GTS2010 wrote: </DIV>
<DIV>> 2012-04-18 </DIV>
<DIV>> </DIV>
<DIV>> Hi: </DIV>
<DIV>> </DIV>
<DIV>> 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. </DIV>
<DIV>> </DIV>
<DIV>> 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. </DIV>
<DIV>> </DIV>
<DIV>> 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? </DIV>
<DIV>> </DIV>
<DIV>> Thank you very much for your help! </DIV>
<DIV>> </DIV>
<DIV>> Hoping for your advance. </DIV>
<DIV>> </DIV>
<DIV>> Thanks & Regards, </DIV>
<DIV>> </DIV>
<DIV>> Li Peng Beijing China </DIV>
<DIV>> </DIV>
<DIV>> 2012-04-18 </DIV>
<DIV>> </DIV>
<DIV>> ------------------------------------------------------------------------ </DIV>
<DIV>> GTS2010 </DIV>
<DIV>> </DIV>
<DIV>> </DIV>
<DIV>> _______________________________________________ </DIV>
<DIV>> Devel mailing list </DIV>
<DIV>> Devel@lists.opensips.org </DIV>
<DIV>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel </DIV>
<DIV>-------------- next part -------------- </DIV>
<DIV>An HTML attachment was scrubbed... </DIV>
<DIV>URL: <http://lists.opensips.org/pipermail/devel/attachments/20120418/f93aad98/attachment-0001.htm> </DIV>
<DIV> </DIV>
<DIV>------------------------------ </DIV>
<DIV> </DIV>
<DIV>Message: 2 </DIV>
<DIV>Date: Wed, 18 Apr 2012 23:22:40 +0800 </DIV>
<DIV>From: Guan Xsun <guanxiansun@gmail.com> </DIV>
<DIV>Subject: [OpenSIPS-Devel] (no subject) </DIV>
<DIV>To: devel@lists.opensips.org </DIV>
<DIV>Message-ID: </DIV>
<DIV> <CAHBWywC9GpzTueDC9_4SLCxBH-om+KS-S7QxLAwbRFbXNyyWjw@mail.gmail.com> </DIV>
<DIV>Content-Type: text/plain; charset="iso-8859-1" </DIV>
<DIV> </DIV>
<DIV>HI,all, </DIV>
<DIV> I enter an error when use opensips. </DIV>
<DIV> The message log is listed: </DIV>
<DIV> Apr 18 08:17:36 localhost opensips: ERROR:core:sr_load_module: 1 could </DIV>
<DIV>not open module </usr/local/lib/opensips/modules/db_mysql.so>: </DIV>
<DIV>/usr/local/mysql/lib/libmysqlclient.so.15: cannot restore segment prot </DIV>
<DIV>after reloc: Permission denied </DIV>
<DIV>Apr 18 08:17:36 localhost opensips: CRITICAL:core:yyerror: 2parse error in </DIV>
<DIV>config file, line 71, column 13-14: failed to load module </DIV>
<DIV>Apr 18 08:17:36 localhost opensips: CRITICAL:core:yyerror: 2parse error in </DIV>
<DIV>config file, line 192, column 1-6: syntax error </DIV>
<DIV>Apr 18 08:17:36 localhost opensips: CRITICAL:core:yyerror: 2parse error in </DIV>
<DIV>config file, line 192, column 1-6: Invalid arguments </DIV>
<DIV>Apr 18 08:17:36 localhost opensips: ERROR:core:main: bad config file (3 </DIV>
<DIV>errors) </DIV>
<DIV> </DIV>
<DIV> And the opesips.cfg is attached. </DIV>
<DIV>-------------- next part -------------- </DIV>
<DIV>An HTML attachment was scrubbed... </DIV>
<DIV>URL: <http://lists.opensips.org/pipermail/devel/attachments/20120418/1a123d1a/attachment-0001.htm> </DIV>
<DIV> </DIV>
<DIV>------------------------------ </DIV>
<DIV> </DIV>
<DIV>Message: 3 </DIV>
<DIV>Date: Wed, 18 Apr 2012 23:25:20 +0800 </DIV>
<DIV>From: Guan Xsun <guanxiansun@gmail.com> </DIV>
<DIV>Subject: [OpenSIPS-Devel] opensips error </DIV>
<DIV>To: devel@lists.opensips.org </DIV>
<DIV>Message-ID: </DIV>
<DIV> <CAHBWywCDDe3=V-Se55O5hRbf_vfnAYGrGdWSKYWh-WHOLYQdoA@mail.gmail.com> </DIV>
<DIV>Content-Type: text/plain; charset="iso-8859-1" </DIV>
<DIV> </DIV>
<DIV>HI,all, </DIV>
<DIV> I enter an error when use opensips. </DIV>
<DIV> The message log is listed: </DIV>
<DIV> Apr 18 08:17:36 localhost opensips: ERROR:core:sr_load_module: 1 could </DIV>
<DIV>not open module </usr/local/lib/opensips/modules/db_mysql.so>: </DIV>
<DIV>/usr/local/mysql/lib/libmysqlclient.so.15: cannot restore segment prot </DIV>
<DIV>after reloc: Permission denied </DIV>
<DIV>Apr 18 08:17:36 localhost opensips: CRITICAL:core:yyerror: 2parse error in </DIV>
<DIV>config file, line 71, column 13-14: failed to load module </DIV>
<DIV>Apr 18 08:17:36 localhost opensips: CRITICAL:core:yyerror: 2parse error in </DIV>
<DIV>config file, line 192, column 1-6: syntax error </DIV>
<DIV>Apr 18 08:17:36 localhost opensips: CRITICAL:core:yyerror: 2parse error in </DIV>
<DIV>config file, line 192, column 1-6: Invalid arguments </DIV>
<DIV>Apr 18 08:17:36 localhost opensips: ERROR:core:main: bad config file (3 </DIV>
<DIV>errors) </DIV>
<DIV> </DIV>
<DIV> And the opesips.cfg is attached. </DIV>
<DIV>-------------- next part -------------- </DIV>
<DIV>An HTML attachment was scrubbed... </DIV>
<DIV>URL: <http://lists.opensips.org/pipermail/devel/attachments/20120418/a80dddb6/attachment.htm> </DIV>
<DIV>-------------- next part -------------- </DIV>
<DIV>A non-text attachment was scrubbed... </DIV>
<DIV>Name: opensips.cfg </DIV>
<DIV>Type: application/octet-stream </DIV>
<DIV>Size: 10838 bytes </DIV>
<DIV>Desc: not available </DIV>
<DIV>URL: <http://lists.opensips.org/pipermail/devel/attachments/20120418/a80dddb6/attachment.obj> </DIV>
<DIV> </DIV>
<DIV>------------------------------ </DIV>
<DIV> </DIV>
<DIV>_______________________________________________ </DIV>
<DIV>Devel mailing list </DIV>
<DIV>Devel@lists.opensips.org </DIV>
<DIV>http://lists.opensips.org/cgi-bin/mailman/listinfo/devel </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>End of Devel Digest, Vol 46, Issue 31 </DIV>
<DIV>************************************* </DIV></FONT></DIV></BODY></HTML>