[SR-Users] Having trouble Setup Kamailio as a load balancer for Asterisk servers using module dispatcher

Henning Westerholt hw at skalatan.de
Tue Nov 10 09:41:24 CET 2020


Hello,

this looks somehow like a dialplan issue from Asterisk side:


when i dial 8100 to 8101 i get in my asteris -r

NOTICE[8453][C-0000000b]: chan_sip.c:26002 handle_request_invite: Call from '8101' (95.217.223.95:5060<http://95.217.223.95:5060>) to extension '8100' rejected because extension not found in context 'none-dial'.

and not able to call extension to extension,

See if you find something in the net with the quoted error message. Maybe if the issue is more from Asterisk side, try with a simple example without the Kamailio and then adding the Kamailio again when its works from Asterisk side.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Usama Shaikh
Sent: Monday, November 9, 2020 6:16 PM
To: sr-users at lists.kamailio.org
Subject: [SR-Users] Having trouble Setup Kamailio as a load balancer for Asterisk servers using module dispatcher

Hello Everyone.

I am having trouble to setting up kamailio for load balancing for asterisk servers.

I am using module dispatcher for load balancing AND two different servers for kamailio and asterisk.

I am doing it first time and have not exact idea about its all configs… but i have researched and done so far, now need help from you guys. Currently, trying to setup with the one kamailio and one asterisk then will go ahead if I get any success…
using MariaDB MySQL for the dispatcher data.

Simply I want to do is :

1. Register my asterisk devices with kamailioIP (and I am able to do this using below configs)
Devices are getting register with the asterisk from with kamailioIP

2. I want to receive calls on the registered devices with KamailioIP (and i am not able to do this)

WORK FLOW:

KAMAILIO IP = XX.XX.XX.95 on port 5060 and Asterisk IP = XX.XX.XX.164 on port 5060

SIP Device(ZOIPER) -------->>>>KAMAILIO SERVER(device register/load balancer)--------->>> ASTERISK SERVER

Please have a look into my configuration files and let me know if anything is missing or wrong in these. Or anything to add or remove from the confs…

my kamailio.cfg

[….]


“kamctl dispatcher dump” looks like this:

{
"jsonrpc": "2.0",
"result": {
"NRSETS": 1,
"RECORDS": [{
"SET": {
"ID": 1,
"TARGETS": [{
"DEST": {
"URI": "sip:ASTERISKIP:5060",
"FLAGS": "AP",
"PRIORITY": 1,
"ATTRS": {
"BODY": "rweight=50;weight=50;cc=1",
"DUID": "",
"MAXLOAD": 0,
"WEIGHT": 50,
"RWEIGHT": 50,
"SOCKET": "",
"SOCKNAME": "",
"OBPROXY": ""
}
}
}]
}
}]
},
"id": 13403
}

And also have set trunk in ASTERISK sip.conf

register => kamailioSIP:XXXX at KamailioIP:5060

[kamailio]
type=friend
host= KamailioIP
port=5060
transport=udp
allow=all
allow=gsm
allow=alaw,ulaw
insecure=invite,port
Permit = 0.0.0.0/0.0.0.0<http://0.0.0.0/0.0.0.0>
sipdebug=yes
username=kamailioSIP
canreinvite=no
secret=XXXX
qualify=yes
dtmfmode=auto



when i Register my asterisk devices with kamailioIP (and I am able to do this)
Devices are getting register with the asterisk from with kamailioIP asterisk -r : (here 8101 and 8100 is registered with Kamailio IP )

[Nov 9 10:36:02] -- Registered SIP '8101' at XX.XX.XX.95:5060
[Nov 9 10:36:02] -- Unregistered SIP '8101'
[Nov 9 10:36:03] -- Registered SIP '8101' at XX.XX.XX..95:5060
[Nov 9 10:36:03] == Manager 'listencron' logged on from 127.0.0.1
[Nov 9 10:36:04] == Manager 'sendcron' logged off from 127.0.0.1
[Nov 9 10:36:07] -- Unregistered SIP '8100'
[Nov 9 10:36:09] -- Registered SIP '8100' at XX.XX.XX..95:5060
[Nov 9 10:36:09] > Saved useragent "Z 3.15.40006 rv2.8.20" for peer 8100
[Nov 9 10:36:09] NOTICE[8453]: chan_sip.c:23869 handle_response_peerpoke: Peer '8100' is now
Reachable. (51ms / 2000ms)


when i dial 8100 to 8101 i get in my asteris -r

NOTICE[8453][C-0000000b]: chan_sip.c:26002 handle_request_invite: Call from '8101' (95.217.223.95:5060<http://95.217.223.95:5060>) to extension '8100' rejected because extension not found in context 'none-dial'.

and not able to call extension to extension,


PLEASE HELP to do this, I have search a lot and tried so much of stuff in configs but no success still kindly guide me if anything I am missing to do in the process or anything I am doing wrong.
I will be eagerly waiting for any help or pointer…

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201110/fcd8d9b5/attachment.htm>


More information about the sr-users mailing list