First of all an introduction...my name is SHAJEEL...a well known member of other forums...currently using my bro's id to post here..actually im the one who uses it all the time..too lazy to make my own
haha
Ok guys so like i said will post the solution tonight...when i get time..so here i am..
ok now first lemme explain to u guys why the router/modem restarts when the power goes out and the UPS kicks in...
It is not dependent on the router/modem's company but actually its Power supply (or as most of u guys call it ADAPTER)...
for example ill be using my shiro/Aztech Dsl modem adaptor for reference....
in this pic u see the stock power supply that comes with the Modem...

its rated @ input = 230-240v AC ... and output = 9.0v DC ~ 500mA
see this " input = 230-240v AC " is the problem...when the power goes out and the Ups kicks in there is a sudden bump in electricity supply where input voltage drops and causes the device to restart...and what the company supplies u with is an Adaptor with WOund coils inside and as a result it is really bulky and heavy in weight...
now the solution...This is the Replacement "power Supply" that is the solution and that u shud be having...whereas in contrast to this the adaptor is is coiling inside and this power supply is light weight and has all the wiring done on a PCB(printed circuit board) inside... and most of all the advantage of using this is...i'll let the pic do the talking

see it has the following ratings.. input = 100-240v AC (yeah thats right full range)....output = 9.0v DC ~ 750ma ...
the thing to notice is that its input voltage is 100-240V AC hence when the UPS kicks in that bump WILL NOT cause the router/modem to restart..and as a result..continuous connectivity....no "khuwari" :D
so all ya gotta do is get ur hands on these..any brand as long as its a power supply and NOT an adapter...and that the ratings both input and output are same...the output AMPERAGE can be more...that is no issue...actually even better...
so enjoy guys..lemme know how it works out for ya...wud luv to hear ur comments..
if u need any help sourcing out the power supplies for ur equipment...lemme know via pm...ill be glad to guide you...and even send one to you..
^^^ prove this guy wrong 
and to all the ppl who are gonna say ke simply keh detay ke ye ye karo itni lambi post kiu likhi...well i like to explain stuff..not just provide a solution..rather tell how its done...that..i cant change...
Regards..