[SR-Users] Kamailio SCA Module

Robert Boisvert rdboisvert at gmail.com
Fri Nov 30 23:23:59 CET 2012


Andrew,
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?
 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->aor as str* and the S
definition as str**, I changed “&c->aor” to “c->aor” in the following lines
of sca_usrloc_cb.c:

73: if ( !sca_uri_is_shared_appearance( sca, c->aor )) {
74: LM_DBG( "%.*s is not a shared appearance line", STR_FMT( c->aor ));
79: &SCA_EVENT_NAME_CALL_INFO, c->aor ) < 0 ) {

Since I use PostgreSQL as my SQL engine I created the SCA entries using
this code:

INSERT INTO version (table_name, table_version) values
('sca_subscriptions', '0');
CREATE TABLE sca_subscriptions (
id SERIAL PRIMARY KEY NOT NULL,
 subscriber VARCHAR(255) NOT NULL,
aor VARCHAR(255) NOT NULL,
event INTEGER NOT NULL,
expires INTEGER NOT NULL,
state INTEGER NOT NULL,
app_idx INTEGER NOT NULL,
 call_id VARCHAR(255) NOT NULL,
from_tag VARCHAR(128) NOT NULL,
to_tag VARCHAR(128) NOT NULL,
notify_cseq INTEGER NOT NULL,
subscribe_cseq INTEGER NOT NULL,
 CONSTRAINT sca_subscriptions_idx UNIQUE (subscriber, call_id, from_tag,
to_tag));

I applied the recommendations from your documentation on configuring
Kamailio (3.3.1) and inserted the call to “sca_handle_subscribe ()” in
kamailio.cfg.
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:

SP335 Line 1 (p11) = private line 6013
SP335 Line 1 (p12) = shared line 1519
SP650 Line 1 (p21) = private line 6014
SP650 Line 2 (p22) = shared line 1519

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:

   - Some packets (sca-reboot1 #22, 44, 113, 120 and sca-reboot2 #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.
   - When Kamailio sends call-info NOTIFY the Content-Length tag is missing.
   - Sometimes the phone does not respond to a call-info NOTIFY event (
   sca-reboot1 #23, 45 and sca-reboot2 #18, 39).
   - I don't have an example here but sometimes the phones respond to the
   call-info NOTIFY with "481 Call Leg/Transaction Does Not Exist".

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?
 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.

Sincerely yours,
Bob Boisvert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121130/7739b3f6/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sca-2012-11-30.zip
Type: application/zip
Size: 21021 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121130/7739b3f6/attachment-0001.zip>


More information about the sr-users mailing list