Kamailio overwrites the Contact URI parameter during registration.

1,296 views
Skip to first unread message

Alan Evans

unread,
Apr 18, 2014, 2:02:32 PM4/18/14
to 2600h...@googlegroups.com
Hello Devs,

I'm experiencing a problem with terminating calls and it appears to be
because the Contact address sent
by the device during registration is being overwritten by Kamailio. I'm
loosing the URI parameter.
INVITEs are then being sent to the incorrect Contact destination.

I'm trying to get my head around the Kamailio scripts but it's slow going.

Anyone got a suggestion on how to investigate?

Regards
--
Alan R Evans
KAGE Systems Ltd

Darren Schreiber

unread,
Apr 18, 2014, 2:03:54 PM4/18/14
to 2600h...@googlegroups.com
What is the contact URI you are seeing, and what is the one you are
expecting?
>--
>You received this message because you are subscribed to the Google Groups
>"2600hz-dev" group.
>To unsubscribe from this group and stop receiving emails from it, send an
>email to 2600hz-dev+...@googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

Alan Evans

unread,
Apr 18, 2014, 2:27:46 PM4/18/14
to 2600h...@googlegroups.com
Hi Darren,

This is on a test network so it could well be my fault, I'm trying to
figure out how to debug the kamailio scripts without using loads of log
statements.

The device registers with a Contact:
<sip:2082200...@10.0.1.102:5061;pid=%3C0.31718.6%3E>

but Kazoo sends Invite to Contact:
sip:2082200...@10.0.1.102:5061;fs_path=sip:10.0.1.200:5060;lr;received='sip:10.0.1.102:5061'

Logs during registration:

Apr 18 19:15:45 kazoo dhclient: bound to 10.0.1.200 -- renewal in 1757
seconds.
Apr 18 19:15:45 kazoo kamailio[20459]: INFO: <script>:
13978449...@10.0.1.102|start|recieved UDP request REGISTER
sip:sip.kagesys.com
Apr 18 19:15:45 kazoo kamailio[20459]: INFO: <script>:
13978449...@10.0.1.102|log|source 10.0.1.102:5061
Apr 18 19:15:45 kazoo kamailio[20459]: INFO: <script>:
13978449...@10.0.1.102|log|from sip:2082200...@sip.kagesys.com
Apr 18 19:15:45 kazoo kamailio[20459]: INFO: <script>:
13978449...@10.0.1.102|log|to sip:2082200...@sip.kagesys.com
Apr 18 19:15:45 kazoo kamailio[20459]: INFO: <script>:
13978449...@10.0.1.102|log|originated from external sources
Apr 18 19:15:45 kazoo kamailio[20459]: INFO: <script>:
13978449...@10.0.1.102|log|correcting NATed contact in registration
Apr 18 19:15:45 kazoo kamailio[20459]: INFO: <script>:
13978449...@10.0.1.102|end|issued new auth challenge to new
registration attempt
Apr 18 19:15:48 kazoo kamailio[20460]: INFO: <script>:
13978449...@10.0.1.102|start|recieved UDP request REGISTER
sip:sip.kagesys.com
Apr 18 19:15:48 kazoo kamailio[20460]: INFO: <script>:
13978449...@10.0.1.102|log|source 10.0.1.102:5061
Apr 18 19:15:48 kazoo kamailio[20460]: INFO: <script>:
13978449...@10.0.1.102|log|from sip:2082200...@sip.kagesys.com
Apr 18 19:15:48 kazoo kamailio[20460]: INFO: <script>:
13978449...@10.0.1.102|log|to sip:2082200...@sip.kagesys.com
Apr 18 19:15:48 kazoo kamailio[20460]: INFO: <script>:
13978449...@10.0.1.102|log|originated from external sources
Apr 18 19:15:48 kazoo kamailio[20460]: INFO: <script>:
13978449...@10.0.1.102|log|correcting NATed contact in registration
Apr 18 19:15:48 kazoo kamailio[20460]: INFO: <script>:
13978449...@10.0.1.102|end|successful registration with contact
<sip:2082200...@10.0.1.102:5061;pid=%3C0.31718.6%3E>
Apr 18 19:15:48 kazoo 2600hz[12894]:
|13978449...@10.0.1.102|ecallmgr_registrar:119 (<0.9800.1>)
inserted registration 2082200...@sip.kagesys.com with contact
"208220000000015"
sip:2082200...@10.0.1.102:5061;fs_path=sip:10.0.1.200:5060;lr;received='sip:10.0.1.102:5061'


