Hoho,
i want to implement RFC3578 (transaction oriented) in Kamailio. I see various ways of accomplishing this, but I stuck at all of my solutions. Find the algorithm I want to implement attached.
Shortly explained what RFC3578 is: In a open numbering plan you never know if the INVITE you received is already complete, or if there are more numbers coming in. One way of accomplishing this is to set up a timer. If the timer elapses you assume the number is complete. If not, you are receiving a new INVITE with one digit more. Now you have to close the old transaction with a "484 - Address Incomplete"-response and start the timer again. (Find the algorithm I want to implement attached)
Any advise appriciated!!
The following lines, I'm going to explain my thoughts. For reference I'm calling "Thread A" the first INVITE coming in and "Thread B" the second.
####################### ### using Module ASYNC * Thread A -> async_route("handle_overlap","<timer t99 value>"); * Thread B -> if new incoming transaction, ** set avp("<call-id>")= <digitlength of called number> and ** call async_route("handle_overlap","<timer t99 value>"); * in route[handle_overlap] ** if avp("call-id") greater than "<digitlength of called number>" *** cancel transaction with "484 -Address Incomplete" ** if avp("call-id") equals "<digitlength of called number>" *** handle call => the number is complete PROBLEM: The old transaction is not canceled immediately, but after t99 elapsed...
####################### ### using Module TMX using t_suspend() and t_continue(), but here i see the following problems: * Thread A calls "t_suspend()" ** How is it possible to cancel "Thread A"'s transaction from Thread B? ** If there is no Thread B, so the numbers were complete, how can I get Thread A to continue processing?? * General TMX-Question: Are there any examples available?
####################### ### using simple sleep() and shv()/avp() Sounds like dirty hacking... I'd appriciate a solution with one of aboves modules. But if there is a solution available, I'd try this.
Thx in advise Moritz