[SR-Users] KEMI: app_jsdt_run_ex(): js loading state not initialized (call: ksr_htable_event)

2023-03-25 Thread Ovidiu Sas
Hello all,

While using KEMI with app_jsdt I noticed the following possible
regression between 5.5 and 5.6.

The following config is working ok on 5.5 but throws an error on 5.6:
ERROR: app_jsdt [app_jsdt_api.c:555]: app_jsdt_run_ex(): js loading
state not initialized (call: ksr_htable_event)

kamailio.cfg:
debug=2
children=1

log_facility=LOG_LOCAL0
log_name="k"

mpath="/home/osas/src/kamailio/src/modules"
loadmodule "htable/htable.so"
  modparam("htable", "event_callback", "ksr_htable_event")
  modparam("htable", "event_callback_mode", 1)
loadmodule "kemix/kemix.so"
loadmodule "app_jsdt/app_jsdt.so"
  modparam("app_jsdt", "load", "/usr/local/etc/kamailio/kamailio.js")
cfgengine "jsdt"

kamailio.js:
function ksr_htable_event(evname) {
KSR.info("ksr_htable_event(" + evname + ")\n");
}

function ksr_request_route() {
KSR.x.exit();
}

If we load the htable module after app_jsdt, then the error is gone.
Is there something new during init in 5.6 that requires specific
module loading order?

-ovidiu
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] KEMI python script - issue with string formatting "TypeError: an integer is required"

2023-03-25 Thread Chaigneau, Nicolas
Hello,


I'm trying to use python KEMI script with Kamailio (5.6.4).
This is python 2.7.5.


I have some weird behaviour with string formatting.
This works fine:

KSR.info("si: [%s]\n" % KSR.pv.get("$si"))

But with this:

KSR.info("si: {}\n".format(KSR.pv.get("$si")))

=> This works but only for 1/2 of the SIP requests. Otherwise I get the 
following error:

1(111858) ERROR: PY2 {INVITE} app_python [python_support.c:154]: 
python_handle_exception(): apy_exec: ksr_request_route((null)): Unhandled 
exception in the Python code:
Traceback (most recent call last):
  File "kamailio-routing-kemi.py", line 74, in ksr_request_route
KSR.info("si: {}\n".format( str(KSR.pv.get("$si")) ))
TypeError: an integer is required



What could be the problem ?


Regards,
Nicolas.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.

__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: No voice for webrtc call

2023-03-25 Thread Arun K R
After loading crypto module into the kernel now I am getting SRTP
authentication failed, kindy see the logs below

