You won't see proper $mb after rtpengine changes in that way. $mb will be rewritten on the latest stage of packet processing. See sngrep or wireshark or either use read_sdp_pv / write_sdp_pv

Also our can use apply_message_changes before log, but I would not recommend to do so if this is a production under load.

On Fri, 2 Jul 2021, 10:28 Paul Smith, <paul.smith@claritytele.com> wrote:

Hi,

[Note I posted this yesterday from the wrong email address.]


I am struggling to see why my SDP is not being set correctly on the INVITE to my supplier with Proxy-Authentication when I use uac_auth().

The initial INVITE to my supplier has correct SDP set by rtpengine_manage. Then supplier replies with a 407.  My failure route correctly handles the Auth, and also calls NATMANAGE again... but this time the SDP is unchanged and the private IP and original media information from the original device is relayed to my supplier.

kamailio.cfg isbased on the default config.  Running kamailio 5.4.6 and using example from uac module for uac_auth.

My failure route calls NATMANAGE.  Is there anything special about uac_auth?  Do I need some extra magic to apply the message body changes after I have run rtpengine_manage().


I can see that the NATMANAGEr test for nat_uac_test("8") is true, and rtpengine_manage() s being called.  But the outgoing SDP is not changed.


Thanks for any hints!

Paul


====================

Extract of kamailio.cfg


failure_route[TRUNKAUTH] {
    if (t_is_canceled()) {
        exit;
    }
    route(NATMANAGE);
    xlog("L_INFO","In failure route, just finshed NATMANAGE and now body is $mb");
    if(t_check_status("401|407")) {
        # $avp(auser) = "test";
        # $avp(apass) = "test";
        # $avp(apass) = "36d0a02793542b4961e8348347236dbf";
        if (uac_auth()) {
                t_relay();
        }
        exit;
    }
}






__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users