A convicted criminal has won a legal challenge after he claimed a recorded message on phone calls from prison breached his human rights.
Lord Glennie said there was no justification for the policy
Stewart Potter, 43, from Glasgow, is serving a 21-year sentence for assault and robbery.
He claimed the recorded message was "an unnecessary and embarrassing reminder" of where he was phoning from.
A judge at the Court of Session ruled the system was unlawful under the European Convention on Human Rights.
Phone calls made out of prison carry a pre-recorded message that the call is coming from a jail.
Judge Lord Glennie said this policy was not made with the authority of parliament.
He said: "In some societies, it might be regarded as obvious that a person convicted of a criminal offence and sentenced to a period of imprisonment should, for the duration of his imprisonment, be deprived of his civil rights.
"Such a notion has no place in our society." said the judge.
Potter has been serving his sentence in HMP Glenochil, Clackmannanshire.
He was jailed for assault and stealing money from a wine shop in the west end of Glasgow in 2001.
The manageress told the High Court in Glasgow that Potter had foamed at the mouth "like a mad dog" as he held a knife to her throat.
Potter challenged the legality of the Scottish Prison Service policy after obtaining legal aid.
Potter was jailed for assault and robbery at an off-licence in Glasgow
Aidan O'Neill QC, for Potter, argued that there was no justification for a blanket policy on phone calls.
He said measures were in place, including pre-approval of phone numbers, which meant a prisoner could not make calls to victims or others who did not want to receive his calls.
Lord Glennie said: "It is accepted that the message constitutes interference with the prisoner's right to respect for family life and correspondence."
The judge pointed out examples given in Potter's legal challenge.
He said that if Potter telephoned his children's school, the message would be heard by whoever picked up the telephone.
When Potter telephones home, the message tells his family and particularly his children of the fact that he is prison.
The Scottish Prison Service said the message was meant to stop "grooming", prevent former victims of crime being contacted and halt calls to people who had previously been harassed.
Lord Glennie said that given the safeguards were in place he could see no justification for a blanket policy of pre-recorded messages.
"If, despite these safeguards, there is perceived to be a risk in a particular case, some form of message, pre-recorded or otherwise, could be attached on a case by case basis," he added.
William Higham, head of policy at the Prison Reform Trust, said: "A recorded message preceding all phone calls from a prison is a very blunt instrument indeed for guarding against potential nuisance calls.
"Prison is already far too brutally effective at breaking up families and social ties, such a 'scarlet letter' approach to a vital communication lifeline is unnecessary and harmful.
"The judge is quite right to say that the punishment of prison is loss of liberty and not the destruction of family life."
However, political parties criticised the ruling.
Kenny MacAskill, the SNP's justice spokesman, said: "This is utterly outrageous - people who breach the law must pay the price.
"Hardworking taxpayers' money is being used to fund these legal aid cases.
"Money which could be going to help vulnerable people in need of legal representation. A line needs to be drawn and it needs to be drawn now."
Scottish Conservative leader Annabel Goldie said: "Back in February when we first heard about this, I warned that we would be a laughing stock if this man won his case.
"There is a clear issue here - are the rights of the law-abiding majority being served ahead of the rights of a minority who happen to be in jail? It appears not.
"Prisoners forfeit a number of rights when they go to jail for their crimes, which should include the ability to dictate on what terms they make a phone call."
A spokesman for the Scottish Prison Service said: "We are aware of the decision and are considering it carefully."