How to get Sip user's last 2 registrations

Hi,

As we know when a user registers from some other place, his first registration is discarded or updated to new one. i want to know if there is any method we can store his previous registration too. so that we can call both of his last and current locations somewhat like this

Dial(Sip/abc-last&Sip/abc-current)

I think this has to be done by modifying the asterisk source code. plz guide me.

Nasir Javaid
Axvoice Inc

you can retrieve the IP from where a client registers in the /var/log/asterisk/messages

Hi

I have already tried by storing last 2 IP addresses from where the user registers and dialing (Dial(SIP/abc@xxx.xxx.xxx.xxx:5060) but this thing works when all users and asterisk are on same LAN or public network. but fails in my case where asterisk is on public ip and users register from behind nat.

so now i am trying to store 2 last registrations of same user say abc in AST_DB so that asterisk can dial it and handle NAT properly.

do you think this post should be in developers section?

I came to know that Sip express router can solve the problem of remembering and using many registrations of same user from different IP or Ports. is it true? how can i use this functionality?