Hello Everyone,
I trying fnmatch to find which sip status is returned by B2BUA. But some reason it doesn't work.


Nov 6 17:02:15 cavprx00 kamailio: 2(3747) ERROR: *** cfgtrace:onreply_route=[MESSAGE_FORWARD] c=[/etc/kamailio/kamailio-asterisk.cfg] l=456 a=26 n=xlog
Nov 6 17:02:15 cavprx00 kamailio: 2(3747) INFO: <script>: Message 1 Accepted by B2BUA --> 202 with Accepted
Nov 6 17:02:15 cavprx00 kamailio: 2(3747) ERROR: *** cfgtrace:onreply_route=[MESSAGE_FORWARD] c=[/etc/kamailio/kamailio-asterisk.cfg] l=469 a=16 n=if
Nov 6 17:02:15 cavprx00 kamailio: 2(3747) ERROR: *** cfgtrace:onreply_route=[MESSAGE_FORWARD] c=[/etc/kamailio/kamailio-asterisk.cfg] l=457 a=26 n=fnmatch
Nov 6 17:02:15 cavprx00 kamailio: 2(3747) ERROR: *** cfgtrace:onreply_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio-asterisk.cfg] l=370 a=2 n=return


if(fnmatch("$rs", "200") && (fnmatch("$rr", "Accepted"))) {
xlog("L_INFO", "Message Accepted by B2BUA --> $rs with $rr \n");
$var(tu) = $tu;
xlog("L_INFO", "New To --> $var(tu)\n");
}

Is this fnmatch correct for this operation ?


Slava.