Logs during call attempt:

Apr 18 19:16:03 kazoo 2600hz[12894]: |undefined|ecallmgr_registrar:147
(<0.9879.1>) found user 2082200...@sip.kagesys.com contact
"208220000000015"
sip:2082200...@10.0.1.102:5061;fs_path=sip:10.0.1.200:5060;lr;received='sip:10.0.1.102:5061'
Apr 18 19:16:04 kazoo kamailio[20461]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|start|recieved UDP request INVITE
sip:2082200...@10.0.1.102:5061
Apr 18 19:16:04 kazoo kamailio[20461]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|log|source 10.0.1.200:5065
Apr 18 19:16:04 kazoo kamailio[20461]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|log|from sip:2082200...@10.0.1.200
Apr 18 19:16:04 kazoo kamailio[20461]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|log|to
sip:2082200...@10.0.1.102:5061
Apr 18 19:16:04 kazoo kamailio[20461]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|log|originated from internal sources
Apr 18 19:16:04 kazoo kamailio[20461]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|pass|10.0.1.200:5060 -> 10.0.1.102:5061
Apr 18 19:16:04 kazoo kamailio[20463]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|log|external reply 100
Apr 18 19:16:04 kazoo kamailio[20463]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|log|route[NAT_TEST_AND_CORRECT] running
Apr 18 19:16:04 kazoo kamailio[20462]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|log|external reply 500
Apr 18 19:16:04 kazoo kamailio[20462]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|log|route[NAT_TEST_AND_CORRECT] running
Apr 18 19:16:04 kazoo kamailio[20462]: INFO: <script>:
ff065b30-b1dc-411f-bebe-2d5d4802b203|start|recieved UDP request ACK
sip:2082200...@10.0.1.102:5061
Apr 18 19:16:04 kazoo 2600hz[1334]:
|17554b00a42d7b5bMDcwYTBlZTVmZTRiOWJiNjUyM2FkOWI3YWQyZDkyNzI.|whapps_call_command:1824
(<0.2888.84>) bridge completed with result NORMAL_TEMPORARY_FAILURE(fail)


Regards
--
Alan R Evans
KAGE Systems Ltd
Tel: +44 7891 773415

Alan Evans

unread,
Apr 18, 2014, 2:49:22 PM4/18/14
to 2600h...@googlegroups.com
FYI: I've managed to build and load the kamailo debugger module and
enable cfgtrace.
Hopefully now I'll be able to see whats going on.

Regards
--
Alan R Evans
KAGE Systems Ltd

Darren Schreiber

unread,
Apr 20, 2014, 3:14:29 PM4/20/14
to 2600h...@googlegroups.com
I think the db_kazoo module may actually be stripping these, as we don¹t
generally use/maintain the tags added to contact headers. Most phones and
devices don¹t require it.

Interesting.

Please file this as a bug and we can try to look into it -
http://tickets.2600hz.com/

Alan Evans

unread,
Apr 29, 2014, 11:29:56 AM4/29/14
to 2600h...@googlegroups.com
Hi Darren,

I've modified kamailio/modules/db_kazoo/dbase.c to use the 'contact'
field rather than the 'user' field to populate the "Contact" info in the
AMQP Register notice msg.
This seems to fix my problem.

Are you aware of any reasons why 'user' was being used instead of
'contact'?

Regards
--
Alan R Evans
KAGE Systems Ltd
Tel: +44 7891 773415

On 20/04/2014 08:14:PM, Darren Schreiber wrote:
> I think the db_kazoo module may actually be stripping these, as we donšt
> generally use/maintain the tags added to contact headers. Most phones and
> devices donšt require it.

Darren Schreiber

unread,
Apr 29, 2014, 11:32:57 AM4/29/14
to 2600h...@googlegroups.com
Not sure why. Would have to defer to Anca or Karl. I believe Anca
developed that portion of the module.

Your change sounds reasonable but could have far-reaching effects so will
need some testing. The pull request is super appreciated. Thanks for
digging into this.

I will ask someone on our side to review it and accept it.

Alan Evans

unread,
Apr 29, 2014, 5:07:23 PM4/29/14
to 2600h...@googlegroups.com
Hi Darren,

Do you have any build instructions for kazoo-kamailio.
I'm currently using the instructions that was in kamailio-qa [1]
It builds fine but doesn't run and I can't seem to get any more debug info out.

[root@kazoo kamailio]# ./sbin/kamailio -c

