Skip to content

[BUG] b2b_entities:_b2b_send_reply: Tm transaction not saved! #3752

@BTa7BxrHYn

Description

@BTa7BxrHYn

OpenSIPS version you are running

version: opensips 3.4.14 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: c0f532b
main.c compiled on with gcc 10

Describe the bug

A simple scenario for b2b_entities
For an incoming invite, I run ua_session_server_init($avp(b2b_key), "arhb");
After that, I need to send a 180 to the caller, then a 503 to simulate an error.

route{
            if (is_method("INVITE") && !has_totag() ) {
                 ua_session_server_init($avp(b2b_key), "arhb");
                 exit;
            }
}



event_route[E_UA_SESSION] {
     xlog("L_INFO", "E_UA_SESSION [$param(key)] $param(entity_type) key=$param(event_type)\n");

     if ($param(event_type) && $param(event_type) == "NEW"){
         if (!cache_fetch("redis:group1",$param(key), $avp(sess))) {
            ua_session_reply($param(key), "INVITE", 180, "Ringing");
            ua_session_reply($param(key), "INVITE", 503, "Service Unavailable");
         }
     }

}

I get an error

ERROR:b2b_entities:_b2b_send_reply: Tm transaction not saved!
ERROR:b2b_entities:b2b_prescript_f: Failed to send 200 OK reply

opensips.log

opensips-cli -x mi ua_session_list
shows the presence of a session

To Reproduce

Expected behavior

Relevant System Logs

OS/environment information

  • Operating System:
  • OpenSIPS installation:
  • other relevant information:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions