What's your poison if you don't mind me asking? Did you go to rehab voluntarily or did you get put there, because that can make all the difference in the world as to whether or not you stay sober when you get out....
Are there factors that your subjecting yourself too that you could change that are adding to your relapses, i.e. living situation (roomates who party), girlfriend/boyfriend who use, family stress? if so, it might be time to make some changes....
The thing with rehab is people can easily get a false sense of security from it, they think they'll get out and everything will be fine...BUT, the big bad world is waiting on the outside of those doors....and it has everything you left behind when you went in...so you have to learn the tools and coping skills to "not use" in order to stay sober....you can't just think it's a given.
There's a reason you've relapsed twice in such a short amount of time....and you're the only one who can say what it is....you need to identify it, face it and work it out. Trust me it's not random...there's always a reason.
IMO, get a sponsor, and call before you pick up
Go to meetings.
If you were at a rehab for 5 months, you already know this, use the tools.
it's good your asking for help, one relapse or 2, it's like you never stopped,
your body picks up where you left off, dig?
Best of luck and keep posting.