[OpenSIPS-Users] opensips 1.5.1 - how to update the MySQL-DB if IP-address of UA changes

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue May 12 10:47:36 CEST 2009


Hi Simon,

if a client changes its IP, it is up to it do detect it and to 
re-register with the server with the new IP - the server cannot do 
anything about this.

Also, the fact you have 2 contact registered with the server (old IP and 
new IP) seams to be a bug in the client - when it detects the IP change, 
it should first unregister the old contact and then register the new one.

What you can do on the server side:

    1) limit the number of registered contacts per user - see 
max_contacts param in registrar module - 
http://www.opensips.org/html/docs/modules/devel/registrar.html#id228429
    Anyhow this is not a good practice in your case as if you limit your 
user to only one registered contact, it will not be able to upload the 
second (updated) contact.

    2) allow multiple registered contacts, but use only the last 
registered one - set the append_branches param from register module to 0 
(to use only one contact) and set desc_time_order from usrloc module to 
1 (to do ordering of registered contact  based on time).

Regards,
Bogdan

Simon Witte wrote:
> Dear sirs and madams,
>
>
> I'm a student from germany and currently I'm trying to install a SIP-server. This is my first time working with SIP (in general) and opensips. Hopefully I won't embarass myself too much.
>
> So here's my problme: Is there a way to implement a routine to update the MySQL-DB faster if the IP-address of a client changes? To be more specific:
>
> In the first step of my project I'm using only 192.168.1.x as my domain. The Proxy/ Registar can be found at 192.168.1.60 and I'm using two PCs as UACs. I can register a client with the server, if he's at e.g. 192.168.1.200. If I change its IP-address (to e.g .180), the changes take quite some time to manifest. If I re-register manually (ekiga sopftphone), there are two entries in the location-table, which I certainly don't want. On the one hand, how do I prohibid a UAC from registering with two different IP-addresses using the same username/ password. And on the other hand how can I speed up the process to update the database when a IP-address change takes place?!
>
> I'd really appreciate your help and thank you in advance.
>
> Best regards,
> Simon Witte
>   




More information about the Users mailing list