sys.LastBinding

New features you'd like see on SIP Sorcery
Post Reply
jack9901
Posts: 277
Joined: Tue Jan 29, 2008 7:30 pm

sys.LastBinding

Post by jack9901 » Thu Sep 10, 2009 6:42 am

The idea is from my discussion about mobile SIP clients stop refreshing registration in standby mode. The data connection is pretty stable unless it is manually disconnected. So the idea is to use the IP address and let the softphone in standby as is, no keep alive, no updating registration, so that it saves even more battery.

The problem is that I cannot find a working mobile dyndns updater, or find out the binding port in an easy way. A function sys.LastBinding may do the trick. Or it can give two values e.g. LastBinding.binding, LastBinding.time and the user can decide what to do depending on the LastBinding.time.

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

Post by Aaron » Thu Sep 10, 2009 11:00 am

That approach won't work. The SIP Registrar and SIP Provider bindings exist solely as a row in the database while they are current. Once they expire they are deleted and all record of them is gone.

You could use the DBWrite dialplan application to record the IP address of your bindings and rely on the fact that your calls are more frequent than your IP address changes.

jack9901
Posts: 277
Joined: Tue Jan 29, 2008 7:30 pm

Post by jack9901 » Thu Sep 10, 2009 4:00 pm

Aaron wrote:use the DBWrite dialplan application to record the IP address of your bindings
The purpose of this feature is that the server side take its advantage to keep a record so that to make convenience for anyone that may need it and exempt them from the unreliable hacking and coding. Sorry to hear it "won't" work.

jack9901
Posts: 277
Joined: Tue Jan 29, 2008 7:30 pm

Post by jack9901 » Thu Sep 10, 2009 10:04 pm

OK. I added several lines of code in my dial plan and now my cell phone runs as cool as a brick should be. :lol:

Ideally, the following combination will work better.
1. Keep Alive sends packet every 15 minutes and the softphone will register at that interval. I do noticed sometimes the cell data session gets disconnected overnight if there is no internet activity.
2. Server records the last binding.
3. And last, we have "no response time" to avoid the long wait of miss fire.

Post Reply