loading modules under /usr/lib64/kamailio/modules/
 0(21676) WARNING: <core> [cfg.y:3544]: warn_at(): warning in config file /opt/kamailio//etc/kamailio/default.cfg, line 560, column 16-52: constant value in if(...)
1 config warnings
-ROLE-ROLE-ROLE-ROLE-TRAVERSAL-ROLE-FILTER-ROLE-TRAVERSAL-ROLE-FILTER-ROLE-FILTER-ROLE-ROLE-TRAVERSAL-ROLE-TRAVERSAL-ROLE-LOADED-DB-KAZOO-ROLE-FILTER-ROLE-ROLE-ROLE-ROLE-FILTER-ROLE-FILTER-ROLE-TRAVERSAL-ROLE-TRAVERSAL-ROLE-ROLE-ROLE-TRAVERSAL-ROLE-DB-KAZOO-ROLE-ROLEListening on

config file ok, exiting...


[root@kazoo kamailio]# ./sbin/kamailio -d -D 1

loading modules under /usr/lib64/kamailio/modules/
1 config warnings
-ROLE-ROLE-ROLE-ROLE-TRAVERSAL-ROLE-FILTER-ROLE-TRAVERSAL-ROLE-FILTER-ROLE-FILTER-ROLE-ROLE-TRAVERSAL-ROLE-TRAVERSAL-ROLE-LOADED-DB-KAZOO-ROLE-FILTER-ROLE-ROLE-ROLE-ROLE-FILTER-ROLE-FILTER-ROLE-TRAVERSAL-ROLE-TRAVERSAL-ROLE-ROLE-ROLE-TRAVERSAL-ROLE-DB-KAZOO-ROLE-ROLEListening on


ERROR: error while initializing modules



[1] cat kamailio/build_kamailio.sh

EXCLUDE_MODULES="alias_db \
path \
cfg_rpc \
corex \
mi_rpc \
async \
auth_diameter \
avpops \
avp \
benchmark \
blst \
call_control \
cfg_db \
counters \
db2_ops \
db_cluster \
db_flatstore \
debugger \
diversion \
dmq \
domainpolicy \
domain \
drouting \
enum \
exec \
group \
imc \
ipops \
malloc_test \
mangler \
matrix \
mediaproxy \
mi_datagram \
mqueue \
msilo \
msrp \
mtree \
nat_traversal \
pdb \
pdt \
pipelimit \
prefix_route \
print_lib \
print \
p_usrloc \
qos \
ratelimit \
rtimer \
rtpproxy \
sca \
sdpops \
seas \
sipcapture \
siptrace \
sms \
speeddial \
sqlops \
sst \
statistics \
timer \
tmrec \
topoh \
uid_auth_db \
uid_avp_db \
uid_domain \
uid_gflags \
uid_uri_db \
uri_db \
userblacklist \
xhttp_rpc \
xhttp \
xprint"

INCLUDE_MODULES="pua_dialoginfo \
presence \
presence_dialoginfo"
##  snmpstats"

make FLAVOUR=kamailio cfg skip_modules="${EXCLUDE_MODULES}" include_modules="${INCLUDE_MODULES}" prefix=/opt/kamailio/ modules_dirs="modules"

make install


Regards
-- 
Alan R Evans
KAGE Systems Ltd

James Aimonetti

unread,
Apr 29, 2014, 7:04:48 PM4/29/14
to 2600h...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Alan,

The kazoo-kamailio repo no longer needs the kamailio-qa patch, afaik.
I'm building it similarly to your build_kamailio.sh script, so not
sure why you're having issues.

Did you symlink /etc/kazoo/kamailio into /opt/kamailio/etc/ ?

Do you have the .so files in /opt/kamailio/lib64/kamailio/modules/ ?

Hopefully Luis or Karl will chime in with some more authority though.

