"the dsl light is continuously flickering...if i connect broadband through that junction box for phone and computer"
I'm assuming the junction box has two ouput jacks. It could also have two telephone cables coming out of it.
The DSL modem's telephone line must connect to the jack in the junction box for DSL, NOT to the one for Phone (that's for any telephone line connected device except a DSL modem).
"if i directly connect the phone line from the socket in bedroom to the modem in living room then im getting the internet"
If you mean the jack in the wall in the bedroom, then that jack has a DSL connection available.
If that's connected to your only phone line, then all the telephone jacks connected to that line have a DSL connection available, and the junction box in the living room merely has a DSL blocking filter inside it between the line and the jack for Phone.
DSL blocking filters are either in a box, or are inserted inline between an non DSL device and the the wall jack (those have a male telephone plug on one end, a female jack on the other).
It's NOT a good idea to run a phone line longer than about 6 feet / 2 meters to the modem. The cheap flat phone cables do not have twisted pairs of wires like network cables do and they pick up electric and electronic interference from devices in their surroundings as if they were an antenna - the longer they are, the worse the problem is likely to be, the more likely your DSL connection will be unreliable (you may lose the DSL connection to the internet once in a while) or have a lower max speed.
It's a much better idea to move the modem into the bedroom, connect it's phone line connection to the jack in the bedroom, and use a relatively short phone cable between the jack and the modem. Use a plug in splitter in the jack that has at least two jacks if you need the single telephone jack for something else. There must be no DSL/ADSL filter inline between the jack and the DSL modem, but all other devices in your location that connect to the same telephone line you get the DSL connection from must have that, otherwise the other devices may not work properly (the filters block the DSL signal).