Immediately has a close meaning to "as soon as," but "directly" doesn't necessarily translates to "as soon as." Directly is more like "straight to," at least in American English.
Example: As soon as he got off the bus, he directly went to the telephone booth.
That example basically says that the person went straight to the telephone booth the moment he got off the bus.
However, "immediately" has a somewhat different meaning. Using your example, we can restate it as:
"When he got off the bus, he immediately dashed to the telephone booth."