Automatically execute certain script on account binding

New features you'd like see on SIP Sorcery
Post Reply
konstantin
Posts: 8
Joined: Tue Mar 01, 2011 1:24 pm

Automatically execute certain script on account binding

Post by konstantin » Sun Aug 14, 2011 4:41 am

Hello Aaron,

It would be great to introduce a feature that'll execute certain script within SIPsorcery (or call to an external URL via POST) when a binding for an account is established.
This can be used in event-style processing, for example to SMS notify PSTN callers: "The number XXXXXX is now available" or initiate callback.

Why SIP bindings can come and go? Quite number of people I know use SIP client software on smartphones and mobile internet coverage varies.
Also I can think of lots of possible reasons when people may want to "switch off the phone" by shutting down sip registration.

I know that theoretically I can pull SS with Cron job executing webcallback svc sript "IsAvail()" every other minute or two, but what I am saying there might be more elegant solution.
Also we need to avoid creating extra load on SS servers.

Konstantin

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: Automatically execute certain script on account binding

Post by Aaron » Mon Aug 15, 2011 10:29 am

There have been a few requests for this feature over the last couple of years as well as the same one for SIP Providers to provide notifications whenever the registration status on a SIP Provider changes.

The reason I'm always reluctant to implement it is registrations are high volume events and any automated action based on them could amplify a problem under certain conditions.

For example if SIP Sorcery was subject to a Denial of Service attack that allowed SIP traffic to only get through at a trickle a lot of registrations would end up expiring en masse. If that was coupled with an automated action such as sending an email or HTTP request then the Denial of Service attach would be made even worse since the server would now have to deal with the extra load of handling the notifications.

Even putting aside rare events such as Denial of Service attack more regular events such as restarting a server for maintenance purposes, which typically drops registrations for a minute or two, could then result in a large number of notifications being sent.

Post Reply