浏览代码

tm: update to make seas module work

- worked from patch provided by Elias Baixas
- new function to build uac cancel exported via API
- several parameters for reply functions converted from char* to str*
  as lenght was available or needed anyhow
- updated cancel_uacs() type definition
Daniel-Constantin Mierla 15 年之前
父节点
当前提交
b51171b5b8

+ 23 - 0
modules/tm/dlg.c

@@ -357,6 +357,29 @@ int new_dlg_uac(str* _cid, str* _ltag, unsigned int _lseq, str* _luri, str* _rur
 	return 0;
 }
 
+/**
+ * @brief Store display names into a dialog
+ * @param _d - dialog structure
+ * @param _ldname - local party display name
+ * @param _rdname - remote party dispaly name
+ * @return 0 on success; negative on error
+ */
+
+int dlg_add_extra(dlg_t* _d, str* _ldname, str* _rdname)
+{
+	if(!_d || !_ldname || !_rdname)
+	{
+		LM_ERR("Invalid parameters\n");
+		return -1;
+	}
+
+	/* Make a copy of local Display Name */
+	if(shm_str_dup(&_d->loc_dname, _ldname) < 0) return -2;
+	/* Make a copy of remote Display Name */
+	if(shm_str_dup(&_d->rem_dname, _rdname) < 0) return -3;
+
+	return 0;
+}
 
 /*
  * Parse Contact header field body and extract URI

+ 9 - 0
modules/tm/dlg.h

@@ -114,6 +114,8 @@ typedef struct dlg {
 	str rem_uri;            /* Remote URI */
 	str rem_target;         /* Remote target URI */
 	str dst_uri;		/* Destination URI */
+	str loc_dname;          /* Local Display Name */
+	str rem_dname;          /* Remote Display Name */
 	unsigned char secure;   /* Secure flag -- currently not used */
 	dlg_state_t state;      /* State of the dialog */
 	rr_t* route_set;        /* Route set */
