[OpenSIPS-Users] STOP waiting for new branches and close transaction by t_wait_no_more_branches()
napadailo at kolesa.kz
Fri Aug 12 12:12:35 UTC 2022
I'm writing script with Push Notification mechanism using TM module and
t_wait_for_new_branches() function and EBR.
Here example in docs
notify_on_event("E_UL_CONTACT_INSERT", $avp(filter), "fork_call",
xlog("L_DBG", "received reply $rs $rr");
xlog("L_DBG", "wait no more branches DLG_DID=$DLG_did");
xlog("L_DBG", "[$ci] user $avp(aor) registered a new contact $avp(uri),
First, I create dialog. Then, call t_wait_for_new_branches() and set
Then I'm waiting for new REGISTERs. When new contacts register to usrloc,
I'm injecting received contacts as new branches to current transaction.
I do all things as described in docs.
Now I want to control negative replies from ongoing branches. By default,
OS ignores negative replies and continue waiting for new branches. For
example, I want to ignore 480, but handle 486.
I try handle 486, calling t_wait_no_more_branches().
I expect that OS will stop waiting for new branches and t_inject_branches
will not add anymore.
Also I expect that OS stop PHONY branch, which is created first when
calling t_wait_for_new_branches(), and sends final response (486 in my
case) to caller.
But in real next things happen:
1. t_wait_no_more_branches() doesn't affect adding new branches. If 1st
callee reject call, then 2nd callee register new contact,
t_inject_branches() adds new branch all the same
2. If no other branches added, caller hears ringing until FR_INV_TIMEOUT
expires. And only when FR_INV_TIMEOUT expires, OS sends final response to
How to stop transaction immeditially when at least one ongoing branch reply
486 code and to wait no more for any branches?
Thx for answers
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users