<div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Hi, thanks for answering. Based on your answer I was able to move the call sequence to Twilio instead of handling in kamailio, now I send the INVITE from kamailio to Twilio and in Twilio make a request to my own API endpoint to create the call sequence and call logs.</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">thanks</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Filippo</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><br></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><br></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">I think what you’re asking is: if a call is answered and hung up, can Kamailio make another call to somewhere else? 

If so, the answer is no; proxies just can’t do that. Forking deals with the management early-stage requests during their pendency. Once a final dispositive reply for a request is received from the upstream UA, the transaction is finished. Kamailio cannot initiate new transactions in that sense. 

So, to roll over to another route after an answer+hangup, you’d need to implement this on the calling UA side.

Is that an accurate understanding of your question?</pre></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 19 lug 2021 alle ore 18:18 Filippo Graziola <<a href="mailto:filippo.graziola@gmail.com">filippo.graziola@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I have a question for my kamailio configuration which works like this:</div><div><br></div><div>- INVITE arrives to kamailio</div><div>- HTTP async request to API endpoint</div><div>- Resume, use of rtjson module for parallel forking and loop to kamailio itself</div><div>- One of the invite is "transformed" in serial forking with rtjson module and it is sent with a delay to TWILIO SIP Domain (landline/mobile phone numbers) </div><div><br></div><div>Twilio is giving me some troubles because it answers with a 200 OK but the call it is still in establishing/ringing on the "landline" side and as expected when reaching the timeout (no answer from phone number on TWILIO side) kamailio is receiving a BYE.</div><div><br></div><div>Now the question, how to handle next number to call through Twilio? </div><div>I was thinking of using rtjson_next_route() when handling the in-dialog BYE but as it is not a failure route so it does not work, or I'm doing it wrong.</div><div><br></div><div>Thanks in advance for any help/hint.</div><div><br></div><div>Filippo</div><div><br></div></div>
</blockquote></div>