<p>Did a small check and the CSeq is incremented, the config snippet:</p>
<pre><code>request_route {

        if(is_method("OPTIONS")) {
                sl_send_reply("200", "ok");
                $uac_req(method)="INFO";
                $uac_req(ruri)="sip:test@" + $Ri;
                $uac_req(furi)="sip:test@" + $Ri;
                $uac_req(turi)="sip:test@" + $Ri;
                $uac_req(auser)="test";
                $uac_req(apasswd)="test123";
                uac_req_send();
                exit;
        }
        if(is_method("INFO")) {
                if (!pv_auth_check("$fd", "test123", "0", "1")) {
                        auth_challenge("$fd", "0");
                        exit;
                }
        }
        sl_send_reply("200", "ok");
}
</code></pre>
<p>And the sip trace for info request:</p>
<pre><code>#
U 127.0.0.1:5060 -> 127.0.0.1:5060
INFO sip:test@127.0.0.1 SIP/2.0.
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKb10b.9e1030f5000000000000000000000000.0.
To: <sip:test@127.0.0.1>.
From: <sip:test@127.0.0.1>;tag=3393f0703fb0ccaca74109ff37de39f5-adaa.
CSeq: 10 INFO.
Call-ID: 6ab3848a2fc2b6c2-29989@127.0.0.1.
Max-Forwards: 70.
Content-Length: 0.
User-Agent: kamailio (5.3.0-dev1 (x86_64/darwin)).
.

#
U 127.0.0.1:5060 -> 127.0.0.1:5060
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKb10b.9e1030f5000000000000000000000000.0.
To: <sip:test@127.0.0.1>;tag=9dd61ff61e802d8e2bef5f14621ef3c2.7855.
From: <sip:test@127.0.0.1>;tag=3393f0703fb0ccaca74109ff37de39f5-adaa.
CSeq: 10 INFO.
Call-ID: 6ab3848a2fc2b6c2-29989@127.0.0.1.
Proxy-Authenticate: Digest realm="127.0.0.1", nonce="XByfSlwcnh4wAtPk/1CPl5TfZtjZdKHe".
Server: kamailio (5.3.0-dev1 (x86_64/darwin)).
Content-Length: 0.
.

#
U 127.0.0.1:5060 -> 127.0.0.1:5060
INFO sip:test@127.0.0.1 SIP/2.0.
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKc10b.ab8927e3000000000000000000000000.0.
To: <sip:test@127.0.0.1>.
From: <sip:test@127.0.0.1>;tag=3393f0703fb0ccaca74109ff37de39f5-adaa.
CSeq: 11 INFO.
Call-ID: 6ab3848a2fc2b6c2-29989@127.0.0.1.
Max-Forwards: 70.
Content-Length: 0.
User-Agent: kamailio (5.3.0-dev1 (x86_64/darwin)).
Proxy-Authorization: Digest username="test", realm="127.0.0.1", nonce="XByfSlwcnh4wAtPk/1CPl5TfZtjZdKHe", uri="sip:test@127.0.0.1", response="8363f2ebe2e13d9ae03eb48c923f3580", algorithm=MD5.
.

