Browse code

tm: added icode to uac_client structure

- store internal processing code, to give hints of what happened
- could be used to map sip warning codes
http://www.iana.org/assignments/sip-parameters/sip-parameters.xml#sip-parameters-5
- delivery failure on case of no connection mapped temporarly to 908

Daniel-Constantin Mierla authored on 19/05/2013 08:22:10
Showing 2 changed files
... ...
@@ -241,6 +241,9 @@ typedef struct ua_client
241 241
 #endif
242 242
 	/* per branch flags */
243 243
 	flag_t branch_flags;
244
+	/* internal processing code - (mapping over sip warning codes)
245
+	 * - storing the code giving a clue of what happened internally */
246
+	int icode;
244 247
 #ifdef WITH_AS_SUPPORT
245 248
 	/**
246 249
 	 * Resent for every rcvd 2xx reply.
... ...
@@ -1585,6 +1585,7 @@ int t_send_branch( struct cell *t, int branch, struct sip_msg* p_msg ,
1585 1585
 			}
1586 1586
 		}
1587 1587
 #endif
1588
+		uac->icode = 908; /* internal code set to delivery failure */
1588 1589
 		LOG(L_ERR, "ERROR: t_send_branch: sending request on branch %d "
1589 1590
 				"failed\n", branch);
1590 1591
 		if (proxy) { proxy->errors++; proxy->ok=0; }