Is there a way to call the send_reply method of the route from either Java or csharp? As I have been having issues with the app_java, I have been looking at app_mono and it seems to have better access to the variables, etc. However, the SR.core.ModF only seems to take methods that do not take parameters.
Or for that matter, is there a way to return something back to the route in the config file which it can use to call send_reply? I have a strange requirement to return 202 rather than 200 from subscription requests and a 603 if it fails.
Tom Johnson<mailto:tjohnson@microautomation.com> | Senior Software Engineer
O: 703-543-2118 | F: 703-543-2099
5870 Trinity Parkway, Suite 600, Centreville, VA 20120
[cid:image001.png@01CE18AF.8F231EB0]<http://www.microautomation.com/>
Per my previous message, I determined that the module's makefile was not properly finding the jdk/jre directories needed to compile. So, I temporarily hardcoded the paths in the makefile.
However, now when I use the module, Kamailio crashes. Below is the lines from /var/log/messages:
Sep 9 15:13:10 MAIFREEPBX kamailio: INFO: <core> [tcp_main.c:4836]: init_tcp(): init_tcp: using epoll_lt as the io watch method (auto detected)
Sep 9 15:13:10 MAIFREEPBX kamailio: WARNING: <core> [daemonize.c:352]: daemonize(): pid file contains old pid, replacing pid
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: rr [../outbound/api.h:54]: ob_load_api(): Failed to import bind_ob
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: rr [rr_mod.c:159]: mod_init(): outbound module not available
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 512
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but nonce-count (nc_enabled) support disabled
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: app_java [java_mod.c:125]: mod_init(): Initializing Java VM with options: -Xdebug -verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/opt/microautomation/i3/I3Notifier.jar:/opt/kamailio/java/kamailio.jar:/opt/microautomation/i3/lib/log4j-1.2.16.jar
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: app_java [java_mod.c:146]: mod_init(): app_java: Java VM initialization OK
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: app_java [java_mod.c:198]: mod_init(): app_java: module initialization OK
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: : <core> [mem/q_malloc.c:159]: qm_debug_frag(): BUG: qm_*: prev. fragm. tail overwritten(0, abcdefed)[0x7f0941207190:0x7f09412071c0]!
Sep 9 15:13:11 MAIFREEPBX abrt[12282]: Saved core dump of pid 12268 (/usr/local/sbin/kamailio) to /var/spool/abrt/ccpp-2014-09-09-15:13:10-12268 (183721984 bytes)
The code dump mentioned does not exist.
If I do not load the app_java module, Kamailio works.
Tom Johnson<mailto:tjohnson@microautomation.com> | Senior Software Engineer
O: 703-543-2118 | F: 703-543-2099
5870 Trinity Parkway, Suite 600, Centreville, VA 20120
[cid:image001.png@01CE18AF.8F231EB0]<http://www.microautomation.com/>
Hello
I have a question in regards monitoring websocket connections on a
production box.
We ususally trust whatever is indicated through the
$ kamctl fifo get statistics
We've seen that this is what the community contributed munin plugins use.
However when trying to monitor web socket connections and using this output
we've seen completely different results from the output of
$ kamctl fifo get_statistics
websocket:ws_current_connections
Which seem to indicate current websocket connections and the output of
$ kamctl fifo ws.dump
Which seems to indicate current OPEN connections.
Can anybody shed some light as to what are the differences between both if
any, and advice which one is the proper one to monitor for possible file
handle exhaustion.
TIA
According to this article I mentioned in the beginning:
http://nil.uniza.sk/sip/kamailio/configuring-kamailio-4x-websocket
In http:request they do straight away the set_reply_close();
I don't know exactly if this kamailio.cfg implementation may be useful for
working with WSS:
event_route[xhttp:request] {
set_reply_close();
set_reply_no_connect();
if ($Rp != MY_WS_PORT
#!ifdef WITH_TLS
&& $Rp != MY_WSS_PORT
#!endif
) {
xlog("L_WARN", "HTTP request received on $Rp\n");
xhttp_reply("403", "Forbidden", "", "");
exit;
}
xlog("L_DBG", "HTTP Request Received\n");
if ($hdr(Upgrade)=~"websocket"
&& $hdr(Connection)=~"Upgrade"
&& $rm=~"GET") {
# Validate Host - make sure the client is using the correct
# alias for WebSockets
if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host))) {
xlog("L_WARN", "Bad host $hdr(Host)\n");
xhttp_reply("403", "Forbidden", "", "");
exit;
}
# Optional... validate Origin - make sure the client is from an
# authorised website. For example,
#
# if ($hdr(Origin) != "http://communicator.MY_DOMAIN"
# && $hdr(Origin) != "https://communicator.MY_DOMAIN") {
# xlog("L_WARN", "Unauthorised client $hdr(Origin)\n");
# xhttp_reply("403", "Forbidden", "", "");
# exit;
# }
# Optional... perform HTTP authentication
# ws_handle_handshake() exits (no further configuration file
# processing of the request) when complete.
if (ws_handle_handshake())
{
# Optional... cache some information about the
# successful connection
exit;
}
}
HTTP authentication is not being properly set up. Any indications on how to
perform this sucessfully?
Kind regards
Manuel
>Hello,
>
>from the logs you sent now, it appears that you have set_reply_close()
>in config, therefore the connection is closed after sending the reply.
>
>Cheers,
>Daniel
Hi,
I am using Kamailio 4.1.1 and dlg_manage() function for processing SIP
requests with dialog module. After call is established Kamailio is being
used for generating in-dialog INFO request toward caller (using t_uac_dlg
function via xmlrpc). INFO messages are correctly generated but dialog
calee_cseq value is not being incremented with every message. That
represents a problem since other SIP requests generated by callee side
(like OPTIONS) are not in order, and there is no correct information about
calee_cseq value in dialog memory records.
The question is how can I increment dialog calee_cseq value when local INFO
request toward caller is being generated using t_uac_dlg via xmlrpc?
Thx,
Drazen
Hello. I tried to use UAC module at my system for registration multiple
providers, and call through it.
When I implementing this at my cfg file I had some troubles:
-- with Authentification at INVITE (using UAC_AUTH). IT does not send
second INVITE packet with www_auth header for some trunks (not for all,
only for some providers)
-- with BYE recieving from PROVIDER ("No BYE from Called party" task at
USers Mailing lists)
After many days of tests and debugging I ask question from myself - does
module correctly works?
As I know this module breaks some philosophy about SIP proxy and
development of this module is not question of first priority.
After that all I need advice - what I must use for registtration my SIP
trunks - 3d party registrant or this module, that works fine and I doing
something wrong?
Thanks for advice.
Hello,
development (master) branch of Kamailio enters now in pre-release phase
for version 4.2.0. Therefore, no new feature should be pushed to master
until we create a dedicated branch for 4.2 (expected to be in about 4
weeks or so).
If in doubt to push or not a commit to master, push it first on a
personal branch (or attach to an email) and discuss it on sr-dev. The
new modules can be a bit more dynamic if there is need to get them to
the right shape (e.g., like decision to rename functions, parameters or
adjust database structure).
We hope to get many people involved in testing, to rich a stable state
before releasing 4.2.0. If you want to get involved and need assistance,
don't hesitate to write to mailing lists.
Help with updating the wiki page for migration from 4.1 to 4.2 as well
as what is new in 4.2 is very appreciated. I will post updates about the
very soon.
Many thanks to everyone involved in development of 4.2 and the early
testers that played with master branch.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany
I heard somewhere LCR can do routing based on call rate and call price, does it true? I haven't seen any config or doc which does call rate using LCR. It only does routing base on prefix scan.
Am I missing something here?
Sent from my iPhone
I'll be in Norfolk, VA for xTupleCon in October
On 15 October, there will be two events for WebRTC:
14:15 a talk about the xTuple WebRTC extension at xTupleCon
- must register for xTupleCon to attend this
17:30 a technical / developer workshop at xTuple's offices
- free, anybody welcome, even if not attending xTupleCon,
RSVP through Eventbrite[1]
Please see my blog[2] for more comments about all of this and feel free
to email me in advance if you have questions about it or if you may like
to meet up there.
1.
http://www.eventbrite.com/e/browser-based-webrtc-telephony-for-web-apps-wor…
2. http://danielpocock.com/xtuplecon-webrtc-talk-schedule-change