On 04/29/2014 02:07 PM, Alan Evans wrote:
> Hi Darren,
>
> Do you have any build instructions for kazoo-kamailio. I'm
> currently using the instructions that was in kamailio-qa [1] It
> builds fine but doesn't run and I can't seem to get any more debug
> info out.
>
> [root@kazoo kamailio]# ./sbin/kamailio -c
>
> loading modules under /usr/lib64/kamailio/modules/ 0(21676)
> WARNING: <core> [cfg.y:3544]: warn_at(): warning in config file
> /opt/kamailio//etc/kamailio/default.cfg, line 560, column 16-52:
> constant value in if(...) 1 config warnings
> -ROLE-ROLE-ROLE-ROLE-TRAVERSAL-ROLE-FILTER-ROLE-TRAVERSAL-ROLE-FILTER-ROLE-FILTER-ROLE-ROLE-TRAVERSAL-ROLE-TRAVERSAL-ROLE-LOADED-DB-KAZOO-ROLE-FILTER-ROLE-ROLE-ROLE-ROLE-FILTER-ROLE-FILTER-ROLE-TRAVERSAL-ROLE-TRAVERSAL-ROLE-ROLE-ROLE-TRAVERSAL-ROLE-DB-KAZOO-ROLE-ROLEListening
>
>
on
>
> *config file ok, exiting...*
>
>
> [root@kazoo kamailio]# ./sbin/kamailio -d -D 1
>
> loading modules under /usr/lib64/kamailio/modules/ 1 config
> warnings
> -ROLE-ROLE-ROLE-ROLE-TRAVERSAL-ROLE-FILTER-ROLE-TRAVERSAL-ROLE-FILTER-ROLE-FILTER-ROLE-ROLE-TRAVERSAL-ROLE-TRAVERSAL-ROLE-LOADED-DB-KAZOO-ROLE-FILTER-ROLE-ROLE-ROLE-ROLE-FILTER-ROLE-FILTER-ROLE-TRAVERSAL-ROLE-TRAVERSAL-ROLE-ROLE-ROLE-TRAVERSAL-ROLE-DB-KAZOO-ROLE-ROLEListening
>
>
on
>
> * **ERROR: error while initializing modules*
>
>
>
> [1] cat kamailio/build_kamailio.sh
>
> EXCLUDE_MODULES="alias_db \ path \ cfg_rpc \ corex \ mi_rpc \ async
> \ auth_diameter \ avpops \ avp \ benchmark \ blst \ call_control \
> cfg_db \ counters \ db2_ops \ db_cluster \ db_flatstore \ debugger
> \ diversion \ dmq \ domainpolicy \ domain \ drouting \ enum \ exec
> \ group \ imc \ ipops \ malloc_test \ mangler \ matrix \ mediaproxy
> \ mi_datagram \ mqueue \ msilo \ msrp \ mtree \ nat_traversal \ pdb
> \ pdt \ pipelimit \ prefix_route \ print_lib \ print \ p_usrloc \
> qos \ ratelimit \ rtimer \ rtpproxy \ sca \ sdpops \ seas \
> sipcapture \ siptrace \ sms \ speeddial \ sqlops \ sst \ statistics
> \ timer \ tmrec \ topoh \ uid_auth_db \ uid_avp_db \ uid_domain \
> uid_gflags \ uid_uri_db \ uri_db \ userblacklist \ xhttp_rpc \
> xhttp \ xprint"
>
> INCLUDE_MODULES="pua_dialoginfo \ presence \ presence_dialoginfo"
> ## snmpstats"
>
> make FLAVOUR=kamailio cfg skip_modules="${EXCLUDE_MODULES}"
> include_modules="${INCLUDE_MODULES}" prefix=/opt/kamailio/
> modules_dirs="modules"
>
> make install
>
> Regards


- --
James Aimonetti
Lead Systems Architect / Impressionable Scallywag
"I thought I fixed that"

2600Hz | http://2600hz.com
sip:ja...@2600hz.com
tel:415.886.7905
irc:mc_ @ freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlNgMBAACgkQ54NxaUq7OmA2dQD/VRFbYnD9lwwn+GLuAKzvBfC5
QR0QYmH/MUS+lnzywHMA/RdgGaIBnOmWg/azKAPEA34QtEJXTek7o4yp6+pnVSAW
=73Iu
-----END PGP SIGNATURE-----

Alan Evans

unread,
Apr 30, 2014, 7:44:09 AM4/30/14
to 2600h...@googlegroups.com
Hi James,

The actual errors were in syslog not dumped out on stderr even though I
used the -d flag.

Apr 30 12:40:15 kazoo kamailio: INFO: <core> [tcp_main.c:4846]:
init_tcp(): init_tcp: using epoll_lt as the io watch method (auto detected)
Apr 30 12:40:15 kazoo kamailio: INFO: rr [../outbound/api.h:49]:
ob_load_api(): Failed to import bind_ob
Apr 30 12:40:15 kazoo kamailio: INFO: rr [rr_mod.c:159]: mod_init():
outbound module not available
Apr 30 12:40:15 kazoo kamailio: INFO: pike [pike.c:115]: pike_init():
PIKE - initializing
Apr 30 12:40:15 kazoo kamailio: INFO: pike [ip_tree.c:88]:
init_lock_set(): probing 256 set size
Apr 30 12:40:15 kazoo kamailio: INFO: auth [auth_mod.c:350]: mod_init():
auth: qop set, but nonce-count (nc_enabled) support disabled
Apr 30 12:40:15 kazoo kamailio: INFO: usrloc [hslot.c:53]:
ul_init_locks(): locks array size 512
Apr 30 12:40:15 kazoo kamailio: ERROR: db_kazoo [blf.c:145]:
dbk_initialize_presence(): Can't find bind pua
Apr 30 12:40:15 kazoo kamailio: ERROR: db_kazoo [dbase.c:138]:
db_kazoo_new_connection(): Failed to initialize db_kazoo for presence
Apr 30 12:40:15 kazoo kamailio: ERROR: <core> [db.c:322]: db_do_init2():
could not add connection to the pool
Apr 30 12:40:15 kazoo kamailio: ERROR: presence [presence.c:318]:
mod_init(): Connection to database failed
Apr 30 12:40:15 kazoo kamailio: ERROR: <core> [sr_module.c:939]:
init_mod(): init_mod(): Error while initializing module presence
(/usr/lib64/kamailio/modules/presence.so)

Still looking into why this is happening.

Regards
--
Alan R Evans
KAGE Systems Ltd

Alan Evans

unread,
Apr 30, 2014, 9:22:23 AM4/30/14
to 2600h...@googlegroups.com
Hi James,

So it looks likes kazoo-kamailio v4.0 now uses the pua module.
I've added this to the included modules and rebuilt.
I then added  loadmodule "pua.so" to presence-role.cfg
Now I get this error:

Apr 30 13:57:21 kazoo kamailio: INFO: <core> [tcp_main.c:4846]: init_tcp(): init_tcp: using epoll_lt as the io watch method (auto detected)
Apr 30 13:57:21 kazoo kamailio: INFO: rr [../outbound/api.h:49]: ob_load_api(): Failed to import bind_ob
Apr 30 13:57:21 kazoo kamailio: INFO: rr [rr_mod.c:159]: mod_init(): outbound module not available
Apr 30 13:57:21 kazoo kamailio: INFO: pike [pike.c:115]: pike_init(): PIKE - initializing
Apr 30 13:57:21 kazoo kamailio: INFO: pike [ip_tree.c:88]: init_lock_set(): probing 256 set size
Apr 30 13:57:21 kazoo kamailio: INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but nonce-count (nc_enabled) support disabled
Apr 30 13:57:21 kazoo kamailio: INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 512
Apr 30 13:57:21 kazoo kamailio: ERROR: <core> [db.c:81]: db_check_api(): module db_mysql does not export db_use_table function
Apr 30 13:57:21 kazoo kamailio: ERROR: pua [pua.c:194]: mod_init(): Database module not found
Apr 30 13:57:21 kazoo kamailio: ERROR: <core> [sr_module.c:939]: init_mod(): init_mod(): Error while initializing module pua (/usr/lib64/kamailio/modules/pua.so)


I assume I need some modparam() commands in order to configure the pua module but I've no idea what these should be.
Still looking.

Regards
-- 
Alan R Evans
KAGE Systems Ltd
On 30/04/2014 12:44:PM, Alan Evans wrote:

Luis Azedo

unread,
Apr 30, 2014, 9:30:16 AM4/30/14
to 2600h...@googlegroups.com
Hi Alan,

if you are building from kazoo-kamailio then you must also use kazoo-configs for that upcoming version.
check kazoo-configs on github (branch KAZOO-1513 )

we are starting to use  pua (and other modules) to improve bls / mwi experience.

cheers



--
You received this message because you are subscribed to the Google Groups "2600hz-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Luis Azedo


Alan Evans

unread,
Apr 30, 2014, 9:34:56 AM4/30/14
to 2600h...@googlegroups.com
Thanks Luis,

I'll take a look.

Regards
-- 
Alan R Evans
KAGE Systems Ltd

Alan Evans

unread,
Apr 30, 2014, 10:17:00 AM4/30/14
to 2600h...@googlegroups.com
Now I'm getting close.
I'm using the kamailio config files in branch KAZOO-1513, thanks Luis.


