There are all sorts of ways to tackle this, but they will have varying degrees of success depending on quite what is happening.
First, what is the source of the calls? It could be someone playing a practical joke or with some kind of vendetta, but almost certainly, it's a predictive dialler at a telemarketing call centre. They have automated dialling systems that call people, and when you answer, you get transferred to an operator. But they make more calls than there are operators, presumably to keep operators fully busy and not waiting for a connection. i.e. they're saving themselves money.
The next question is ..... where is the call centre? If it's in he UK (or, IIRC, if it's acting on behalf of a UK company) then what they are doing is now (and has been for several years) illegal. Not that they are making calls, but that they are silent. Ofcom introduced new rules about 3 years ago that companies doing this MUST respect TPS lists, MUST put caller ID info on such outgoing calls and MUST play a message explaining what happened if an operator is not available. Companies ignoring that are subject to fines of up to £50,000 or so.
So .... are you getting caller ID information? If not, does 1471 (or similar) work to give you the caller's number? If it does, contact Ofcom and complain.
But, if the calls are coming from an overseas call centre, they aren't bound by that. If the company they are hired by is UK based then, IIRC< that company is bound by it. So, if you can find out who they are calling on behalf of, you can still complain, either to Ofcom or to the company directly about the activity of their call centre. If the hiring company is not UK based, then you have a real problem, as they aren't bound by Ofcom either.
You can register with the TPS (Telephone Preference Service). They will add you number to a "no marketing calls" list that
most decent companies respect. It'll take some weeks to be effective though, and again, foreign companies tend to ignore it.
You can try talking to O2, not about call blocking, but about nuisance and abusive calls. If it's waking you up at night, then I'd take the attitude that :-
1) I'm sometime on call so I need the phone at night, and can't turn it off
2) These calls are in the middle of the night, and wrecking my sleep.
3) If O2 can't find a way to prevent this, I'll find an airtime provider that can.
If this were a landline, there are devices that will block such calls. like
Callblocker. Essentially, this answer the call
silently, without ringing the phone bell. It then plays a message, requiring the caller to press a number (lke Press 7 to connect) and
only rings the phone bell alerting you if they do so. i.e. it blocks automated calls that can't respond to such a message.
There
might be something that works with mobiles too, but I can't think offhand quite how it would do it. But that company may have a product, or know of someone that does.
Finally, if all else fails, you'll have to either put the phone on silent mode (as you have), or turn it off at night. At worst, you could get another cheap phone (or an old one) on PAYG for urgent night time calls and ONLY give the number out to people that absolutely need it, like family, or if you are on call, to the office, and not to ANYONE else. These dialling systems have to get the number from somewhere, and while some of them just dial sequentially and won't be prevented by that, at least it would be a different number.
And for the future, especially if you do end up changing number, be very selective who you give it to. I very,
very rarely give my number to commercial operations, for precisely this reason. My insurance broker wants it, but doesn't get it, for instance. I have a mobile I use for exactly this purpose, and it's only turned on when it's convenient to
me. Otherwise, they can write me a letter. And I left British Telecom many years ago, and have never been back, because they
would not stop pestering me with telesales calls. And when I mean would not stop, I mean they ignored requests, ignored complaints to customer service, ignored two letters of complaint to their Chairman. and ignored a complaint to Ofcom. I still keep getting "come back" letters .... which I ignore. ;)
BT are largely responsible for my current attitude, which is that
nobody gets my phone number unless I want them to have it. Not my insurance broker, not my bank, not even HMRC. I don't have much good to say about NTL, but at least they never pestered me with telesales calls, which is more than I can say for BT.