[SR-Users] Problem with resuming suspended transacation

Arik Halperin arik.halperin at s3code.com
Mon Apr 16 18:42:52 CEST 2018


I had a bug, I was resuming the wrong transaction indeed. I created a new transaction for the purpose of http async in a different route and this was causing the issue.

Actually managed to solve it after I posted this question.


> On 13 Apr 2018, at 9:55, Kjeld Flarup <kjeld.flarup at liberalismen.dk> wrote:
> 
> You are suspending in [6039] and resuming in [6092], does these two processes share memory?
> 
>   Kjeld
> 
> 2018-04-12 11:52 GMT+02:00 Arik Halperin <arik at mobilinq.io <mailto:arik at mobilinq.io>>:
> Hello,
> 
>  
> 
> I’m trying to resume a suspended transaction, but keep getting this error:
> 
>  
> 
> WARNING: tm [t_suspend.c:193]: t_continue(): transaction is not suspended [20608:1256194941]
> 
> WARNING: tmx [tmx_mod.c:686]: w_t_continue(): resuming the processing of transaction [20608:1256194941] failed
> 
> WARNING: tm [t_lookup.c:1483]: t_unref(): script writer didn't release transaction
> 
>  
> 
>  
> 
> I’m implementing push handling, in INVITE I do the following:
> 
>  
> 
> route[INVITE] {
> 
>   if (!lookup("location"))
> 
>   {
> 
>  
> 
>    send_reply("100", "Trying");
> 
>     record_route();
> 
>     route(SUSPEND);
> 
>   }
> 
>   else
> 
>   {
> 
>      # NAT detection
> 
>      route(NATMANAGE);
> 
>      if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
> 
>     record_route();
> 
>      t_relay();
> 
>      ts_store();
> 
>      $sht(vtp=>stored::$rU) = 1;
> 
> }
> 
> route(SENDPUSH);
> 
> }
> 
>  
> 
> # suspend the transaction
> 
> route[SUSPEND] {
> 
>  
> 
> if(!t_suspend()) //Transaction is suspended!
> 
> {
> 
>   exit;
> 
> }
> 
> $sht(vtp=>join::$rU) = "" + $T(id_index) + ":" +$T(id_label);
> 
> }
> 
>  
> 
> In Register I call the PUSHJOIN route:
> 
>  
> 
> # append branches or resume the transaction
> 
> route[PUSHJOIN] {
> 
> $var(hjoin) = 0;
> 
> lock("$tU");
> 
> $var(hjoin) = $sht(vtp=>join::$tU);
> 
> $var(hstored) = $sht(vtp=>stored::$tU);
> 
> $sht(vtp=>join::$tU) = $null;
> 
> unlock("$tU");
> 
> if ($var(hjoin)==0)
> 
> {
> 
>         if ($var(hstored))
> 
>         ts_append("location", "$tu");
> 
>         return;
> 
> }
> 
> $var(id_index) = $(var(hjoin){s.select,0,:}{s.int <http://s.int/>});
> 
> $var(id_label) = $(var(hjoin){s.select,1,:}{s.int <http://s.int/>});
> 
> ($var(hjoin))\n");
> 
>  t_continue("$var(id_index)", "$var(id_label)", "INVRESUME");
> 
> }
> 
>  
> 
>  
> 
> For some reason I keep getting:
> 
>  
> 
> Apr 12 12:37:11 kamprod /usr/local/sbin/kamailio[6039]: ERROR: <script>: 1111 suspended transaction [20608:1256194941] FreeSWITCH => 972587102881
> 
>  
> 
> pr 12 12:37:19 kamprod /usr/local/sbin/kamailio[6092]: ERROR: <script>: 1111 tU=972587102881 20608:1256194941 0
> 
> Apr 12 12:37:19 kamprod /usr/local/sbin/kamailio[6092]: ERROR: <script>: 1111 resuming trasaction [20608:1256194941] 972587102881 (20608:1256194941)
> 
> Apr 12 12:37:19 kamprod /usr/local/sbin/kamailio[6092]: WARNING: tm [t_suspend.c:193]: t_continue(): transaction is not suspended [20608:1256194941]
> 
> Apr 12 12:37:19 kamprod /usr/local/sbin/kamailio[6092]: WARNING: tmx [tmx_mod.c:686]: w_t_continue(): resuming the processing of transaction [20608:1256194941] failed
> 
> Apr 12 12:37:19 kamprod /usr/local/sbin/kamailio[6092]: WARNING: tm [t_lookup.c:1483]: t_unref(): script writer didn't release transaction
> 
>  
> 
> 
>  
> 
> 
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
> 
> 
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180416/7fdb88ab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3751 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180416/7fdb88ab/attachment.bin>


More information about the sr-users mailing list