Have you looked at associated modem line feature. It allows an ons port to dialout for itself or the associated phone depending on the terminating character * or #.