Sorry for my previous mail with typos.
I have the current configuration located on google cloud servers:
[Alice a.a.a.a]--->(GCN NAT x.x.x.x)--->(Instance with Kam
10.0.0.1)--->(next proxy 10.0.0.2)
Currently I have configured a fake alias with IP x.x.x.x in Debain and set
listeners this way:
listen=udp:10.0.0.1:5060 advertise x.x.x.x:5060
listen=udp:x.x.x.x:5060
200OK from Kam to Alice:
Via: a.a.a.a
Record-Route: <sip:alias1@10.0.0.2;lr> (used for further internal routing)
Record-Route: <sip:alias2@10.0.0.2;lr>
Record-Route: <sip:x.x.x.x;lr>
Contact: <sip:dnis@x.x.x.x>
ACK recived from Alice with reversed RR:
ACK sip:dnis@x.x.x.x
Via: a.a.a.a
Route: <sip:x.x.x.x;lr>, <sip:alias2@10.0.0.2;lr>,<sip:alias1@10.0.0.2;lr>
So what Kam does - it goes through loose_route() and dispatches two ACKs to
x.x.x.x (from which I'd like to get rid of) and 10.0.0.2
First one is:
ACK sip:alias1@10.0.0.2
Via: x.x.x.x
Via: a.a.a.a
Route: <sip:x.x.x.x;lr>, <sip:alias2@10.0.0.2;lr>
And the next one:
ACK sip:alias1@10.0.0.2
Via: x.x.x.x
Via: x.x.x.x (Doubles Via)
Via: a.a.a.a
Route: <sip:alias2@10.0.0.2;lr>
So my question is - how to make Kam think that x.x.x.x it's own address and
stop dispatching in-dialog messages to itself? Currently I'm thinking about
chooping off one Route/Record-Route in route[WITHINDLG] tight before
loose_route(). But maybe there's a better way to solve my problem?
Hi all,
I have the current configuration located on google clod servers:
[Alice a.a.a.a]--->(GCN NAT x.x.x.x)--->(Instance with Kam
10.0.0.1)--->(next proxy 10.0.0.2)
Currently I have configured a fake alias with IP x.x.x.x in Debain and set
listeners this way:
listen=udp:10.0.0.1:5060 advertise x.x.x.x:5060
listen=udp:x.x.x.x:5060
200OK from Kam to Alice:
Via: a.a.a.a
Record-Route: <sip:alias1@10.0.0.2;lr> (used for further internal routing)
Record-Route: <sip:alias2@10.0.0.2;lr>
Record-Route: <sip:x.x.x.x;lr>
Contact: <sip:dnis@x.x.x.x>
ACK recived from Alice with reversed RR:
ACK sip:dnis@x.x.x.x
Via: a.a.a.a
Route: <sip:x.x.x.x;lr>, <sip:alias2@10.0.0.2;lr>,<sip:alias1@10.0.0.2;lr>
So what Kam does - it goes through loose_route() and dispatches two ACKs to
x.x.x.x (from which I'd like to get rid of) and 10.0.0.2
First one is:
ACK sip:alias1@10.240.0.67
Via: x.x.x.x
Via: a.a.a.a
Route: <sip:x.x.x.x;lr>, <sip:alias2@10.0.0.1;lr>
And the next one:
ACK sip:alias1@10.240.0.67
Via: x.x.x.x
Via: x.x.x.x (Doubles Via)
Via: a.a.a.a
Route: <sip:alias2@10.0.0.1;lr>
So my question is - how to make Kam think that x.x.x.x it's own address and
stop dispatching in-dialog messages to itself? Currently I'm thinking about
chooping off one Route/Record-Route in route[WITHINDLG] tight before
loose_route(). But maybe there's a better way to solve my problem?
Hi,
One aspect of the dialog module that is very confusing to newbies is the
relationship between the dlg_flag modparam and dlg_manage().
According to the documentation, dlg_manage() effectively seems to
obsolete the requirement for a flag[1]:
Process current SIP request with dialog module. It is an
alternative to setting dialog flag for initial INVITE and
Route-parameter-callback execution for within-dialog requests.
Yet, if one does not set a dlg_flag modparam, the dialog module fails to
load:
Mar 23 15:42:29 evaristesys-legacy /usr/local/sbin/kamailio[2900]: ERROR: dialog [dialog.c:500]: mod_init(): invalid dlg flag -1!!
Perhaps the flag modparam should be made optional, and any arguments for
using one over the other more clearly explained in the documentation.
I'd make the latter contribution, but unfortunately am not entirely sure
what those are.
Cheers,
-- Alex
[1] https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.f.dlg_ma…
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
We are developing an app with a pjsip client.
I see this error when trying to send an invite from kamailio.
Mar 17 00:29:46 raspberrypi /usr/sbin/kamailio[18720]: ERROR: <core>
[tcp_main.c:4258]: tcpconn_main_timeout(): connect 62.44.134.85:43829
failed (timeout)
A few seconds before 62.44.134.85:43829 did a register.
I can understand that either the TCP connection was close by the other
end or no one is listening.
How much can I see in a pcap from this scenario? I cannot see the
invite, but somehow there must be some TCP communication to show what is
failing.
--
-------------------- Med Liberalistiske Hilsner ----------------------
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
Im trying to do a t_suspend, but cant get htable to work
I save to $sht
$sht(vtp=>join::$rU) = "" + $T(id_index) + ":" + $T(id_label);
xlog( "L_ALERT", "Suspended transaction sht(vtp=>join::$rU) =
[$sht(vtp=>join::$rU)]\n" );
Mar 19 23:36:28 raspberrypi /usr/sbin/kamailio[2167]: ALERT:
<script>: Suspended transaction sht(vtp=>join::004540294149) =
[23690:1238111367]
But in my register thread nothing is read
xlog("L_ALERT","sht(vtp=>join::$tU) = $sht(vtp=>join::$tU)\n");
Mar 19 23:36:31 raspberrypi /usr/sbin/kamailio[2114]: ALERT:
<script>: sht(vtp=>join::004540294149) = <null>
# -------- htable params --------------
modparam("htable", "db_url", DBURL)
modparam("htable", "htable",
"vtp=>size=10;autoexpire=120;dbtable=htable;dbmode=1")
modparam("htable", "htable", "a=>size=6;")
I never see any data in htable in the database.
What am I doing wrong?
--
-------------------- Med Liberalistiske Hilsner ----------------------
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
Hello all,
It seems that the phonenum module in at least 5.1.2 (haven't tried previous
versions) is behaving somewhat erratically. More specifically, if there are
any references to any phn PVs with the key other than "number":
if ( phonenum_match("1-484-555-8888", "src") ) {
xlog("number norm: $phn(src=>number)\n");
xlog("number country: $phn(src=>country)\n");
dbg_pv_dump(30, "L_ERR");
}
kamailio will not start:
Mar 19 20:06:49 modcom-sbc-dev1 kamailio[5042]: 0(5044) DEBUG: <core>
[core/pvapi.c:494]: pv_spec_lookup(): PV <$phn(src=>country)> is not in
cache
Mar 19 20:06:49 modcom-sbc-dev1 kamailio[5042]: 0(5044) DEBUG: phonenum
[phonenum_pv.c:160]: pv_parse_phonenum_name(): phonenum [src] - key
[country]
Mar 19 20:06:49 modcom-sbc-dev1 kamailio[5042]: 0(5044) ERROR: phonenum
[phonenum_pv.c:205]: pv_parse_phonenum_name(): error at PV phonenum name:
src=>country
Mar 19 20:06:49 modcom-sbc-dev1 kamailio[5042]: 0(5044) ERROR: <core>
[core/pvapi.c:951]: pv_parse_spec2(): pvar "phn" has an invalid name param
[src=>country]
Mar 19 20:06:49 modcom-sbc-dev1 kamailio[5042]: 0(5044) ERROR: <core>
[core/pvapi.c:1106]: pv_parse_spec2(): wrong char [)/41] in
[$phn(src=>country)] at [17 (5)]
Mar 19 20:06:49 modcom-sbc-dev1 kamailio[5042]: 0(5044) ERROR: xlog
[xlog.c:513]: xdbg_fixup_helper(): wrong format[number country:
$phn(src=>country)
If I comment the offending line, all is well, but when dumping PVs with
dbg_pv_dump(30, "L_ERR");, only $phn(src=>number) is listed, not the other
keys (country, operator, region according to the docs)
However, what is more disturbing is that phn(src=>number) always contains
the string provided to phonenum_match() function, even if invalid
characters are included, with no normalization. For example:
phonenum_match("14~8%^88", "src")
will result in dbg_pv_dump reporting:
"$phn(src=>number)": "14~8%^88"
Please note that I'm using sipwise's debian repository for stretch for
kamailio, and debian's stable stretch repository for libphonenumnber
(currently at 7.1.0-5+b1). I have also tried building current
libphonenumber myself (version v8.9.2), but the result is the same.
Is this a bug? Or am I missing something? Thanks!
BR,
George
Hello there,
I have an htable with 3000 entries and when i try dump the htable through
the command kamcmd htable.dump htable, this command returns "ERROR: reply
too big".
I have tried to increase the body size using the following modparam:
modparam("ctl", "binrpc_max_body_size",1024)
But the result still the same "ERROR: reply too big", do I need to
configure another parameter to be able dump this htable?
The kamailio version that i'm using is 4.4.2
Thank you.
Regards
José Seabra
Hi,
I am new to Kamailio and coming a bit from the Asterisk side.
Currently I'm using the Amazon EC2 Infrastructure and set up an Kamailio
with standard configuration. EC2 uses Destination NAT on their side. Thus I
enabled WITH_NAT and WITH_NATSIPPING. I'm using the rtpproxy from master
branch of https://github.com/miconda/rtpproxy.
Besides those two parameters I also changed the listen parameter in the
Kamailio config:
listen=udp:10.0.0.221:5060 advertise 52.59.XXX.XXX:5060
My rtpproxy is running with following parameters:
./rtpproxy -A 52.59.XXX.XXX -F -l 10.0.0.221 -m 20000 -M 30000 -s
udp:*:7722 -d INFO
When I use two Softclients (Zoiper) on different Networks (with Source NAT
on the Firewall) the Softclient tries to transmit the RTP Packets to the
Public IP of the other Network. But the Client obviously thus doesn't get
the RTP Packets. Is there an easy and documented way to solve that issue?
If I understood it correctly Kamailio together with rtpproxy should be able
to receive the RTP Packets and forward them to the other client. So it
should signal the IP of the Kamailio to send the RTP packets to. Or am I on
the complete wrong way?
Regards,
Benjamin
Hi all,
I have kamailio setup that uses a mongo cluster, and everything works fine. Only I have problems with the avpops module. The avp_db_load fails with "field [attribute] not found in result iterator", even if the attribute field is present in the object in mongo. Does anybody know what could be going wrong?
Thanks in advance, and kind regards,
===============================================================================
kamailio.cfg:
...
# ---- avpops params ----
modparam("avpops", "db_url", DBURL)
modparam("avpops", "avp_table", "usr_preferences")
...
xlog("trying avp_db_load\n");
if (avp_db_load("$fu/username", "$avp(s:attributevalue)")) {
xlog("if succeeded\n");
}
xlog("if not succeeded\n");
...
===============================================================================
mongo:
rs:SECONDARY> db.usr_preferences.find({"username":"1234567890"})
{ "_id" : ObjectId("5ab22a5b384cd2aa0d4cf403"), "attribute" : "attributevalue", "username" : "1234567890", "domain" : null, "value" : "750", "uuid" : "", "type" : 0 }
===============================================================================
syslog:
...
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: <script>: trying avp_db_load
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:851]: db_mongodb_query(): query to collection [usr_preferences]
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:885]: db_mongodb_query(): query filter: { "username" : "1234567890", "attribute" : "attributevalue" }
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:904]: db_mongodb_query(): columns filter: { "value" : 1, "attribute" : 1, "type" : 1 }
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:116]: db_new_result(): allocate 56 bytes for result set at 0x7f43b613c480
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:349]: db_mongodb_get_columns(): 3 columns returned from the query
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:154]: db_allocate_columns(): allocate 24 bytes for result names at 0x7f43b613c318
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:165]: db_allocate_columns(): allocate 12 bytes for result types at 0x7f43b614d888
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:377]: db_mongodb_get_columns(): Found a field[0] named: value
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:396]: db_mongodb_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7f43b614d9b8
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:431]: db_mongodb_get_columns(): use DB1_STRING result type
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:460]: db_mongodb_get_columns(): RES_NAMES(0x7f43b614d9b8)[0]=[value] (2)
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:377]: db_mongodb_get_columns(): Found a field[1] named: attribute
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: db_mongodb [mongodb_dbase.c:381]: db_mongodb_get_columns(): field [attribute] not found in result iterator
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: db_mongodb [mongodb_dbase.c:739]: db_mongodb_store_result(): failed to set the columns
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: db_mongodb [mongodb_dbase.c:918]: db_mongodb_query(): failed to store result
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: db_mongodb [mongodb_dbase.c:927]: db_mongodb_query(): failed to do the query
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:79]: db_free_columns(): freeing 3 columns
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:83]: db_free_columns(): freeing RES_NAMES[0] at 0x7f43b614d9b8
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:92]: db_free_columns(): freeing result names at 0x7f43b613c318
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:97]: db_free_columns(): freeing result types at 0x7f43b614d888
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:134]: db_free_result(): freeing result set at 0x7f43b613c480
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: avpops [avpops_impl.c:381]: ops_dbload_avps(): db_load failed
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: <script>: if not succeeded
...
===============================================================================