[SR-Users] publish authentication problem

Tomas Zanet tzanet at came.com
Fri Apr 24 15:31:35 CEST 2015

Hello everyone,
I've been working on a project where I would like to implement RFC6035

Basically, after the end of the call, our SIP UAC sends a SIP PUBLISH to Kamailio where there are some useful information about media quality (packet loss, mos, etc..)
This information is stored by Kamailio with sql_query command...

To achieve this, I implemented a custom route function inside Kamailio cfg file, which handles PUBLISH request, check vq-rtcpxr body and store that information into a database.
Here is a snippet code:
# AVPF report route
route[AVPF] {
        if (has_body("application/vq-rtcpxr"))
$var(x) =  "INSERT INTO quality_reporting_raw(body) VALUES (\"" + $(rb{s.escape.common}) + "\");";
                sql_query("cb", "$(var(x))");
                ...... reply 200 ok and so on....

Everything works fine (almost fine, because the report is stored twice...) if I do the route(AVPF) before authentication, like this...

(main route):
        # handle AVPF reports

        # authentication

Instead if I swap these two functions, doing the authentication before publish processing, I have some problems about publish authentication....not for the other requests (INVITE and REGISTER)
As far as I know From, To and Request-URI must match the authentication user, in the PUBLISH REQUEST as described here

I confirm that...I'm sending the SIP PUBLISH from user 101 to user 101, which is currently registered.

My problem is that Kamailio is continuously answering with 407 to the SIP PUBLISH, even if the PUBLISH request has the right Proxy-Authorization header...
Digging into the log file, I found this :
Apr 24 14:30:58 bptrnddmzserver kamailio[30886]: DEBUG: auth_db [authorize.c:486]: auth_check(): realm [myhome2.xip.bpt.com] table [subscriber] flags [1]
Apr 24 14:30:58 bptrnddmzserver kamailio[30886]: DEBUG: auth [api.c:86]: pre_auth(): auth:pre_auth: Credentials with realm 'myhome2.xip.bpt.com' not found
Apr 24 14:30:58 bptrnddmzserver kamailio[30886]: DEBUG: auth_db [authorize.c:252]: digest_authenticate_hdr(): no credentials

Just for your better understanding I'm doing authorization with db, using subscriber table where there are all the users with 'myhome2.xip.bpt.com' domain...
In fact, all INVITEs and REGISTERs are correctly authenticated...

Would you mind address me to find out the problem? Maybe, there's something wrong in my cfg file.
Thanks in advance


Tomas Zanet
Software Design Department
tzanet at came.com


Il messaggio di posta elettronica contiene informazioni di carattere confidenziale specifiche per il destinatario. Nel caso non ne siate il destinatario, segnalatelo immediatamente al mittente ed eliminate dai vostri archivi quanto ricevuto (compresi i file allegati). L'uso, la diffusione, distribuzione o riproduzione del presente messaggio e dei suoi allegati da parte di ogni altra persona costituisce reato. Rif. Decreto legislativo 30 giugno 2003, n. 196 - Codice in materia di protezione dei dati personali.

The email message contains confidential information specific to the recipient. If you are not the recipient, write it to the sender immediately and delete from your files as received (including file attachments). Use, dissemination, distribution or reproduction of this message and its attachments by any other person is a criminal offense. References Legislative Decree 30 June 2003, n. 196 - Code for the protection of personal data.

Right to opposition:
The person concerned who receives the message has the right at any time to oppose its processing for forwarding commercial messages, advertising material or direct sales proposals, by clicking on the e-mail address below (or by traditional postal services by writing to: Came S.p.A., Via Martiri della Libert? 15, 31030 Dosson di Casier (TV) - Italy, or by sending a fax to +39 0422 4941. Furthermore the person concerned may exercise all the rights of access to the personal data as provided by art. 7, Legislative Decree no. 196/2003, including the rights to amendment, updating and deletion, by sending an e-mail to privacy at came.com<mailto:privacy at came.com>.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150424/dc65f9a1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CAME.png
Type: image/png
Size: 31854 bytes
Desc: CAME.png
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150424/dc65f9a1/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LogoExpo.png
Type: image/png
Size: 23145 bytes
Desc: LogoExpo.png
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150424/dc65f9a1/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FooterCAME.png
Type: image/png
Size: 23373 bytes
Desc: FooterCAME.png
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150424/dc65f9a1/attachment-0002.png>

More information about the sr-users mailing list