@@ -140,6 +142,13 @@ int new_dlg_uac(str* _cid, str* _ltag, unsigned int _lseq, str* _luri, str* _rur
 typedef int (*new_dlg_uac_f)(str* _cid, str* _ltag, unsigned int _lseq, str* _luri, str* _ruri, dlg_t** _d);
 
 
+/**
+* Function to add Display Names to an existing dialog
+*/
+int dlg_add_extra(dlg_t* _d, str* _ldname, str* _rdname);
+typedef int (*dlg_add_extra_f)(dlg_t* _d, str* _ldname, str* _rdname);
+
+
 /*
  * A response arrived, update dialog
  */

+ 6 - 0
modules/tm/h_table.h

@@ -289,6 +289,12 @@ struct totag_elem {
 #endif /* CANCEL_REASON_SUPPORT */
 #define T_DONT_FORK   (T_CANCELED|T_6xx)
 
+#ifdef WITH_AS_SUPPORT
+	/* provisional replies must trigger callbacks for local transaction */
+#	define T_PASS_PROVISIONAL_FLAG (1<<11)
+#	define pass_provisional(_t_)	((_t_)->flags&T_PASS_PROVISIONAL_FLAG)
+#endif
+
 /* unsigned short should be enough for a retr. timer: max. 65535 ticks =>
  * max  retr. = 1023 s for tick = 15 ms, which should be more then enough and
  * saves us 2*2 bytes */

+ 107 - 0
modules/tm/t_cancel.c

@@ -433,5 +433,112 @@ int cancel_b_flags_fixup(void* handle, str* gname, str* name, void** val)
 }
 
 
+/**
+ * This function cancels a previously created local invite
+ * transaction. The cancel parameter should NOT have any via (CANCEL is
+ * hop by hop). returns 0 if error return >0 if OK (returns the LABEL of
+ * the cancel).*/
+unsigned int t_uac_cancel( str *headers, str *body,
+		unsigned int cancelled_hashIdx, unsigned int cancelled_label,
+		transaction_cb cb, void* cbp)
+{
+	struct cell *t_invite,*cancel_cell;
+	struct retr_buf *cancel,*invite;
+	unsigned int len,ret;
+	char *buf;
+
+	ret=0;
+	if(t_lookup_ident(&t_invite,cancelled_hashIdx,cancelled_label)<0){
+		LM_ERR("failed to t_lookup_ident hash_idx=%d,"
+				"label=%d\n", cancelled_hashIdx,cancelled_label);
+		return 0;
+	}
+	/* <sanity_checks> */
+	if(! is_local(t_invite))
+	{
+		LM_ERR("tried to cancel a non-local transaction\n");
+		goto error3;
+	}
+	if(t_invite->uac[0].last_received < 100)
+	{
+		LM_WARN("trying to cancel a transaction not in "
+					"Proceeding state !\n");
+		goto error3;
+	}
+	if(t_invite->uac[0].last_received > 200)
+	{
+		LM_WARN("trying to cancel a completed transaction !\n");
+		goto error3;
+	}
+	/* </sanity_checks*/
+	/* <build_cell> */
+	if(!(cancel_cell = build_cell(0))){
+		ret=0;
+		LM_ERR("no more shm memory!\n");
+		goto error3;
+	}
+	reset_avps();
+	if(cb && insert_tmcb(&(cancel_cell->tmcb_hl),
+			TMCB_RESPONSE_IN|TMCB_LOCAL_COMPLETED,cb,cbp,0)!=1){
+		ret=0;
+		LM_ERR("short of tmcb shmem !\n");
+		goto error2;
+	}
+	/* </build_cell> */
+
+	/* <insert_into_hashtable> */
+	cancel_cell->flags |= T_IS_LOCAL_FLAG;
+	cancel_cell->hash_index=t_invite->hash_index;
+
+	LOCK_HASH(cancel_cell->hash_index);
+	insert_into_hash_table_unsafe(cancel_cell,cancel_cell->hash_index);
+	ret=cancel_cell->label;
+	cancel_cell->label=t_invite->label;
+	UNLOCK_HASH(cancel_cell->hash_index);
+	/* </insert_into_hashtable> */
+
+	/* <prepare_cancel> */
+
+	cancel=&cancel_cell->uac[0].request;
+	invite=&t_invite->uac[0].request;
+
+	cancel->dst.to              = invite->dst.to;
+	cancel->dst.send_sock       = invite->dst.send_sock;
+	cancel->dst.proto           = invite->dst.proto;
+	//cancel->dst.proto_reserved1 = invite->dst.proto_reserved1;
+
+	if(!(buf = build_uac_cancel(headers,body,t_invite,0,&len,
+					&(cancel->dst)))){
+		ret=0;
+		LM_ERR("attempt to build a CANCEL failed\n");
+		goto error1;
+	}
+	cancel->buffer=buf;
+	cancel->buffer_len=len;
+	cancel_cell->method.s = buf;
+	cancel_cell->method.len = 6 /*c-a-n-c-e-l*/;
+	/* </prepare_cancel> */
+
+	/* <strart_sending> */
+	cancel_cell->nr_of_outgoings++;
+	if (SEND_BUFFER(cancel)==-1) {
+		ret=0;
+		LM_ERR("send failed\n");
+		goto error1;
+	}
+	start_retr(cancel);
+	/* </start_sending> */
+
+	return ret;
+
+error1:
+	LOCK_HASH(cancel_cell->hash_index);
+	remove_from_hash_table_unsafe(cancel_cell);
+	UNLOCK_HASH(cancel_cell->hash_index);
+error2:
+	free_cell(cancel_cell);
+error3:
+	return ret;
+}
 
 

+ 10 - 2
modules/tm/t_cancel.h

@@ -89,8 +89,8 @@ int cancel_branch( struct cell *t, int branch,
 #endif /* CANCEL_REASON_SUPPORT */
 					int flags );
 
-typedef int(*cancel_uacs_f)( struct cell *t, branch_bm_t cancel_bm,
-								int flags );
+typedef int(*cancel_uacs_f)(struct cell *t, struct cancel_info* cancel_data,
+		int flags);
 typedef int (*cancel_all_uacs_f)(struct cell *trans, int how);
 
 typedef void (*prepare_to_cancel_f)(struct cell *t, branch_bm_t *cancel_bm,
@@ -138,4 +138,12 @@ void rpc_cancel(rpc_t* rpc, void* c);
 int cancel_b_flags_fixup(void* handle, str* gname, str* name, void** val);
 int cancel_b_flags_get(unsigned int* f, int m);
 
+typedef unsigned int (*tuaccancel_f)( str *headers,str *body,
+		unsigned int cancelledIdx,unsigned int cancelledLabel,
+		transaction_cb cb, void* cbp);
+
+unsigned int t_uac_cancel(str *headers,str *body,
+		unsigned int cancelledIdx,unsigned int cancelledLabel,
+		transaction_cb cb, void* cbp);
+
 #endif

+ 114 - 0
modules/tm/t_msgbuilder.c

@@ -1578,3 +1578,117 @@ int t_calc_branch(struct cell *t,
 			b, branch, branch_len );
 }
 
+/**
+ * build CANCEL from UAC side
+ */
+char *build_uac_cancel(str *headers,str *body,struct cell *cancelledT,
+		unsigned int branch, unsigned int *len, struct dest_info* dst)
+{
+	char *cancel_buf, *p;
+	char branch_buf[MAX_BRANCH_PARAM_LEN];
+	str branch_str;
+	struct hostport hp;
+	str content_length, via;
+
+	LM_DBG("sing FROM=<%.*s>, TO=<%.*s>, CSEQ_N=<%.*s>\n",
+		cancelledT->from.len, cancelledT->from.s, cancelledT->to.len,
+		cancelledT->to.s, cancelledT->cseq_n.len, cancelledT->cseq_n.s);
+
+	branch_str.s=branch_buf;
+	if (!t_calc_branch(cancelledT,  branch, branch_str.s, &branch_str.len )){
+		LM_ERR("failed to create branch !\n");
+		goto error;
+	}
+	set_hostport(&hp,0);
+
+	if (assemble_via(&via, cancelledT, dst, branch) < 0) {
+		LOG(L_ERR, "build_uac_req(): Error while assembling Via\n");
+		return 0;
+	}
+
+	/* method, separators, version  */
+	*len=CANCEL_LEN + 2 /* spaces */ +SIP_VERSION_LEN + CRLF_LEN;
+	*len+=cancelledT->uac[branch].uri.len;
+	/*via*/
+	*len+= via.len;
+	/*From*/
+	*len+=cancelledT->from.len;
+	/*To*/
+	*len+=cancelledT->to.len;
+	/*CallId*/
+	*len+=cancelledT->callid.len;
+	/*CSeq*/
+	*len+=cancelledT->cseq_n.len+1+CANCEL_LEN+CRLF_LEN;
+	/* User Agent */
+	if (server_signature) {
+		*len += USER_AGENT_LEN + CRLF_LEN;
+	}
+	/* Content Length  */
+	if (print_content_length(&content_length, body) < 0) {
+		LM_ERR("failed to print content-length\n");
+		return 0;
+	}
+	/* Content-Length */
+	*len += (body ? (CONTENT_LENGTH_LEN + content_length.len + CRLF_LEN) : 0);
+	/*Additional headers*/
+	*len += (headers ? headers->len : 0);
+	/*EoM*/
+	*len+= CRLF_LEN;
+	/* Message body */
+	*len += (body ? body->len : 0);
+
+	cancel_buf=shm_malloc( *len+1 );
+	if (!cancel_buf)
+	{
+		LM_ERR("no more share memory\n");
+		goto error01;
+	}
+	p = cancel_buf;
+
+	memapp( p, CANCEL, CANCEL_LEN );
+
+	*(p++) = ' ';
+	memapp( p, cancelledT->uac[branch].uri.s,
+		cancelledT->uac[branch].uri.len);
+	memapp( p, " " SIP_VERSION CRLF, 1+SIP_VERSION_LEN+CRLF_LEN );
+
+	/* insert our via */
+	memapp(p,via.s,via.len);
+
+	/*other headers*/
+	memapp( p, cancelledT->from.s, cancelledT->from.len );
+	memapp( p, cancelledT->callid.s, cancelledT->callid.len );
+	memapp( p, cancelledT->to.s, cancelledT->to.len );
+
+	memapp( p, cancelledT->cseq_n.s, cancelledT->cseq_n.len );
+	*(p++) = ' ';
+	memapp( p, CANCEL, CANCEL_LEN );
+	memapp( p, CRLF, CRLF_LEN );
+
+	/* User Agent header */
+	if (server_signature) {
+		memapp(p,USER_AGENT CRLF, USER_AGENT_LEN+CRLF_LEN );
+	}
+	/* Content Length*/
+	if (body) {
+		memapp(p, CONTENT_LENGTH, CONTENT_LENGTH_LEN);
+		memapp(p, content_length.s, content_length.len);
+		memapp(p, CRLF, CRLF_LEN);
+	}
+	if(headers && headers->len){
+		memapp(p,headers->s,headers->len);
+	}
+	/*EoM*/
+	memapp(p,CRLF,CRLF_LEN);
+	if(body && body->len){
+		memapp(p,body->s,body->len);
+	}
+	*p=0;
+	pkg_free(via.s);
+	return cancel_buf;
+error01:
+	pkg_free(via.s);
+error:
+	return NULL;
+}
+

+ 5 - 0
modules/tm/t_msgbuilder.h

@@ -73,6 +73,11 @@ char *build_uac_request(  str msg_type, str dst, str from,
 	str body, int branch,
 	struct cell *t, unsigned int *len);
 
+/*
+ * The function creates an UAC CANCEL
+ */
+char *build_uac_cancel(str *headers,str *body,struct cell *cancelledT,
+		unsigned int branch, unsigned int *len, struct dest_info* dst);
 
 /*
  * The function creates an ACK to 200 OK. Route set will be created

+ 41 - 29
modules/tm/t_reply.c

@@ -549,7 +549,7 @@ inline static void start_final_repl_retr( struct cell *t )
 
 
 static int _reply_light( struct cell *trans, char* buf, unsigned int len,
-			 unsigned int code, char * text,
+			 unsigned int code,
 			 char *to_tag, unsigned int to_tag_len, int lock,
 			 struct bookmark *bm	)
 {
@@ -696,6 +696,7 @@ static int _reply( struct cell *trans, struct sip_msg* p_msg,
 	struct bookmark bm;
 	int dset_len;
 	struct lump_rpl* rpl_l;
+	str reason;
 
 	rpl_l=0;
 	if (code>=200) set_kr(REQ_RPLD);
@@ -710,25 +711,28 @@ static int _reply( struct cell *trans, struct sip_msg* p_msg,
 		}
 	}
 
+	reason.s = text;
+	reason.len = strlen(text);
 	if (code>=180 && p_msg->to
 				&& (get_to(p_msg)->tag_value.s==0
 			    || get_to(p_msg)->tag_value.len==0)) {
 		calc_crc_suffix( p_msg, tm_tag_suffix );
-		buf = build_res_buf_from_sip_req(code,text, &tm_tag, p_msg, &len, &bm);
+		buf = build_res_buf_from_sip_req(code, &reason, &tm_tag, p_msg,
+				&len, &bm);
 		if (unlikely(rpl_l)){
 			unlink_lump_rpl(p_msg, rpl_l);
 			free_lump_rpl(rpl_l);
 		}
-		return _reply_light( trans, buf, len, code, text,
+		return _reply_light( trans, buf, len, code,
 			tm_tag.s, TOTAG_VALUE_LEN, lock, &bm);
 	} else {
-		buf = build_res_buf_from_sip_req(code,text, 0 /*no to-tag*/,
+		buf = build_res_buf_from_sip_req(code, &reason, 0 /*no to-tag*/,
 			p_msg, &len, &bm);
 		if (unlikely(rpl_l)){
 			unlink_lump_rpl(p_msg, rpl_l);
 			free_lump_rpl(rpl_l);
 		}
-		return _reply_light(trans,buf,len,code,text,
+		return _reply_light(trans,buf,len,code,
 			0, 0, /* no to-tag */lock, &bm);
 	}
 }
