avp_subst("$avp(s:divhdr)", "/.*sip:\+45(.*)(@.*)/\1/"); # Extract number between +45 and @Hi,I have not tested this, but try:
$avp(s:divhdr) = $(hdr(Diversion)[$var(i)]);
if (is_user_in("$avp(s:divhdr)", "1") { ... }
Please note that there can be more than one Diverseion header. In that case you can use:
$var(i)=0;
while($(hdr(Diversion)[$var(i)]) != $null ) {
$avp(s:divhdr) = $(hdr(Diversion)[$var(i)]);
xlog("L_WARN", "$avp(s:divhdr)");
$var(i) = $var(i) +1;
}
/Morten
On Tue, Apr 9, 2013 at 11:12 AM, phillman25 <phillman25@gmail.com> wrote:
Dear List
I am currently using the group module to authenticate inbound calls using the From header using the below code:
if (!is_user_in("From", "1")) {sl_send_reply("403", "NOT ALLOWED");exit;};};
I want to now authenticate the Diversion header, when the call is diverted, the same way as above using the group module how could i proceed with this?
thanking you in advancePhillip
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Morten Isaksen
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, April 16-17, 2013, Berlin - http://conference.kamailio.com -