-static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int index, int law)
+#ifdef ZAPATA_PRI
+static void set_calltype(struct ast_channel *chan, int ctype)
+{
+ char *s = "UNKNOWN";
+ switch(ctype) {
+ case PRI_TRANS_CAP_SPEECH:
+ s = "SPEECH";
+ break;
+ case PRI_TRANS_CAP_DIGITAL:
+ s = "DIGITAL";
+ break;
+ case PRI_TRANS_CAP_RESTRICTED_DIGITAL:
+ s = "RESTRICTED_DIGITAL";
+ break;
+ case PRI_TRANS_CAP_3_1K_AUDIO:
+ s = "31KAUDIO";
+ break;
+ case PRI_TRANS_CAP_7K_AUDIO:
+ s = "7KAUDIO";
+ break;
+ case PRI_TRANS_CAP_VIDEO:
+ s = "VIDEO";
+ break;
+ }
+ pbx_builtin_setvar_helper(chan, "CALLTYPE", s);
+}
+#endif
+static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int index, int law, int ctype)