Brett is right, but avp_db_query can be a performance killer too (just imagine it with 200 new calls per second = 200 insert queries/sec)<br><br>-Laszlo<br><br><div class="gmail_quote">2010/7/24 Nauman Sulaiman <span dir="ltr"><<a href="mailto:nauman762-home@yahoo.co.uk">nauman762-home@yahoo.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">
Thank you for the respnses<br><br>--- On <b>Sat, 24/7/10, Brett Nemeroff <i><<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a>></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">
<br>From: Brett Nemeroff <<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a>><br>Subject: Re: [OpenSIPS-Users] Run custom PHP script to send SMS upon receiving invite<br>To: "OpenSIPS users mailling list" <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
Date: Saturday, 24 July, 2010, 15:59<br><br><div>The exec module has a huge performance penalty. I'd avoid it if high performance is required. I don't know anything about your application, but if the time delay between the invite and the SMS isn't too sensitive, you could consider using avp_db_query to insert a queued notification to a SMS message.<div>
<br></div><div>Alternatively, you could use avp_db_query with db_http to post a realtime SMS notification, but you'd need to create a db adapter per db_http; it shouldn't be too hard at all. The perl module is also very good, but I'm not sure how up-to-date it is. </div>
<div><br></div><div>-Brett</div><div><div></div><div class="h5"><div><br><div><br><br><div class="gmail_quote">On Sat, Jul 24, 2010 at 7:48 AM, Laszlo <span dir="ltr"><<a rel="nofollow" href="http://mc/compose?to=laszlo@voipfreak.net" target="_blank">laszlo@voipfreak.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Sounds like a bad idea :)<br><br>You can try to play with the exec module, see <a rel="nofollow" href="http://www.opensips.org/html/docs/modules/1.6.x/exec.html" target="_blank">http://www.opensips.org/html/docs/modules/1.6.x/exec.html</a><br>
<br>-Laszlo<br>
<br><br><div class="gmail_quote">2010/7/24 Nauman Sulaiman <span dir="ltr"><<a rel="nofollow" href="http://mc/compose?to=nauman762-home@yahoo.co.uk" target="_blank">nauman762-home@yahoo.co.uk</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div>
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">Hi, using OpenSIPs 1.6, how does one run a custom php script (or whatever code) upon<div>receiving incoming INVITE. We need to perform some custom action ie send SMS message</div>
<div>when receiving an INVITE. With asterisk one can use the System function in DialPlan</div><div>what is the equivalent way with OpensSIPS.</div><div><br></div><div>Thanks </div></td></tr></tbody></table><br>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a rel="nofollow" href="http://mc/compose?to=Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a rel="nofollow" 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 style="display: inline;"></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a rel="nofollow" href="http://mc/compose?to=Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a rel="nofollow" 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></div></div><br>-----Inline Attachment Follows-----<div class="im"><br><br><div>_______________________________________________<br>Users mailing list<br><a href="http://mc/compose?to=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></div></div></blockquote></td></tr></tbody></table><br>
<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><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style>