Apr 30 14:50:21 kazoo kamailio: INFO: rr [../outbound/api.h:49]: ob_load_api(): Failed to import bind_ob
Apr 30 14:50:21 kazoo kamailio: INFO: rr [rr_mod.c:159]: mod_init(): outbound module not available
Apr 30 14:50:21 kazoo kamailio: INFO: pike [pike.c:115]: pike_init(): PIKE - initializing
Apr 30 14:50:21 kazoo kamailio: INFO: pike [ip_tree.c:88]: init_lock_set(): probing 256 set size
Apr 30 14:50:21 kazoo kamailio: INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but nonce-count (nc_enabled) support disabled
Apr 30 14:50:21 kazoo kamailio: INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 512
Apr 30 14:50:21 kazoo kamailio: INFO: db_text [dbt_base.c:99]: dbt_init(): using database at: /etc/kazoo/kamailio/dbtext
Apr 30 14:50:21 kazoo kamailio: ERROR: db_text [dbt_lib.c:123]: dbt_cache_get_db(): dbtext cache is not initialized! Check if you loaded dbtext before any other module that uses it
Apr 30 14:50:21 kazoo kamailio: ERROR: db_text [dbt_base.c:103]: dbt_init(): cannot get the link to database
Apr 30 14:50:21 kazoo kamailio: ERROR: pua [pua.c:206]: mod_init(): while connecting database
Apr 30 14:50:21 kazoo kamailio: ERROR: <core> [sr_module.c:939]: init_mod(): init_mod(): Error while initializing module pua (/usr/lib64/kamailio/modules/pua.so)


The dbtext files exist and db_text module is loaded in default.cfg:

 ls -l /etc/kazoo/kamailio/dbtext
total 32
-rw-r--r-- 1 root root  75 Apr 30 14:38 address
-rw-r--r-- 1 root root 366 Apr 30 14:38 dispatcher
-rw-r--r-- 1 root root  86 Apr 30 14:38 trusted
-rw-r--r-- 1 root root  58 Apr 30 14:38 version




Regards
-- 
Alan R Evans
KAGE Systems Ltd

Luis Azedo

unread,
Apr 30, 2014, 10:54:54 AM4/30/14
to 2600h...@googlegroups.com
try to add the attached file to /etc/kazoo/kamailio/dbtext

also, edit "version" file and add
pua:7

pua

Alan Evans

unread,
Apr 30, 2014, 11:06:37 AM4/30/14
to 2600h...@googlegroups.com
Hi Luis,

thanks for the suggestion, unfortunately I still get the same error.
I suspect I would have this issue next so many thanks.

Apr 30 16:05:35 kazoo kamailio[12435]: INFO: db_text [dbt_base.c:99]: dbt_init(): using database at: /etc/kazoo/kamailio/dbtext
Apr 30 16:05:35 kazoo kamailio[12435]: ERROR: db_text [dbt_lib.c:123]: dbt_cache_get_db(): dbtext cache is not initialized! Check if you loaded dbtext before any other module that uses it
Apr 30 16:05:35 kazoo kamailio[12435]: ERROR: db_text [dbt_base.c:103]: dbt_init(): cannot get the link to database
Apr 30 16:05:35 kazoo kamailio[12435]: ERROR: pua [pua.c:206]: mod_init(): while connecting database
Apr 30 16:05:35 kazoo kamailio[12435]: ERROR: <core> [sr_module.c:939]: init_mod(): init_mod(): Error while initializing module pua (/usr/lib64/kamailio/modules/pua.so)


Regards
-- 
Alan R Evans
KAGE Systems Ltd

Luis Azedo

unread,
Apr 30, 2014, 11:09:39 AM4/30/14
to 2600h...@googlegroups.com
are you using the new configs for kamailio from KAZOO-1513 or did you make some modifications ?

Alan Evans

unread,
Apr 30, 2014, 11:15:30 AM4/30/14
to 2600h...@googlegroups.com
I'm using the configs for KAZOO-1513 without any modifications.
Regards
-- 
Alan R Evans
KAGE Systems Ltd
Tel: +44 7891 773415

James Aimonetti

unread,
Apr 30, 2014, 11:32:03 AM4/30/14
to 2600h...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hopefully not too obvious, but RabbitMQ is running and accessible to
Kamailio, yes?

On 04/30/2014 08:15 AM, Alan Evans wrote:
> I'm using the configs for KAZOO-1513 without any modifications.
>
> Regards


- --
James Aimonetti
Lead Systems Architect / Impressionable Scallywag
"I thought I fixed that"

