def mod_init(): ksr_print('From python mod init') return Kamailio()
def ksr_on_reply_route(self, msg): ksr_print('Kamailio.ksr_on_reply_route') if has_body("application/sdp"): KSR.rtpproxy.rtpproxy_manage("iewc") return 1
def ksr_onsend_route(self, msg): ksr_print('Kamailio.ksr_onsend_route') return 1
def ksr_request_route(self, msg): ksr_print('Kamailio.ksr_request_route') KSR.rtpproxy.rtpproxy_manage('iewc') KSR.tm.t_relay(PBX_IP, PBX_PORT) return 1;
def child_init(self, rank): ksr_print(f'kamailio.child_init({str(rank)})') return 0
def __init__(self): ksr_print('Kamailio.__init__')