|
@@ -41,6 +41,7 @@ int pv_get_branchx(struct sip_msg *msg, pv_param_t *param,
|
|
unsigned int fl = 0;
|
|
unsigned int fl = 0;
|
|
struct socket_info* fsocket = NULL;
|
|
struct socket_info* fsocket = NULL;
|
|
str ruid;
|
|
str ruid;
|
|
|
|
+ str location_ua;
|
|
|
|
|
|
/* get the index */
|
|
/* get the index */
|
|
if(pv_get_spec_index(msg, param, &idx, &idxf)!=0)
|
|
if(pv_get_spec_index(msg, param, &idx, &idxf)!=0)
|
|
@@ -49,7 +50,7 @@ int pv_get_branchx(struct sip_msg *msg, pv_param_t *param,
|
|
return pv_get_null(msg, param, res);
|
|
return pv_get_null(msg, param, res);
|
|
}
|
|
}
|
|
|
|
|
|
- uri.s = get_branch(idx, &uri.len, &lq, &duri, &path, &fl, &fsocket, &ruid, 0);
|
|
|
|
|
|
+ uri.s = get_branch(idx, &uri.len, &lq, &duri, &path, &fl, &fsocket, &ruid, 0, &location_ua);
|
|
|
|
|
|
/* branch(count) doesn't need a valid branch, everything else does */
|
|
/* branch(count) doesn't need a valid branch, everything else does */
|
|
if(uri.s == 0 && ( param->pvn.u.isname.name.n != 5/* count*/ ))
|
|
if(uri.s == 0 && ( param->pvn.u.isname.name.n != 5/* count*/ ))
|
|
@@ -84,6 +85,10 @@ int pv_get_branchx(struct sip_msg *msg, pv_param_t *param,
|
|
if(ruid.len==0)
|
|
if(ruid.len==0)
|
|
return pv_get_null(msg, param, res);
|
|
return pv_get_null(msg, param, res);
|
|
return pv_get_strval(msg, param, res, &ruid);
|
|
return pv_get_strval(msg, param, res, &ruid);
|
|
|
|
+ case 8: /* location_ua */
|
|
|
|
+ if(location_ua.len==0)
|
|
|
|
+ return pv_get_null(msg, param, res);
|
|
|
|
+ return pv_get_strval(msg, param, res, &location_ua);
|
|
default:
|
|
default:
|
|
/* 0 - uri */
|
|
/* 0 - uri */
|
|
return pv_get_strval(msg, param, res, &uri);
|
|
return pv_get_strval(msg, param, res, &uri);
|
|
@@ -253,6 +258,9 @@ int pv_set_branchx(struct sip_msg* msg, pv_param_t *param,
|
|
case 7: /* ruid */
|
|
case 7: /* ruid */
|
|
/* do nothing - cannot set the ruid */
|
|
/* do nothing - cannot set the ruid */
|
|
break;
|
|
break;
|
|
|
|
+ case 8: /* location_ua */
|
|
|
|
+ /* do nothing - cannot set the location_ua */
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
/* 0 - uri */
|
|
/* 0 - uri */
|
|
if(val==NULL || (val->flags&PV_VAL_NULL))
|
|
if(val==NULL || (val->flags&PV_VAL_NULL))
|
|
@@ -316,6 +324,8 @@ int pv_parse_branchx_name(pv_spec_p sp, str *in)
|
|
case 11:
|
|
case 11:
|
|
if(strncmp(in->s, "send_socket", 11)==0)
|
|
if(strncmp(in->s, "send_socket", 11)==0)
|
|
sp->pvp.pvn.u.isname.name.n = 4;
|
|
sp->pvp.pvn.u.isname.name.n = 4;
|
|
|
|
+ else if(strncmp(in->s, "location_ua", 11)==0)
|
|
|
|
+ sp->pvp.pvn.u.isname.name.n = 8;
|
|
else goto error;
|
|
else goto error;
|
|
break;
|
|
break;
|
|
case 5:
|
|
case 5:
|