2600Hz | http://2600hz.com
sip:ja...@2600hz.com
tel:415.886.7905
irc:mc_ @ freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlNhF3MACgkQ54NxaUq7OmD4tgD/VLgBZ9do0TTYUzkiDZM+LDiN
H2EVlD3DW/rXrlwgbFkA+wTJ3da4b4QTozGT5dSV9guNjS59iek/0onxEeMg9KgW
=78bF
-----END PGP SIGNATURE-----

Luis Azedo

unread,
Apr 30, 2014, 11:37:23 AM4/30/14
to 2600h...@googlegroups.com
think i got it!

in default.cfg

####### DB Text module ##########
loadmodule "db_text.so"
modparam("db_text", "db_mode", 1)

to be right before

#!ifdef TLS-ROLE
####### TLS Parameters #########
enable_tls = yes
loadmodule "tls.so"
modparam("tls", "config", "/etc/kazoo/kamailio/tls.cfg")
#!endif



Alan Evans

unread,
Apr 30, 2014, 11:41:56 AM4/30/14
to 2600h...@googlegroups.com
Yeah!!
Thanks Luis that was the problem.

db_text was being loaded too late.

I moved it to where you suggested and now kamailio runs fine.

I can finally issue my pull request!

Regards
-- 
Alan R Evans
KAGE Systems Ltd

Luis Azedo

unread,
Apr 30, 2014, 11:46:14 AM4/30/14
to 2600h...@googlegroups.com
i pushed the updated default.cfg to KAZOO-1513

Thanh Luong

unread,
May 7, 2014, 1:28:25 AM5/7/14
to 2600h...@googlegroups.com
Hi everyone,
I have same error:
May  7 01:22:11 localhost kamailio[9206]: ERROR: db_kazoo [blf.c:145]: dbk_initialize_presence(): Can't find bind pua
May  7 01:22:11 localhost kamailio[9206]: ERROR: db_kazoo [dbase.c:138]: db_kazoo_new_connection(): Failed to initialize db_kazoo for presence
May  7 01:22:11 localhost kamailio[9206]: ERROR: <core> [db.c:322]: db_do_init2(): could not add connection to the pool
May  7 01:22:11 localhost kamailio[9206]: ERROR: presence [presence.c:318]: mod_init(): Connection to database failed
May  7 01:22:11 localhost kamailio[9206]: ERROR: <core> [sr_module.c:939]: init_mod(): init_mod(): Error while initializing module presence (/opt/kamailio/lib64/kamailio/modules/presence.so)

I read it, but don't know how to fix them. I find in:
https://github.com/2600hz/kazoo-kamailio/tree/KAZOO-1513
but, don't how to get files: kazoo-conf
I install kamailio from: kazoo-kamialio
Please, help me more.
Thanks.

Alan Evans

unread,
May 7, 2014, 6:53:17 PM5/7/14
to 2600h...@googlegroups.com
Hello Thanh,

Does this help you?

[root@freeswitch-1a ~]# git clone https://github.com/2600hz/kazoo-configs.git
Initialized empty Git repository in /root/kazoo-configs/.git/
remote: Reusing existing pack: 1280, done.
remote: Total 1280 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1280/1280), 237.58 KiB, done.
Resolving deltas: 100% (663/663), done.

[root@freeswitch-1a ~]# cd kazoo-configs
[root@freeswitch-1a kazoo-configs]# git branch -a
* master
  remotes/origin/3.0
  remotes/origin/HEAD -> origin/master
  remotes/origin/KAZOO-1513
  remotes/origin/KAZOO-573
  remotes/origin/KAZOO-929
  remotes/origin/deploy
  remotes/origin/master

[root@freeswitch-1a kazoo-configs]# git checkout KAZOO-1513
Branch KAZOO-1513 set up to track remote branch KAZOO-1513 from origin.
Switched to a new branch 'KAZOO-1513'

