Change 0 & 1 to DIRECTION_INCOMING and DIRECTION_OUTGOING