Getty/TMZ
Exclusive

Bam Margera Son His Motivation for Sobriety ... Finally Talking to Phoenix

Bam Margera's son Phoenix is inspiring him to detox and sober up following a psych hold ... and his estranged wife is allowing him to talk to their kid again.

Nikki Margera's attorney, David Glass, tells TMZ ... she's given the green light for Bam and Phoenix to start communicating, and they're talking over FaceTime while Bam's in rehab.

We're told Bam's FaceTime sessions with Phoenix are being modulated by one of Bam's therapists ... and, so far, things are going well.

Sources familiar with the situation tell TMZ ... Bam is still in treatment at one of Lamar Odom's rehab facilities, and Nikki is not talking to him on the FaceTime calls.

There's been a lot of bad blood between Bam and Nikki ever since she filed for legal separation, including a series of angry texts Bam recently sent her, so it's not a surprise she's staying off the calls.

Our sources say Bam usually dominates the FaceTime convos with 5-year-old Phoenix, with Dad typically going on for about 5 minutes.

As we first reported, Bam's been detoxing since June 7 ... this after LAPD put him on a 5150 psychiatric hold following a video rant where he threatened to end his life if he couldn't see his son.

Click here for info about our online advertising practices.