While I have seen other posts I have not found anything that describes my scenario.
Kamailio sets in front of a group of asterisk servers which are used in a round robin dispatch group. All asterisk servers share a common database in which voicemail boxes are defined and messages are stored.
I'm looking for a way to make message waiting work in this example. I have tried creating a view with basic peer information for asterisk to use for message notification, however asterisk does not 'see' these peers until a call is made to the specific user and the peer info is retrieved from the database, which can delay notifications severely rendering them useless. I also want to avoid sending a copy of the registrations to asterisk servers, as the purpose of the distributed system is to eliminate the large number of sip registrations asterisk needs to manage.
I have also seen a couple of script methods that look at the voicemail directory structure for file changes and trigger an application like sipsak to generate the notifications and let kamailio relay them. From what I see, the consensus is not to go this route. In my case the script would need to look at the database level, and maybe some sort of database trigger could be used.
What are others doing / what do others recommend as the best way to handle message waiting with a situation where kamailio sets in front of a voicemail server?
Any input is appreciated.
Dan-
Hi guys,
I need to implement a call forwarding (blind call forward) in a
kamailio.
Do you know if this is possible? There is a way that allow the
subscriber to configure it's own forwarding ?
Thanks in advance,
Lucas
Hello,
I have a kamailio 3.3.4 server running on x86-64 Linux, and I have a
script which looks something like this:
$var(gwruri) = $rU;
if ($(var(gwruri){s.substr,0,1}) == "+") {
$var(gwruri) = $(var(gwruri){s.substr,1,0});
}
When this script is run with say $rU = "+0000009724" (real number
removed). $var(gwruri) should contain the same but without the +, this
is not the case, $var(gwruri) ends up being "0000007724".
This smells memory corruption. When run under valgrind, valgrind
generates this error when that code is run:
==1206== Source and destination overlap in strncpy(0x55e3b2a, 0x55e3b2b, 10)
==1206== at 0x4C25ACF: strncpy (mc_replace_strmem.c:339)
==1206== by 0x2A28BB92: set_var_value (pv_svar.c:122)
==1206== by 0x2A2800D1: pv_set_scriptvar (pv_core.c:1683)
==1206== by 0x45E8F8: lval_assign (lvalue.c:353)
==1206== by 0x416A78: do_action (action.c:1524)
==1206== by 0x41E465: run_actions (action.c:1644)
==1206== by 0x4177FD: do_action (action.c:1136)
==1206== by 0x41E465: run_actions (action.c:1644)
==1206== by 0x4177FD: do_action (action.c:1136)
==1206== by 0x41E465: run_actions (action.c:1644)
==1206== by 0x419C67: do_action (action.c:1140)
==1206== by 0x41E465: run_actions (action.c:1644)
==1206==
I am not very familiar with the kamailio source code, but as far as I
can tell this happens because the strncpy() in set_var_value() in
pv_svar.c copies the string directly within the same overlapping memory
area. The same memory area is used because the tr_eval_string() function
and the TR_S_SUBSTR-code in pv_trans.c reuses the input buffer and just
increments the pointer and since the source pvar is the same as the
destination pvar the strncpy() ends up copying between overlapping
memory area.
I am not sure what the best fix would be for that, but I have attached a
patch which copies the string in the TR_S_SUBST code to _tr_buffer and
returns that buffer instead like a lot of the other transformations in
that function does.
If this fix is correct some other transformation functions probably
needs to be corrected as well.
--
Martin Mikkelsen, Zisson AS
Hi there, i hope you can help me, i am having trouble with the register
page of siremis, strange thing is, i can open the register page, but
only after i have logged my self in, if not, it redirects me directly to
the login page.. how can i setup the register page to be accessible
without the need of logging in ?
Also i am getting the info after trying to register, that "Public
registration is not enabled!"
but i have set siremis/modules/ser/config/common.Main.php to
$cfg_siremis_public_registrations = true;
What is the problem, please help.
Greetings,
Alex
i'm trying to use the example kamailio.cfg to route to voicemail
server on busy or decline.
Only thing I did was adding decline code to t_check_status("486|408"),
enabling the preprocessor variable for voicemail and changing the
voicemail host and port to my voicemail server.
No requests arrive on my voicemail server and the dial tone keeps
ringing even if phone is busy and when I decline on the receiving
phone there's a new INVITE sent to the phone directly afterwards.
Am I doing something wrong here?
Thank you very much for sharing your insights, Barry! I am facing the same
problem that Trevor described:
Things are working just fine on their own, but as soon as FreePBX comes
into play, calling extensions becomes impossible because of the different
tables used. Removing the password from FreePBX (and setting the Kamailio
IP in the ACL field) seems to mitigate the issue somewhat, but even though
the extension shows as registered in FreePBX, it always shows as busy:
chan_sip.c:23237 handle_response_invite: Failed to authenticate on INVITE
to '"xxxxxxxx" <sip:xxxxxxxx@198.23.139.21>;tag=as72a4117a'
-- SIP/1001-00000006 is circuit-busy
I doubt that I can make the necessary modifications even with your hints,
but would be willing to pay for your (or anybody's) time solving the matter
in a way that (a) leaves the FreePBX installation untouched as far as
possible and (b) is easy to apply to subsequent versions. Ideally, it would
be a slight modification of Daniel's excellent tutorial at
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb,
allowing to create extensions in FreePBX. Anybody willing to give it a
shot? Just let me know what you would charge and we can talk about it.
Hello All,
I'm a bit confused as to how Siremis interacts with Kamailio. From what I understand, the dial-plan is done in the kamailio.cfg with regex statements and requires a restart of the Kamailio process to take effect. How then does Siremis change the dial-plan in Kamailio without writing re-writing the config?
I'm assuming Siremis is merely writing to a MySQL database and some additional code is required in the kamailio.cfg in order to be able to use the dial-plan functionality of Siremis?
What must I change in the kamailio.cfg to be able to use Siremis for dial-plan modification?
Guys,
I was wondering if I am doing something wrong or domain module not
considering properly local ips within is_uri_host_local().
Although I have domain loaded with register_myself on 1, the request
going to my IP is simply not matching local domain (listening on
127.0.0.1 port 5070).
Bellow the trace of such request:
"""
#
U 2013/05/30 12:35:56.436485 10.10.10.21:5060 -> 127.0.0.1:5070
OPTIONS sip:127.0.0.1:5070 SIP/2.0.
Via: SIP/2.0/UDP
10.10.10.21;branch=z9hG4bK4866.b4f45983000000000000000000000000.0.
To: <sip:127.0.0.1:5070>.
From: <sip:ep@iec.itsyscom.com>;tag=ae9b2706b606c3acb0ebe4f1c8f81cee-f20d.
CSeq: 10 OPTIONS.
Call-ID: 467de807489c4482-3002(a)10.10.10.21.
Max-Forwards: 70.
Content-Length: 0.
User-Agent: iClass4-EP 4.0.0.
.
#
U 2013/05/30 12:35:56.440410 127.0.0.1:5070 -> 10.10.10.21:5060
SIP/2.0 484 Address Incomplete.
Via: SIP/2.0/UDP
10.10.10.21;branch=z9hG4bK4866.b4f45983000000000000000000000000.0.
To: <sip:127.0.0.1:5070>;tag=46a6e639fa023622ac1ba4fea686e961.d61e.
From: <sip:ep@iec.itsyscom.com>;tag=ae9b2706b606c3acb0ebe4f1c8f81cee-f20d.
CSeq: 10 OPTIONS.
Call-ID: 467de807489c4482-3002(a)10.10.10.21.
Server: iClass4-AP 4.0.0.
Content-Length: 0.
"""
My script looks something like bellow, so Address Incomplete should
never be reached:
"""
#!define LISTEN_IP 127.0.0.1
#!define LISTEN_PORT 5070
...
listen=LISTEN_IP
port=LISTEN_PORT
auto_aliases=yes
...
# ----- domain params -----
modparam("domain", "db_url", DBURL)
modparam("domain", "register_myself", 1)
...
if (is_method("OPTIONS") && is_uri_host_local()) {
options_reply();
exit;
}
...
if ($rU==$null) {
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
"""
I am running on git master with the test patch Daniel did few days back
for me.
Thanks in advance for any tip!
DanB
Hi,
When I want to unregister, I have 2 ways
1. Append ;expires=0 in Contact field
2. Add another Expires : 0 header
with CSeq, Call-ID not the same with when i register
Does Kamailio check for the saem Cseq, Call-ID to allow unregistration ?
--
Khoa Pham
HCMC University of Science
www.fantageek.com