Mar 25 10:45:34 debian rtpengine[17868]: o=- 7850469901141480639 2 IN IP4
127.0.0.1
Mar 25 10:45:34 debian rtpengine[17868]: s=-
Mar 25 10:45:34 debian rtpengine[17868]: t=0 0
Mar 25 10:45:34 debian rtpengine[17868]: a=group:BUNDLE 0
Mar 25 10:45:34 debian rtpengine[17868]: a=extmap-allow-mixed
Mar 25 10:45:34 debian rtpengine[17868]: a=msid-semantic: WMS
ukQZUUNqJBfb86Rzru3RA390AAIGX4mzOsH4
Mar 25 10:45:34 debian rtpengine[17868]: m=audio 9 UDP/TLS/RTP/SAVPF 111 63
9 0 8 13 110 126
Mar 25 10:45:34 debian rtpengine[17868]: c=IN IP4 0.0.0.0
Mar 25 10:45:34 debian rtpengine[17868]: a=rtcp:9 IN IP4 0.0.0.0
Mar 25 10:45:34 debian rtpengine[17868]: a=ice-ufrag:ZW7m
Mar 25 10:45:34 debian rtpengine[17868]: a=ice-pwd:R11oi+7clD5K3WHviTxun+qG
Mar 25 10:45:34 debian rtpengine[17868]: a=ice-options:trickle
Mar 25 10:45:34 debian rtpengine[17868]: a=fingerprint:sha-256
83:27:2D:0A:0D:AF:EE:7A:B9:F6:D0:B3:5E:E1:B0:31:70:38:00:AB:E2:90:E4:AA:93:94:BE:0E:22:0A:53:26
Mar 25 10:45:34 debian rtpengine[17868]: a=setup:actpass
Mar 25 10:45:34 debian rtpengine[17868]: a=mid:0
Mar 25 10:45:34 debian rtpengine[17868]: a=extmap:1
urn:ietf:params:rtp-hdrext:ssrc-audio-level
Mar 25 10:45:34 debian rtpengine[17868]: a=extmap:2
http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
Mar 25 10:45:34 debian rtpengine[17868]: a=extmap:3
http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
Mar 25 10:45:34 debian rtpengine[17868]: a=extmap:4
urn:ietf:params:rtp-hdrext:sdes:mid
Mar 25 10:45:34 debian rtpengine[17868]: a=sendrecv
Mar 25 10:45:34 debian rtpengine[17868]:
a=msid:ukQZUUNqJBfb86Rzru3RA390AAIGX4mzOsH4
61406c6f-0991-409d-921a-67c1747ef4b1
Mar 25 10:45:34 debian rtpengine[17868]: a=rtcp-mux
Mar 25 10:45:34 debian rtpengine[17868]: a=rtpmap:111 opus/48000/2
Mar 25 10:45:34 debian rtpengine[17868]: a=rtcp-fb:111 transport-cc
Mar 25 10:45:34 debian rtpengine[17868]: a=fmtp:111
minptime=10;useinbandfec=1
Mar 25 10:45:34 debian rtpengine[17868]: a=rtpmap:63 red/48000/2
Mar 25 10:45:34 debian rtpengine[17868]: a=fmtp:63 111/111
Mar 25 10:45:34 debian rtpengine[17868]: a=rtpmap:9 G722/8000
Mar 25 10:45:34 debian rtpengine[17868]: a=rtpmap:0 PCMU/8000
Mar 25 10:45:34 debian rtpengine[17868]: a=rtpmap:8 PCMA/8000
Mar 25 10:45:34 debian rtpengine[17868]: a=rtpmap:13 CN/8000
Mar 25 10:45:34 debian rtpengine[17868]: a=rtpmap:110 telephone-event/48000
Mar 25 10:45:34 debian rtpengine[17868]: a=rtpmap:126 telephone-event/8000
Mar 25 10:45:34 debian rtpengine[17868]: a=ssrc:199333846
cname:OBdOn05PKdHnvXw9
Mar 25 10:45:34 debian rtpengine[17868]: a=ssrc:199333846
msid:ukQZUUNqJBfb86Rzru3RA390AAIGX4mzOsH4
61406c6f-0991-409d-921a-67c1747ef4b1
Mar 25 10:45:34 debian rtpengine[17868]: ", "replace": [ "origin",
"session-connection" ], "call-id": "oaece23ntismpjeug83i", "received-from":
[ "IP4", "122.161.108.16" ], "from-tag": "pc2bfpeipd", "command": "offer" }
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[core] Using default bitrate of 32000 bps for 2-channel Opus
Mar 25 10:45:34 debian rtpengine[17868]: NOTICE: [oaece23ntismpjeug83i]:
[core] Creating new call
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[core] Subscribing 'pc2bfpeipd' to ''
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[core] Subscribing '' to 'pc2bfpeipd'
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Updating codecs for offerer pc2bfpeipd #1
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec opus/48000/2 (111)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec red/48000/2 (63)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec G722/8000 (9)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec PCMU/8000 (0)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec PCMA/8000 (8)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec CN/8000 (13)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec telephone-event/48000 (110)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec telephone-event/8000 (126)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Updating codecs for answerer  #1
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec opus/48000/2 (111)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec red/48000/2 (63)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec] Adding codec G722/8000 (9)
Mar 25 10:45:34 debian rtpengine[17868]: DEBUG: [oaece23ntismpjeug83i]:
[codec]