[SR-Users] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk

Marko Tirs marko.tirs at yahoo.com
Sun Apr 16 22:29:31 CEST 2017


Hi Georg,
I believe my issue relates to this function:
# Forward REGISTER to Asterisk
route[REGFWD] {
    if(!is_method("REGISTER"))
    {
        return;
    }
    $var(rip) = $sel(cfg_get.asterisk.bindip);
    $uac_req(method)="REGISTER";
    $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport);
    $uac_req(furi)="sip:" + $au + "@" + $var(rip);
    $uac_req(turi)="sip:" + $au + "@" + $var(rip);
    $uac_req(hdrs)="Contact: <sip:" + $au + "@"
                + $sel(cfg_get.kamailio.bindip)
                + ":" + $sel(cfg_get.kamailio.bindport) + ">\r\n";
    if($sel(contact.expires) != $null)
        $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n";
    else
        $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n";
    uac_req_send();
}
#!endif

Where should I put your code to test it?
RegardsMarko



     
----- Forwarded Message -----
 From: gh <gh at heissa.de>
 To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org> 
 Sent: Sunday, April 16, 2017 6:47 PM
 Subject: [SR-Users] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk
   
Hi Marko,

i work on the same scenario. It should work with:

if(uac_reg_request_to("$fU", 0))
    {
        xlog("L_NOTICE", "Found remote user [$rU] on [$rd] via [$du]");
        t_on_failure("REMOTE_AUTH");

        t_relay();
    }


But in my case xlog() currently does not print out the variables, so i 
am not able to debug:-(

Can you try this code and tell me if xlog() works for you?

Best regards

Georg



MY ISSUE:----------------------
Hi Daniel,
yes I want to register my SIP clients twice to have full media path through Asterisk.

Now I register eg. clients 31 & 32 on Kamailio and when I try to call 31->32 then my call reaches Asterisk but it doesn't find the callee because it isn't registered in Asterisk.

Am I right that Kamailio cuts a part of register message header (Authorisation - Digest name) which it receives from SIP-client and forward just such shortened message to Asterisk or there is an other problem?

Is there any better approach for above requirement (full media path through Asterisk for all calls and for all users registered by Kamailio)?

Thank you
Regards
Marko

   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170416/67898abc/attachment.html>


More information about the sr-users mailing list