@@ -1520,6 +1524,7 @@ inline static char* reply_aggregate_auth(int code, char* txt, str* new_tag,
 	struct lump_rpl*  lst_end;
 	struct sip_msg* req;
 	char* buf;
+	str reason;
 	
 	first=0;
 	lst_end=0;
@@ -1546,7 +1551,9 @@ inline static char* reply_aggregate_auth(int code, char* txt, str* new_tag,
 		}
 	}
 skip:
-	buf=build_res_buf_from_sip_req(code, txt, new_tag, req, res_len, bm);
+	reason.s = txt;
+	reason.len = strlen(txt);
+	buf=build_res_buf_from_sip_req(code, &reason, new_tag, req, res_len, bm);
 	/* clean the added lumps */
 	if (first){
 		lst=*first;
@@ -1598,6 +1605,7 @@ enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int branch,
 	relayed_msg=0;
 	relayed_code=0;
 	totag_retr=0;
+	str reason;
 
 
 	/* remember, what was sent upstream to know whether we are
@@ -1659,8 +1667,10 @@ enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int branch,
 				/* revert the temporary "store" reply above */
 				t->uac[branch].reply=reply_bak;
 			}else{
+				reason.s = error_text(relayed_code);
+				reason.len = strlen(reason.s);
 				buf = build_res_buf_from_sip_req( relayed_code,
-						error_text(relayed_code), to_tag,
+						&reason, to_tag,
 						t->uas.request, &res_len, &bm );
 			}
 		} else {
@@ -1678,7 +1688,9 @@ enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int branch,
 					to_tag=0;
 				}
 				/* don't relay a 503, replace it w/ 500 (rfc3261) */
