Hello,
better use KSR.tm.t_newtran() instead of KSR.tmx.t_suspend() and then KSR.evapi.async_relay(...)
It should also work only with:
if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label_n)")))
See:
* https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#t_name
Using $T(id_label_n) forces to create the transaction, if it doesn't exist.
Cheers, Daniel
On 04.03.19 17:21, Alexandru Covalschi wrote:
UPD: Such construction seems to work if KSR.tmx.t_suspend(): KSR.evapi.relay(str(KSR.pv.get("$T(id_label)"))); However I'm wondering if there could be any issues using it like that? I know that evapi.relay is non-blocking, however - are all variables accessible in that way?
I'm using 5.2 from debian:stretch stable repo in a docker container. ________________________________ Regards, Alexandru Covalschi VoIP Engineer and System Administrator tel: +380 97 24 75445
4 марта 2019 г., в 16:30, Alexandru Covalschi <568691@gmail.com mailto:568691@gmail.com> написал(а):
Hello list,
I'm trying to use async evapi with app_python3 KEMI, but I don't know how to get t_suspend variables. What am I doing is connecting to evapi via telnet and making a call, which successfully reaches that point: if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label)"))): KSR.xlog.xinfo("processing suspended in transaction [" + str(KSR.pv.get("$T(id_index)")) + ":" + str(KSR.pv.get("$T(id_label)")) +"]\n");
I have the id_label in the log, but in telnet I have None. How can I get transaction index and label transferred using python3 KEMI? Shall I use KSR.x.modf (in that case I'm losing almost all KEMI benefits)?..
Regards, Alexandru Covalschi VoIP Engineer and System Administrator tel: +380 97 24 75445
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users