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
Automatically execute certain script on account binding
-
- Posts: 8
- Joined: Tue Mar 01, 2011 1:24 pm
Re: Automatically execute certain script on account binding
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.
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.