Jan Janak 20 роки тому
батько
коміт
46b2c44a42
2 змінених файлів з 11 додано та 0 видалено
  1. 9 0
      parser/parse_param.c
  2. 2 0
      parser/parse_param.h

+ 9 - 0
parser/parse_param.c

@@ -164,6 +164,14 @@ static inline void parse_uri_class(param_hooks_t* _h, param_t* _p)
 			_h->uri.dstport = _p;
 		}
 		break;
+	case 'f':
+	case 'F':
+		if ((_p->name.len == 4) &&
+		    (!strncasecmp(_p->name.s + 1, "tag", 3))) {
+			_p->type = P_FTAG;
+			_h->uri.ftag = _p;
+		}
+		break;
 	}
 
 }
@@ -499,6 +507,7 @@ static inline void print_param(FILE* _o, param_t* _p)
 	case P_DSTIP:     type = "P_DSTIP";     break;
 	case P_DSTPORT:   type = "P_DSTPORT";   break;
 	case P_INSTANCE:  type = "P_INSTANCE";  break;
+	case P_FTAG:      type = "P_FTAG";      break;
 	default:          type = "UNKNOWN";     break;
 	}
 	

+ 2 - 0
parser/parse_param.h

@@ -56,6 +56,7 @@ typedef enum ptype {
 	P_DSTIP,     /* URI: dstip parameter */
 	P_DSTPORT,   /* URi: dstport parameter */
 	P_INSTANCE,  /* Contact: sip.instance parameter */
+	P_FTAG       /* URI: ftag parameter */
 } ptype_t;
 
 
@@ -104,6 +105,7 @@ struct uri_hooks {
 	struct param* ttl;       /* ttl parameter */
 	struct param* dstip;     /* Destination IP */
 	struct param* dstport;   /* Destination port */
+	struct param* ftag;      /* From tag in the original request */
 };