Hi all,
I'm trying to run a kamailio DMQ node inside a docker container. All
works fine but i have one issue with DMQ. Since the kamailio process
inside the container is behind a nat i have set the advertise address to
the external ip, this works fine for the via headers but DMQ keeps
sending the internal interface in the KDMQ notification_peer messages.
The external ip is in there as well. Example:
SIP/2.0 200 OK
Via: SIP/2.0/UDP
10.10.10.13;branch=z9hG4bK2dcb.c6326de2000000000000000000000000.0
To:
<sip:notification_peer@10.10.10.94:5060>;tag=616b7acb681ed5e9cbc485b3faa09d62.0a3d
From:
<sip:notification_peer@10.10.10.13:5060>;tag=e8f29c06c4b85a188f6533f08d60feb6-ff29
CSeq: 10 KDMQ
Call-ID: 17042656602ca532-23367(a)x.x.x.x
Content-Type: text/plain
Server: kamailio (5.1.4 (x86_64/linux))
Content-Length: 222
sip:10.10.10.13:5060;status=active
sip:10.10.10.12:5060;status=active
sip:10.10.10.92:5060;status=active
sip:10.10.10.93:5060;status=active
sip:10.10.10.94:5060;status=active <-- entry for container external ip
sip:172.17.0.2:5060;status=disabled <-- entry for container internal ip
I tried to strip this entry using the replace_body_atonce in the
tm:local-request route. This works fine for the KDMQ request, but when i
try to remove the same line from 200OK responses that are send out as a
response to incomming KDMQ messages this seems to fail. I use the
following code:
# Working code (for outgoing KDMQ requests):
event_route [tm:local-request]
{
if(is_method("KDMQ") && $rU == "notification_peer")
replace_body_atonce("sip:172.17.0.*:5060;status=.*", "");
}
# Failing code (for 200OK responses):
reply_route
{
xlog("L_ALERT", "REPLY: Sending out reply, tU is $tU rs is $rs\n");
if ($rs == "200" && $tU == "notification_peer")
{
replace_body_atonce("sip:172.17.0.*:5060;status=.*", "");
}
}
I'm running kamailio 5.1.4. Is there a way to strip a line from the body
of a local generated 200OK response? Or is there a way to avoid that DMQ
inserts the internal container ip in the first place.
Thanks,
Jan Hazenberg
Hello,
I was wondering if there are any best practices for authenticating
websocket connection establishment inside the xhttp event route?
Thanks and regards,
Grant
Hello everyone!
I'm not sure if I correctly understood the description of functions
*isbflagset* and *isbflagset* so once again I'm asking for help :)
Here is what I do:
1. Asterisk sends INVITE to Kamailio. Kamailio performs lookup of available
contacts and then few checks in branch_route. I'm adding *setbflag("17",
$T_branch_idx);* there.
2. Later in route[NATMANAGE] I added *if (isbflagset("17", $T_branch_idx))
{* and additional logic. *isbflagset* results in *true* (for same INVITE).
3. Finally one of UACs responds with 200 OK. Asterisk generates ACK packet
that gets in route[NATMANAGE]. *isbflagset* results in *false*.
So my question is: shouldn't *isbflagset* be *true* for ACK too since it's
the same branch or I interpreted these fenctions incorrectly?
Thanks a lot!
Hi!
Wanted to clarify some info about rtpengine working within HA-environment.
Idea is we have multiple rtpengines under same setid.
So, when I'm calling rtpengine_offer() I really don't care which is selected. But than might happen situation, where this call(dialog) is moved to other Kamailio instance (via dlg_db_load_callid()) and from there called rtpengine_delete().
So, my question is, how I can be sure, that delete request will go to same rtpengine instance that was selected in rtpengine_offer() on different server. And where this info is stored, within dialog or within TM module (which is not replicated in any way)
Regards, Igor
is there a plan to create an sdp sanity functionality?
ERROR: <core> [core/parser/sdp/sdp.c:212]: set_sdp_payload_attr():
Invalid payload location
opensips has something similar
sipmsg_validate()
*'s'* - checks the integrity of the SDP body, if it exists
Kelvin Chua
Hi all,
I installed kamailio v5.2.3 from source and IMS modules included. Then I
tried to create required database and tables, I removed "dialog" from
STANDARD_MODULES and added "ims_dialog ims_charging ims_usrloc_scscf
ims_usrloc_pcscf presence" to the EXTRA_MODULES in kamctlrc file.
When I issue `<kamailio_home>/sbin/kamctl create` I got following error:
ERROR 1062 (23000) at line 39: Duplicate entry 'subscriber' for key
'table_name_idx'
ERROR: Creating extra tables failed at ims_usrloc_scscf!
Should I exclude an other module from STANDARD_MODUELS?
Regards,
Ali
Hi Daniel,
See pastebin url below for the backtrace.
https://pastebin.com/tTUUk4YH
Hopefully I did it the right way. Please let me know if you need anything else.
FYI, Kamailio is running inside of a docker container.
version: kamailio 5.2.1 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY,
USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE
1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 6.3.0
I can easily replicate this, but to be sure I've saved the core file
locally on my machine.
Regards,
Grant
On Thu, May 2, 2019 at 10:05 AM Daniel-Constantin Mierla
<miconda(a)gmail.com> wrote:
>
> Hello,
>
> can you get a core file for this case?
>
> Set `ulimit -c unlimited` before starting Kamailio as root and run again.
>
> Once you have the core file, get the backtrace with gdb.
>
> Cheers,
> Daniel
>
> On 01.05.19 20:26, Grant Bagdasarian wrote:
> > Hello,
> >
> > I was trying out the auth_ephemeral module inside the xhttp
> > event_route in Python KEMI, and discovered a possible bug.
> >
> > https://pastebin.com/4Ghumfis
> >
> > The following will result in the stack smash error. Whenever I leave
> > out the unixtimestamp the
> > module will complain about not being able to convert to an int, which
> > make sense, but doesn't lead to a stack smash error and a complete
> > crash of Kamailio.
> >
> > KSR.auth_ephemeral.autheph_authenticate("1576734089:grant", "1234").
> >
> > According to the documentation this module can only be used in
> > REQUEST_ROUTE, but I found a presentation online which also used this
> > module and that particular function in event_route, which is what I
> > need for WebSocket authentication.
> >
> > Hope this helps. Please let me know if you need more information.
> >
> > Regards,
> >
> > Grant
> >
> > _______________________________________________
> > Kamailio (SER) - Users Mailing List
> > sr-users(a)lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
>