You can send a 181 but no put a to-tag in it with jsonrpc fonction like this.

 if (is_method("INVITE") && !has_totag() && t_newtran()){
  # transaction must have been created
  $var(jsRPCCode) = 181;
  $var(jsRPCText) = "Call is being forwarded";
  $var(jsRPCTotag) = ""; # don't put to-tag in 181
  $var(jsRPCHeaders) = "";
  $var(jsRPCBody) = "";
         if ( !jsonrpc_exec('{"jsonrpc": "2.0",
                                      "method": "tm.reply_callid",
                                       "params": [$var(jsRPCCode),
                                          "$var(jsRPCText)",
                                          "$ci", "$cs", "$var(jsRPCTotag)", "$var(jsRPCHeaders)", "$var(jsRPCBody)"]}') || $jsonrpl(code) != 200 )
                    xlog("JSONRPC[ERROR][tm.reply_callid] : $jsonrpl(body)\n");
 }

Le 1 déc. 2025 20:00, Patrick Karton <[email protected]> a écrit :
Loose_route() does not check transaction but route headers if any.


You are trying to do b2bua operations with kamailio by sending 181 through it (hence it will create a to-tag that does not belong to no one and will never be used after).

It's typically a kind of action you can't/shouldn't/must not do in kamailio.


Le 1 déc. 2025 15:14, Benoit Panizzon via sr-users <[email protected]> a écrit :

Hi again

> I don't seem to get it working as expected - still trying to figure out
> what and where the call fails.

I think I have found what goes wrong.

A => B => CFW => C

C has MIN-SE: 900
A is initially sending Sestion-Timer: 600

Without 181 reply:

C replies with 422 Timer too Small Min-SE: 900
This 422 Reply has a ToTag.

A re-initiates the call with a larger session timer, that INVITE has NO
ToTag - new transaction. The Calls succeeds.

Now I repeat the same, but I send a 181 message back to A BEFORE A
receives the 422 from C. That 181 has a ToTag.

Now when A re-initiates the INVITE, it includes the ToTag received in
the 181 and loose_route fails as there is no such transaction.

Is A misbehaving by including a ToTag when it should not? Should the 181
reply not contain a ToTag?

I again tried all variants

* sl_send_reply() generates ToTag
* send_reply() generates ToTag
* t_reply() does not send the reply.

Mit freundlichen Grüssen

-Benoît Panizzon-
--
I m p r o W a r e   A G    -    Leiter Commerce Kunden
______________________________________________________

Zurlindenstrasse 29             Tel  +41 61 826 93 00
CH-4133 Pratteln                Fax  +41 61 826 93 01
Schweiz                         Web  http://www.imp.ch
______________________________________________________
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!



__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- 
[email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to