Bam Margera's got an avenue to maintain a relationship with his son ... but it looks like the former "Jackass" star will have to settle for FaceTime calls with Phoenix, at least for now.
According to new legal docs, obtained by TMZ, Bam's estranged wife Nikki is getting sole legal and physical custody of their 5-year-old boy for the time being, while Bam's being limited to FaceTime visits.
The judge's ruling came down Tuesday ... Nikki was physically in court and Bam appeared via video conference, a foreshadowing of his upcoming interactions with Phoenix.
For now, Bam's only being allowed to see Phoenix over FaceTime via 20-minute calls on Mondays, Wednesday and Fridays, plus 30-minute calls on Sundays. Nikki's not allowed to monitor the calls.
Bam and Nikki are due back in court in a few months, so it seems this will be the status quo until then. As we reported, Bam was taken into custody Wednesday morning in a suburb just outside of Philly, being cited for public intoxication.
Sources told us officers saw him arguing loudly with a woman outside a hotel, and claimed he smelled like booze and was slurring his speech.
Nikki's attorney, David Glass, tells us the court refused to institute drug and alcohol testing as a requirement for Bam's FaceTime visitations ... but he thinks Tuesday's incident backs up their "continuing claims that Mr. Margera's behavior is inconsistent, erratic, and his contact with the minor child needs to be monitored."