#
U 127.0.0.1:5060 -> 127.0.0.1:5060
SIP/2.0 200 ok.
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKc10b.ab8927e3000000000000000000000000.0.
To: <sip:test@127.0.0.1>;tag=9dd61ff61e802d8e2bef5f14621ef3c2.7855.
From: <sip:test@127.0.0.1>;tag=3393f0703fb0ccaca74109ff37de39f5-adaa.
CSeq: 11 INFO.
Call-ID: 6ab3848a2fc2b6c2-29989@127.0.0.1.
Server: kamailio (5.3.0-dev1 (x86_64/darwin)).
Content-Length: 0.
.
</code></pre>
<p>If you want to do something else, then likely you want a new feature. Closing this one.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1768#issuecomment-449301799">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36Zbq6EWfJJAgFUkf5DrxvyqdkJX87ks5u7JcEgaJpZM4ZUmBV">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZRglPsbjltaTmDNs5WCYw8K-ceS3ks5u7JcEgaJpZM4ZUmBV.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@miconda in #1768: Did a small check and the CSeq is incremented, the config snippet:\r\n\r\n```\r\nrequest_route {\r\n\r\n\tif(is_method(\"OPTIONS\")) {\r\n\t\tsl_send_reply(\"200\", \"ok\");\r\n\t\t$uac_req(method)=\"INFO\";\r\n\t\t$uac_req(ruri)=\"sip:test@\" + $Ri;\r\n\t\t$uac_req(furi)=\"sip:test@\" + $Ri;\r\n\t\t$uac_req(turi)=\"sip:test@\" + $Ri;\r\n\t\t$uac_req(auser)=\"test\";\r\n\t\t$uac_req(apasswd)=\"test123\";\r\n\t\tuac_req_send();\r\n\t\texit;\r\n\t}\r\n\tif(is_method(\"INFO\")) {\r\n\t\tif (!pv_auth_check(\"$fd\", \"test123\", \"0\", \"1\")) {\r\n\t\t\tauth_challenge(\"$fd\", \"0\");\r\n\t\t\texit;\r\n\t\t}\r\n\t}\r\n\tsl_send_reply(\"200\", \"ok\");\r\n}\r\n```\r\n\r\nAnd the sip trace for info request:\r\n\r\n```\r\n#\r\nU 127.0.0.1:5060 -\u003e 127.0.0.1:5060\r\nINFO sip:test@127.0.0.1 SIP/2.0.\r\nVia: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKb10b.9e1030f5000000000000000000000000.0.\r\nTo: \u003csip:test@127.0.0.1\u003e.\r\nFrom: \u003csip:test@127.0.0.1\u003e;tag=3393f0703fb0ccaca74109ff37de39f5-adaa.\r\nCSeq: 10 INFO.\r\nCall-ID: 6ab3848a2fc2b6c2-29989@127.0.0.1.\r\nMax-Forwards: 70.\r\nContent-Length: 0.\r\nUser-Agent: kamailio (5.3.0-dev1 (x86_64/darwin)).\r\n.\r\n\r\n#\r\nU 127.0.0.1:5060 -\u003e 127.0.0.1:5060\r\nSIP/2.0 407 Proxy Authentication Required.\r\nVia: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKb10b.9e1030f5000000000000000000000000.0.\r\nTo: \u003csip:test@127.0.0.1\u003e;tag=9dd61ff61e802d8e2bef5f14621ef3c2.7855.\r\nFrom: \u003csip:test@127.0.0.1\u003e;tag=3393f0703fb0ccaca74109ff37de39f5-adaa.\r\nCSeq: 10 INFO.\r\nCall-ID: 6ab3848a2fc2b6c2-29989@127.0.0.1.\r\nProxy-Authenticate: Digest realm=\"127.0.0.1\", nonce=\"XByfSlwcnh4wAtPk/1CPl5TfZtjZdKHe\".\r\nServer: kamailio (5.3.0-dev1 (x86_64/darwin)).\r\nContent-Length: 0.\r\n.\r\n\r\n#\r\nU 127.0.0.1:5060 -\u003e 127.0.0.1:5060\r\nINFO sip:test@127.0.0.1 SIP/2.0.\r\nVia: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKc10b.ab8927e3000000000000000000000000.0.\r\nTo: \u003csip:test@127.0.0.1\u003e.\r\nFrom: \u003csip:test@127.0.0.1\u003e;tag=3393f0703fb0ccaca74109ff37de39f5-adaa.\r\nCSeq: 11 INFO.\r\nCall-ID: 6ab3848a2fc2b6c2-29989@127.0.0.1.\r\nMax-Forwards: 70.\r\nContent-Length: 0.\r\nUser-Agent: kamailio (5.3.0-dev1 (x86_64/darwin)).\r\nProxy-Authorization: Digest username=\"test\", realm=\"127.0.0.1\", nonce=\"XByfSlwcnh4wAtPk/1CPl5TfZtjZdKHe\", uri=\"sip:test@127.0.0.1\", response=\"8363f2ebe2e13d9ae03eb48c923f3580\", algorithm=MD5.\r\n.\r\n\r\n#\r\nU 127.0.0.1:5060 -\u003e 127.0.0.1:5060\r\nSIP/2.0 200 ok.\r\nVia: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bKc10b.ab8927e3000000000000000000000000.0.\r\nTo: \u003csip:test@127.0.0.1\u003e;tag=9dd61ff61e802d8e2bef5f14621ef3c2.7855.\r\nFrom: \u003csip:test@127.0.0.1\u003e;tag=3393f0703fb0ccaca74109ff37de39f5-adaa.\r\nCSeq: 11 INFO.\r\nCall-ID: 6ab3848a2fc2b6c2-29989@127.0.0.1.\r\nServer: kamailio (5.3.0-dev1 (x86_64/darwin)).\r\nContent-Length: 0.\r\n.\r\n```\r\n\r\nIf you want to do something else, then likely you want a new feature. Closing this one."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1768#issuecomment-449301799"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1768#issuecomment-449301799",
"url": "https://github.com/kamailio/kamailio/issues/1768#issuecomment-449301799",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>