<p></p>
<p>Hello<br>
I configure my kamailio.cfg to handle SLA using (SCA module) and shared presence is working but still facing some issue in case of hold invite and BYE and the reason behind of that issue is following error</p>
<p>Nov 26 07:38:40 SBC-4-1 /usr/local/sbin/kamailio[104107]: ERROR: sca [sca_call_info.c:1008]: sca_call_info_invite_request_handler(): Failed to update sip:<a href="mailto:4569@test.sip.abcd.com">4569@test.sip.abcd.com</a> appearance-index 0 to active</p>
<p>actually, in Kamailio appearances, I can see the entry for this call but the index is 1 instead of 0, and Kamailio going to update with a 0 index</p>
<p>[root@SBC-4-1 ntcarfte-kamailio]# kamcmd sca.all_appearances<br>
sip:<a href="mailto:4569@test.sip.abcd.com">4569@test.sip.abcd.com</a> 1 active 1606376289 sip:<a href="mailto:4569@10.xx.xx.xx">4569@10.xx.xx.xx</a>:5070;transport=udp sip:<a href="mailto:2003@test.sip.abcd.com">2003@test.sip.abcd.com</a> 186161_mobile-rel120MTQ5OTcyZjFhMjMyNmI1ZGE1MWY4ODc2M2RkN2VmZmQ 45dc18d8 H6cS9vecZ248B</p>
<p>if I manually update appearances using RPC command with index 1 then the phone started blinking as I change state to held</p>
<h1>kamcmd sca.update_appearance sip:<a href="mailto:4569@sc4test.sip.teledge.com">4569@sc4test.sip.teledge.com</a> 1 held</h1>
<h1>kamcmd sca.all_appearances</h1>
<p>sip:<a href="mailto:4569@test.sip.abcd.com">4569@test.sip.abcd.com</a> 1 held 1606376516 sip:<a href="mailto:4569@10.xx.xx.xx">4569@10.xx.xx.xx</a>:5070;transport=udp sip:<a href="mailto:2003@test.sip.abcd.com">2003@test.sip.abcd.com</a> 186161_mobile-rel120NzE5MDgyZDc1NjJiYjcwMWFlYmI3NzM3NjE2OTRhZjU 08f005cb eK9ratm83g92e</p>
<p>kamailio.cfg</p>
<p>route[SCA] {<br>
if(is_method("SUBSCRIBE")) {</p>
<pre><code>            if ($hdr(Event) == "call-info" || $hdr(Event) == "line-seize") {
            xlog("L_INFO","(MAIN) :HELLO ($avp(uuid)) : $avp(rsi)  $sp $hdr(Event)");          
                    xdbg("SCA: $hdr(Event) SUBSCRIBE $ru from $si:$sp");
                    sca_handle_subscribe();
                    exit;
            }
            return;
    }

    if (!is_method("BYE|CANCEL|INVITE|PRACK|REFER")) {
            return;
    }  
                    sca_call_info_update();    
</code></pre>
<p>}</p>
<p>route[RELAY_OUTBOUND_FS] {<br>
xlog("L_INFO","(RELAY_OUTBOUND_FS) : ($avp(uuid)) : INSIDE ROUTE ");</p>
<pre><code>    if (!has_totag()){
            $avp(set_h) = 1;
    }

    t_on_reply("REPLY_OUTBOUND_FS");
    route(SCA);
    if (!t_relay()) {
            sl_reply_error();
    }
    exit;
</code></pre>
<p>}</p>
<p>route[RELAY_INBOUND_FS] {</p>
<pre><code>    if(is_method("INVITE|BYE|UPDATE|CANCEL|ACK")) {
            $avp(s:puburis_caller) = $fu;
            setflag(8);
            dlg_manage();
    }

    if(is_method("REGISTER")) {
        t_on_reply("REPLY_REGISTER");
    } else {
        t_on_reply("REPLY_INBOUND_FS");
    }
    route(SCA);
    if (!t_relay()) {
            sl_reply_error();
    }
    exit;
</code></pre>
<p>}</p>
<p>onreply_route[REPLY_INBOUND_FS] {<br>
xdbg("incoming reply\n");</p>
<p>if (status =~ "[456][0-9][0-9]") {</p>
<h1>don't update SCA state here, since there may be</h1>
<h1>failure route processing (e.g., call forwarding).</h1>
<h1>update state in failure route instead.</h1>
<p>return;<br>
}</p>
<p>route(SCA);<br>
}</p>
<p>onreply_route[REPLY_OUTBOUND_FS] {<br>
xdbg("incoming reply\n");</p>
<p>if (status =~ "[456][0-9][0-9]") {</p>
<h1>don't update SCA state here, since there may be</h1>
<h1>failure route processing (e.g., call forwarding).</h1>
<h1>update state in failure route instead.</h1>
<p>return;<br>
}</p>
<p>route(SCA);<br>
}</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2583">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIEMNK5QDY2L75N7FTSULYBLANCNFSM4UXV54HQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZJAMOBODPDMNDMEUFDSULYBLA5CNFSM4UXV54H2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LL6376A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2583",
"url": "https://github.com/kamailio/kamailio/issues/2583",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>