<div>Andrew,</div><div> </div><div><div>Congratulations on your new position as a Kamailio developer!  When I saw your module (SCA) I began testing immediately since it may be a stepping stone to help me get the Polycom barge-in feature working with Kamailio.  However, I ran into a few difficulties.  Can you assist me?</div>

</div><div> </div><div><div>To make your existing code work as a K module I had to change a few lines of code and recompile under modules_k.  Specifically, since the K definition of the ucontact structure defines ucontact-&gt;aor as str* and the S definition as str**, I changed “<font face="courier new,monospace">&amp;c-&gt;aor</font>” to “<font face="courier new,monospace">c-&gt;aor</font>” in the following lines of <font face="courier new,monospace">sca_usrloc_cb.c</font>:</div>

</div><blockquote style="margin-right:0px" dir="ltr"><div>73: <font face="courier new,monospace">if ( !sca_uri_is_shared_appearance( sca, c-&gt;aor )) {</font></div><div>74: <font face="courier new,monospace">LM_DBG( &quot;%.*s is not a shared appearance line&quot;, STR_FMT( c-&gt;aor ));</font></div>

<div>79: <font face="courier new,monospace">&amp;SCA_EVENT_NAME_CALL_INFO, c-&gt;aor ) &lt; 0 ) {</font></div></blockquote><div>Since I use PostgreSQL as my SQL engine I created the SCA entries using this code:</div><blockquote style="margin-right:0px" dir="ltr">

<font face="courier new,monospace"><div>INSERT INTO version (table_name, table_version) values (&#39;sca_subscriptions&#39;, &#39;0&#39;);<div>CREATE TABLE sca_subscriptions (</div><div>    id SERIAL PRIMARY KEY NOT NULL,</div>

<div>    subscriber VARCHAR(255) NOT NULL,</div><div>    aor VARCHAR(255) NOT NULL,</div><div>    event INTEGER NOT NULL,</div><div>    expires INTEGER NOT NULL,</div><div>    state INTEGER NOT NULL,</div><div>    app_idx INTEGER NOT NULL,</div>

<div>    call_id VARCHAR(255) NOT NULL,</div><div>    from_tag VARCHAR(128) NOT NULL,</div><div>    to_tag VARCHAR(128) NOT NULL,</div><div>    notify_cseq INTEGER NOT NULL,</div><div>    subscribe_cseq INTEGER NOT NULL,</div>

</div><div>    CONSTRAINT sca_subscriptions_idx UNIQUE (subscriber, call_id, from_tag, to_tag));</div></font><div></div></blockquote><p dir="ltr">I applied the recommendations from your documentation on configuring Kamailio (3.3.1) and inserted the call to “<font face="courier new,monospace">sca_handle_subscribe ()</font>” in <font face="courier new,monospace">kamailio.cfg</font>.</p>

<div>Next, I connected two Polycom phones (SP335 and SP650) to my network and configured them to enable presence and use a shared line.  Four lines were configured on the phones as shown below:</div><blockquote style="margin-right:0px" dir="ltr">

<div><div>SP335 Line 1 (p11) = private line 6013</div><div>SP335 Line 1 (p12) = shared line 1519</div>SP650 Line 1 (p21) = private line 6014</div><div>SP650 Line 2 (p22) = shared line 1519</div></blockquote><div>My tests get inconsistent results on the line LEDs and it seems that they do not work as a shared line. When I ran a tcpdump of the SIP communication (see attached pcap files) I found several anomalies:</div>

<ul><li>Some packets (<font face="courier new,monospace">sca-reboot1</font> #22, 44, 113, 120 and <font face="courier new,monospace">sca-reboot2</font> #17, 38) contain spurious NUL characters in the tags section.  In all tests it seems to occur in the Expire tag when Kamailio accepts the subscription.</li>

<li>When Kamailio sends call-info NOTIFY the Content-Length tag is missing.</li><li>Sometimes the phone does not respond to a call-info NOTIFY event (<font face="courier new,monospace">sca-reboot1</font> #23, 45 and <font face="courier new,monospace">sca-reboot2</font> #18, 39).</li>

<li>I don&#39;t have an example here but sometimes the phones respond to the call-info NOTIFY with &quot;481 Call Leg/Transaction Does Not Exist&quot;.</li></ul><div>I think some of my problems are related to these anomalies.  Could you help me to determine if this is a problem with the code itself, my failure to properly port it to the K module, or some other issue?</div>

<div> </div><div>Once again, thank you for making this very useful module for Kamailio and for the documentation to make it work.  I hope that resolving my problems may help the code to become a part of Kamailio.</div><div>

 </div><div>Sincerely yours,</div><div>Bob Boisvert</div>