[root@freeswitch-1a kazoo-configs]# ls -l kamailio/
total 80
drwxr-xr-x. 2 root root  4096 May  7 18:48 certs
drwxr-xr-x. 2 root root  4096 May  7 18:48 dbtext
-rw-r--r--. 1 root root 16638 May  7 18:48 default.cfg
-rw-r--r--. 1 root root  6289 May  7 18:48 dispatcher-role.cfg
-rw-r--r--. 1 root root   349 May  7 18:48 kamailio.cfg
-rw-r--r--. 1 root root  2886 May  7 18:48 kamctlrc
-rw-r--r--. 1 root root  1717 May  7 18:48 local.cfg
-rw-r--r--. 1 root root   967 May  7 18:48 nat-traversal-role.cfg
-rw-r--r--. 1 root root  1422 May  7 18:48 presence-role.cfg
-rw-r--r--. 1 root root  4816 May  7 18:48 registrar-role.cfg
-rw-r--r--. 1 root root   266 May  7 18:48 roles.cfg
-rw-r--r--. 1 root root   871 May  7 18:48 substdef.cfg
-rw-r--r--. 1 root root  1595 May  7 18:48 tls.cfg
-rw-r--r--. 1 root root  2518 May  7 18:48 websockets-role.cfg

[root@freeswitch-1a kazoo-configs]# grep pua kamailio/*
kamailio/presence-role.cfg:loadmodule "pua_dialoginfo.so"
kamailio/presence-role.cfg:modparam("pua_dialoginfo", "library_mode", 1)
kamailio/presence-role.cfg:loadmodule "pua.so"
kamailio/presence-role.cfg:modparam("pua", "db_url", "text:///etc/kazoo/kamailio/dbtext")
kamailio/presence-role.cfg:modparam("pua", "db_mode", 0)
kamailio/presence-role.cfg:modparam("pua", "outbound_proxy", "sip:MY_IP_ADDR")
kamailio/presence-role.cfg:modparam("pua", "min_expires", 300)
[root@freeswitch-1a kazoo-configs]#


Regards
-- 
Alan R Evans
KAGE Systems Ltd
On 07/05/2014 06:28:AM, Thanh Luong wrote:

Thanh Luong

unread,
May 8, 2014, 12:56:19 AM5/8/14
to 2600h...@googlegroups.com
Hi Alan Evans,
Thanks for Rep.
I have done install kamailio and i made REGISTER so OK.
Can you help me for make call??
-----
Here is Fs' log when I Invite:
2014-05-08 00:50:04.594112 [DEBUG] sofia.c:7809 1 acls to check for proxy
2014-05-08 00:50:04.594112 [DEBUG] sofia.c:7814 checking 192.168.1.164 against acl authoritative
2014-05-08 00:50:04.594112 [DEBUG] sofia.c:7854 IP 192.168.1.164 Rejected by acl "authoritative". Falling back to Digest auth.
2014-05-08 00:50:04.594112 [WARNING] sofia_reg.c:2515 Can't find user [123...@192.168.1.164] from 192.168.1.164
You must define a domain called '192.168.1.164' in your directory and add a user with the id="123456" attribute
and you must configure your device to use the proper domain in it's authentication credentials.
2014-05-08 00:50:04.594112 [WARNING] sofia_reg.c:1469 SIP auth failure (INVITE) on sofia profile 'sipinterface_1' for [88...@192.168.1.164] from ip 192.168.1.164
----
Here is ecallmgc conf:
{
   "fs_nodes": [
       "frees...@localhost.localdomain"
   ],
   "syslog_log_level": "info",
   "fs_cmds": [
       {
           "load": "mod_sofia"
       },
       {
           "reloadacl": ""
       }
   ],
   "acls": {
       "Kamailio": {
           "type": "allow",
           "network-list-name": "authoritative",
           "cidr": "192.168.1.164/32"
       }
   },
   "authz_enabled": "false",
   "default_ringback": "%(2000,4000,440,480)",
   "distribute_presence": true,
   "distribute_message_query": false,
   "node_down_grace_period": 10000,
   "authz_dry_run": false,
   "fax_file_path": "/tmp/",
   "default_recording_extension": ".mp3",
   "recording_file_path": "/tmp/",
   "record_waste_resources": false,
   "default_fax_extension": ".tiff",
   "default_realm": "nodomain.com"
}
--------------
File acl.conf I don't conf:
<configuration name="acl.conf" description="Network Lists">
    <network-lists>
        <list name="trusted" default="deny">
            <X-PRE-PROCESS cmd="include" data="/etc/freeswitch/carriers.xml"/>
        </list>
        <list name="authoritative" default="deny">
        </list>
    </network-lists>
</configuration>
------------
Why I can't make call between two softphone ????


Thanh Luong

unread,
May 8, 2014, 12:57:59 AM5/8/14
to 2600h...@googlegroups.com
My  Freeswitch: 192.168.1.164:5090
 Kamailio: 192.168.1.164:5060

Thanks,
Thanh Luong
Reply all
Reply to author
Forward
0 new messages