[OpenSIPS-Users] Run custom PHP script to send SMS upon receiving invite
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Jul 29 18:51:31 CEST 2010
Hi Stefan,
That is an interesting approach - maybe we can implement some new module
for that...
Right now you can also use the t_write_fifo or t_write_unix functions
from TM to push some message to a unixsocket or fifo file - the
functionality is already there.
Best regards,
Bogdan
Stefan Sayer wrote:
> I'd add a function to e.g. xlog that sends the message to an mqueue
> (see man mqueue.h), and use a separate process to send the messages
> from there.
>
> Stefan
>
> Laszlo wrote:
>
>> 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)
>>
>> -Laszlo
>>
>> 2010/7/24 Nauman Sulaiman <nauman762-home at yahoo.co.uk
>> <mailto:nauman762-home at yahoo.co.uk>>
>>
>> Thank you for the respnses
>>
>> --- On *Sat, 24/7/10, Brett Nemeroff /<brett at nemeroff.com
>> <mailto:brett at nemeroff.com>>/* wrote:
>>
>>
>> From: Brett Nemeroff <brett at nemeroff.com
>> <mailto:brett at nemeroff.com>>
>> Subject: Re: [OpenSIPS-Users] Run custom PHP script to send SMS
>> upon receiving invite
>> To: "OpenSIPS users mailling list" <users at lists.opensips.org
>> <mailto:users at lists.opensips.org>>
>> Date: Saturday, 24 July, 2010, 15:59
>>
>> 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.
>>
>> 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.
>>
>> -Brett
>>
>>
>>
>> On Sat, Jul 24, 2010 at 7:48 AM, Laszlo <laszlo at voipfreak.net
>> <http://mc/compose?to=laszlo@voipfreak.net>> wrote:
>>
>> Sounds like a bad idea :)
>>
>> You can try to play with the exec module, see
>> http://www.opensips.org/html/docs/modules/1.6.x/exec.html
>>
>> -Laszlo
>>
>>
>> 2010/7/24 Nauman Sulaiman <nauman762-home at yahoo.co.uk
>> <http://mc/compose?to=nauman762-home@yahoo.co.uk>>
>>
>> Hi, using OpenSIPs 1.6, how does one run a custom php
>> script (or whatever code) upon
>> receiving incoming INVITE. We need to perform some
>> custom action ie send SMS message
>> when receiving an INVITE. With asterisk one can use the
>> System function in DialPlan
>> what is the equivalent way with OpensSIPS.
>>
>> Thanks
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> <http://mc/compose?to=Users@lists.opensips.org>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> <http://mc/compose?to=Users@lists.opensips.org>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> -----Inline Attachment Follows-----
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> <http://mc/compose?to=Users@lists.opensips.org>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
>
--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro
More information about the Users
mailing list