I am having trouble making all of the supposed features of Blink work with Kamailio 4.1.4.
My kamailio.cfg file is attached. Specifically, what I am having trouble is with presence
(the way Blink wants to implement it), and MSRP. Ordinary voice calls work
correctly.
With presence, I have managed to make XCAP storing and retrieval work, in the sense that a
document that is being stored with PUT can be later retrieved with GET on the same URL.
However, I cannot make Blink use this support in order to actually monitor
presence. As far as I understand, when user A subscribes to the presence state of user B,
and user B is registered, user B is supposed to receive a notification that user A
requests authorization for presence subscription. However, this is not working so
far when both A and B use Blink. From what I can see through a packet capture, neither
adding a new contact on the Blink window or having existing contacts result in any
SUBSCRIBE packets for the contact users being sent to the Kamailio instance. If the
subscription is meant to be performed some other way, I am not seeing it being done
either. Of course, this results in presence changes not being exchanged between contacts.
The only SUBSCRIBE packet I see from Blink is the one for the SIP account used for Blink.
With MSRP, I have copied the example from the msrp.so documentation, but I have replaced
the authentication shown with a static password, with an actual query using auth_db.so,
the very same query used to authenticate other SIP packets. Through the packet
capture, when user A tries starting a MSRP chat with user B, an INVITE is sent from user A
to Kamailio, which has a special check to NOT send this invite to Asterisk, but rather
route it itself, and it gets "correctly" routed to user B. Then user B
attempts to start a MSRP session with Kamailio (not user A) without authentication
credentials, Kamailio challenges user B for the credentials, and... that's it. User B
makes no attempt to repeat the MSRP session with the required credentials, and the
communication eventually times out.
The presence failure might have something to do with the following exchange I see in the
packet capture:
GET /xcap-root/pidf-manipulation/users/sip:avillacisIM@pbx.elastix.com/index HTTP/1.1
Accept-Encoding: identity
Authorization: Digest username="avillacisIM", realm="pbx.elastix.com",
nonce="U6xFz1OsRKNuU11dgljLCgGppv5lK6Eu",
uri="/xcap-root/pidf-manipulation/users/sip:avillacisIM@pbx.elastix.com/index",
response="3dfdf556c9812f4bebb8b0cc82578ef9", algorithm="MD5"
Host: pbx.elastix.com:5060
Connection: close
Accept: application/pidf+xml
User-Agent: Blink 0.8.2 (Linux)
HTTP/1.1 404 Not found
Via: SIP/2.0/TCP 192.168.3.2:55567
Server: kamailio (4.1.4 (x86_64/linux))
Content-Length: 0
That is, the Blink client tries to fetch the pidf-manipulation document, and Kamailio
answers with a 404. In other cases Blink has responded with a PUT of a minimal document at
the required URI (which gets stored to the database), but in this case
(pidf-manipulation) this is not done. I am not sure of what is supposed to happen here.
This 404 is the same regardless of whether there are other (Blink or otherwise) SIP
clients connected.
I think this has been asked before, but is there a working implementation of MSRP+presence
for Kamailio that works with Blink? Or failing that, a complete kamailio.cfg that has been
shown to work with at least one MSRP implementation?