-				buf=build_res_buf_from_sip_req(500, error_text(relayed_code),
+				reason.s = error_text(relayed_code);
+				reason.len = strlen(reason.s);
+				buf=build_res_buf_from_sip_req(500, &reason,
 									to_tag, t->uas.request, &res_len, &bm);
 				relayed_code=500;
 			}else if (cfg_get(tm, tm_cfg, tm_aggregate_auth) && 
@@ -2332,7 +2344,7 @@ trans_not_found:
 
 
 int t_reply_with_body( struct cell *trans, unsigned int code,
-		char * text, char * body, char * new_header, char * to_tag )
+		str *text, str *body, str *new_header, str *to_tag )
 {
 	struct lump_rpl *hdr_lump;
 	struct lump_rpl *body_lump;
@@ -2341,19 +2353,20 @@ int t_reply_with_body( struct cell *trans, unsigned int code,
 	int  ret;
 	struct bookmark bm;
 
-	s_to_tag.s = to_tag;
-	if(to_tag)
-		s_to_tag.len = strlen(to_tag);
-	else
+	if(to_tag) {
+		s_to_tag.s = to_tag->s;
+		s_to_tag.len = to_tag->len;
+	} else {
 		s_to_tag.len = 0;
+	}
 
 	/* mark the transaction as replied */
 	if (code>=200) set_kr(REQ_RPLD);
 
 	/* add the lumps for new_header and for body (by bogdan) */
-	if (new_header && strlen(new_header)) {
-		hdr_lump = add_lump_rpl( trans->uas.request, new_header,
-					 strlen(new_header), LUMP_RPL_HDR );
+	if (new_header && new_header->len) {
+		hdr_lump = add_lump_rpl( trans->uas.request, new_header->s,
+					 new_header->len, LUMP_RPL_HDR );
 		if ( !hdr_lump ) {
 			LOG(L_ERR,"ERROR:tm:t_reply_with_body: cannot add hdr lump\n");
 			goto error;
@@ -2363,8 +2376,8 @@ int t_reply_with_body( struct cell *trans, unsigned int code,
 	}
 
 	/* body lump */
-	if(body && strlen(body)) {
-		body_lump = add_lump_rpl( trans->uas.request, body, strlen(body),
+	if(body && body->len) {
+		body_lump = add_lump_rpl( trans->uas.request, body->s, body->len,
 			LUMP_RPL_BODY );
 		if (body_lump==0) {
 			LOG(L_ERR,"ERROR:tm:t_reply_with_body: cannot add body lump\n");
@@ -2398,7 +2411,7 @@ int t_reply_with_body( struct cell *trans, unsigned int code,
 
 	DBG("t_reply_with_body: buffer computed\n");
 	// frees 'res.s' ... no panic !
-	ret=_reply_light( trans, rpl.s, rpl.len, code, text,
+	ret=_reply_light( trans, rpl.s, rpl.len, code,
 		s_to_tag.s, s_to_tag.len, 1 /* lock replies */, &bm );
 	/* this is ugly hack -- the function caller may wish to continue with
 	 * transaction and I unref; however, there is now only one use from
@@ -2485,7 +2498,8 @@ static int send_reply(struct cell *trans, unsigned int code, str* text, str* bod
 		goto sr_error;
 	}
 
-	ret = _reply_light(trans, rpl.s, rpl.len, code, text->s,  to_tag->s, to_tag->len, 1 /* lock replies */, &bm);
+	ret = _reply_light(trans, rpl.s, rpl.len, code,  to_tag->s, to_tag->len,
+			1 /* lock replies */, &bm);
 	     /* this is ugly hack -- the function caller may wish to continue with
 	      * transaction and I unref; however, there is now only one use from
 	      * vm/fifo_vm_reply and I'm currently to lazy to export UNREF; -jiri
@@ -2522,32 +2536,30 @@ void rpc_reply(rpc_t* rpc, void* c)
 	int ret;
 	struct cell *trans;
 	unsigned int hash_index, label, code;
-	str ti;
-	char* reason, *body, *headers, *tag;
+	str ti, body, headers, tag, reason;
 
 	if (rpc->scan(c, "d", &code) < 1) {
 		rpc->fault(c, 400, "Reply code expected");
 		return;
 	}
 
-	if (rpc->scan(c, "s", &reason) < 1) {
+	if (rpc->scan(c, "S", &reason) < 1) {
 		rpc->fault(c, 400, "Reason phrase expected");
 		return;
 	}
 
-	if (rpc->scan(c, "s", &ti.s) < 1) {
+	if (rpc->scan(c, "S", &ti) < 1) {
 		rpc->fault(c, 400, "Transaction ID expected");
 		return;
 	}
-	ti.len = strlen(ti.s);
 
-	if (rpc->scan(c, "s", &tag) < 1) {
+	if (rpc->scan(c, "S", &tag) < 1) {
 		rpc->fault(c, 400, "To tag expected");
 		return;
 	}
 
-	if (rpc->scan(c, "s", &headers) < 0) return;
-	if (rpc->scan(c, "s", &body) < 0) return;
+	if (rpc->scan(c, "S", &headers) < 0) return;
+	if (rpc->scan(c, "S", &body) < 0) return;
 
 	if(sscanf(ti.s,"%u:%u", &hash_index, &label) != 2) {
 		ERR("Invalid trans_id (%s)\n", ti.s);
@@ -2564,7 +2576,7 @@ void rpc_reply(rpc_t* rpc, void* c)
 
 	/* it's refcounted now, t_reply_with body unrefs for me -- I can
 	 * continue but may not use T anymore  */
-	ret = t_reply_with_body(trans, code, reason, body, headers, tag);
+	ret = t_reply_with_body(trans, code, &reason, &body, &headers, &tag);
 
 	if (ret < 0) {
 		ERR("Reply failed\n");

+ 4 - 4
modules/tm/t_reply.h

@@ -131,8 +131,8 @@ struct cancel_info {
 /* reply export types */
 typedef int (*treply_f)(struct sip_msg * , unsigned int , char * );
 typedef int (*treply_wb_f)( struct cell* trans,
-	unsigned int code, char * text, char * body, 
-	char * new_header, char * to_tag);
+	unsigned int code, str *text, str *body,
+	str *new_header, str *to_tag);
 typedef int (*treply_trans_f)(struct cell *t, struct sip_msg* p_msg, unsigned int code,
 	char * text);
 
@@ -171,8 +171,8 @@ int t_retransmit_reply( /* struct sip_msg * */  );
  */
 
 
-int t_reply_with_body( struct cell *trans, unsigned int code, 
-		       char * text, char * body, char * new_header, char * to_tag );
+int t_reply_with_body(struct cell *trans, unsigned int code,
+		str *text, str *body, str *new_header, str *to_tag);
 
 
 /* send a UAS reply

+ 3 - 1
modules/tm/tm_load.c

@@ -113,7 +113,9 @@ int load_tm( struct tm_binds *tmb)
 	tmb->cancel_all_uacs = cancel_all_uacs;
 	tmb->prepare_request_within = prepare_req_within;
 	tmb->send_prepared_request = send_prepared_request;
-	
+	tmb->dlg_add_extra = dlg_add_extra;
+	tmb->t_cancel_uac = t_uac_cancel;
+
 #ifdef DIALOG_CALLBACKS
 	tmb->register_new_dlg_cb=register_new_dlg_cb;
 	tmb->register_dlg_tmcb=register_dlg_tmcb;

+ 2 - 0
modules/tm/tm_load.h

@@ -122,6 +122,8 @@ struct tm_binds {
 	prepare_to_cancel_f prepare_to_cancel;
 	tm_get_stats_f get_stats;
 	tm_get_table_f get_table;
+	dlg_add_extra_f dlg_add_extra;
+	tuaccancel_f    t_cancel_uac;
 #ifdef WITH_TM_CTX
 	tm_ctx_get_f tm_ctx_get;
 #else