A communication software generation method is proposed to use terminal behaviors as service specifications for giving non-experts the chance t o define communication services. In this method, a declarative specification language of observable terminal behaviors, STR, and supplementary specifications to implement, STR specifications, STR./D, are used, and they are automatically transformed into a communication software. The generated software is used for controlling services on a PBX. A logical interface for controlling a PBX is introduced to describe STR/D specifications which are independent of individual service specifications in the STR. The application results show that the proposed method is feasible and useful.