trouble Setting Kamailio as a load balancer for Asterisk

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

trouble Setting Kamailio as a load balancer for Asterisk

Postby Usama Shaikh » Mon Nov 09, 2020 10:23 am

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

#!KAMAILIO

#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_ASTERISK
#define WITH_NAT
#!define WITH_DEBUG
#!define WITH_USRLOCDB


#
# Kamailio (OpenSER) SIP Server v3.3 - default configuration script
# - web: http://www.kamailio.org
# - git: http://sip-router.org
#
# Direct your questions about this file to: <sr-users@lists.sip-router.org>
#
# Refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php
# for an explanation of possible statements, functions and parameters.
#
# Several features can be enabled using '#!define WITH_FEATURE' directives:
#
# *** To run in debug mode:
# - define WITH_DEBUG
#
# *** To enable mysql:
# - define WITH_MYSQL
#
# *** To enable authentication execute:
# - enable mysql
# - define WITH_AUTH
# - add users using 'kamctl'
#
# *** To enable IP authentication execute:
# - enable mysql
# - enable authentication
# - define WITH_IPAUTH
# - add IP addresses with group id '1' to 'address' table
#
# *** To enable persistent user location execute:
# - enable mysql
# - define WITH_USRLOCDB
#
# *** To enable presence server execute:
# - enable mysql
# - define WITH_PRESENCE
#
# *** To enable nat traversal execute:
# - define WITH_NAT
# - install RTPProxy: http://www.rtpproxy.org
# - start RTPProxy:
# rtpproxy -l _your_public_ip_ -s udp:localhost:7722
#
# *** To enable PSTN gateway routing execute:
# - define WITH_PSTN
# - set the value of pstn.gw_ip
# - check route[PSTN] for regexp routing condition
#
# *** To enable database aliases lookup execute:
# - enable mysql
# - define WITH_ALIASDB
#
# *** To enable speed dial lookup execute:
# - enable mysql
# - define WITH_SPEEDDIAL
#
# *** To enable multi-domain support execute:
# - enable mysql
# - define WITH_MULTIDOMAIN
#
# *** To enable TLS support execute:
# - adjust CFGDIR/tls.cfg as needed
# - define WITH_TLS
#
# *** To enable XMLRPC support execute:
# - define WITH_XMLRPC
# - adjust route[XMLRPC] for access policy
#
# *** To enable anti-flood detection execute:
# - adjust pike and htable=>ipban settings as needed (default is
# block if more than 16 requests in 2 seconds and ban for 300 seconds)
# - define WITH_ANTIFLOOD
#
# *** To block 3XX redirect replies execute:
# - define WITH_BLOCK3XX
#
# *** To enable VoiceMail routing execute:
# - define WITH_VOICEMAIL
# - set the value of voicemail.srv_ip
# - adjust the value of voicemail.srv_port
#
# *** To enhance accounting execute:
# - enable mysql
# - define WITH_ACCDB
# - add following columns to database
#!ifdef ACCDB_COMMENT
ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
ALTER TABLE acc ADD COLUMN src_ip varchar(64) NOT NULL default '';
ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN src_ip varchar(64) NOT NULL default '';
ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
#!endif

####### Defined Values #########

# *** Value defines - IDs used later in config
#!ifdef WITH_MYSQL
# - database URL - used to connect to database server by modules such
# as: auth_db, acc, usrloc, a.s.o.
#!define DBURL "mysql://kamailio:kamailiorw@localhost/kamailio"
#!ifdef WITH_ASTERISK
#!define DBASTURL "mysql://kamailio:kamailiorw@localhost/kamailio"
#!endif
#!endif
#!ifdef WITH_MULTIDOMAIN
# - the value for 'use_domain' parameters
#!define MULTIDOMAIN 1
#!else
#!define MULTIDOMAIN 0
#!endif

# - flags
# FLT_ - per transaction (message) flags
# FLB_ - per branch flags
#!define FLT_ACC 1
#!define FLT_ACCMISSED 2
#!define FLT_ACCFAILED 3
#!define FLT_NATS 5

#!define FLB_NATB 6
#!define FLB_NATSIPPING 7

####### Global Parameters #########

#!ifdef WITH_DEBUG
debug=4
log_stderror=yes
#!else
debug=2
log_stderror=no
#!endif

memdbg=5
memlog=5

log_facility=LOG_LOCAL7

log_name="kamailio"

children=4

/* uncomment the next line to disable TCP (default on) */
#disable_tcp=yes

/* uncomment the next line to disable the auto discovery of local aliases
based on reverse DNS on IPs (default on) */
#auto_aliases=no

/* add local domain aliases */
#alias="sip.mydomain.com"

/* uncomment and configure the following line if you want Kamailio to
bind on a specific interface/port/proto (default bind on all available) */
#listen=udp:0.0.0.0:5060
#listen=udp: KamailioIP:5060

/* port to listen to
* - can be specified more than once if needed to listen on many ports */
port=5060

#!ifdef WITH_TLS
enable_tls=yes
#!endif

# life time of TCP connection when there is no traffic
# - a bit higher than registration expires to cope with UA behind NAT
tcp_connection_lifetime=3605

####### Custom Parameters #########

# These parameters can be modified runtime via RPC interface
# - see the documentation of 'cfg_rpc' module.
#
# Format: group.id = value 'desc' description
# Access: $sel(cfg_get.group.id) or @cfg_get.group.id
#

#!ifdef WITH_PSTN
# PSTN GW Routing
#
# - pstn.gw_ip: valid IP or hostname as string value, example:
# pstn.gw_ip = "10.0.0.101" desc "My PSTN GW Address"
#
# - by default is empty to avoid misrouting
pstn.gw_ip = "" desc "PSTN GW Address"
#!endif

#!ifdef WITH_VOICEMAIL
# VoiceMail Routing on offline, busy or no answer
#
# - by default Voicemail server IP is empty to avoid misrouting
voicemail.srv_ip = "" desc "VoiceMail IP Address"
voicemail.srv_port = "5060" desc "VoiceMail Port"
#!endif


#!ifdef WITH_ASTERISK
asterisk.bindip = " ASTERISKIP.164" desc "Asterisk IP Address"
asterisk.bindport = "5060" desc "Asterisk Port"
kamailio.bindip = " KamailioIP .95" desc "Kamailio IP Address"
kamailio.bindport = "5060" desc "Kamailio Port"
#!endif

####### Modules Section ########

# set paths to location of modules (to sources or installation folders)
#!ifdef WITH_SRCPATH
mpath="/usr/local/kamailio-devel/lib64/kamailio/modules/"
#!else
mpath="/usr/local/kamailio-devel/lib64/kamailio/modules/"
#!endif

#!ifdef WITH_MYSQL
loadmodule "db_mysql.so"
#!endif

loadmodule "kex.so"
loadmodule "tm.so"
loadmodule "tmx.so"
loadmodule "sl.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "ctl.so"
loadmodule "cfg_rpc.so"
loadmodule "acc.so"
loadmodule "sctp.so"
loadmodule "dialog.so"
loadmodule "siptrace.so"


#!ifdef WITH_AUTH
loadmodule "auth.so"
loadmodule "auth_db.so"
#!ifdef WITH_IPAUTH
loadmodule "permissions.so"
#!endif
#!endif



#!ifdef WITH_ALIASDB
loadmodule "alias_db.so"
#!endif

#!ifdef WITH_SPEEDDIAL
loadmodule "speeddial.so"
#!endif

#!ifdef WITH_MULTIDOMAIN
loadmodule "domain.so"
#!endif

#!ifdef WITH_PRESENCE
loadmodule "presence.so"
loadmodule "presence_xml.so"
#!endif

#!ifdef WITH_NAT
loadmodule "nathelper.so"
loadmodule "rtpproxy.so"
#!endif

#!ifdef WITH_TLS
loadmodule "tls.so"
#!endif

#!ifdef WITH_ANTIFLOOD
loadmodule "htable.so"
loadmodule "pike.so"
#!endif

#!ifdef WITH_XMLRPC
loadmodule "xmlrpc.so"
#!endif

#!ifdef WITH_DEBUG
loadmodule "debugger.so"
#!endif

#!ifdef WITH_ASTERISK

loadmodule "uac.so"
loadmodule "dispatcher.so"
loadmodule "jsonrpcs.so"
loadmodule "htable.so"

# ---------------------- mod dispatcher params ------------------------------

modparam("dispatcher", "db_url", DBURL)
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "ds_ping_interval", 15)
modparam("dispatcher", "ds_ping_from", "sip:dispathcer@ KamailioIP ")
modparam("dispatcher", "force_dst", 1)
modparam("dispatcher", "ds_ping_method", "INFO")
#modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_probing_threshold", 1)
#modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=403;code=404;code=484;code=488;code=481;class=3")
modparam("dispatcher", "ds_ping_reply_codes", "class=2;class=3;class=4")
#modparam("dispatcher", "priority_col", "dstpriority")
#modparam("dispatcher", "dstid_avp", "$avp(dsdstid)")
# do failover
modparam("dispatcher", "flags", 2)
#modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")
#modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")
#modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")

#!endif

# ----------------- setting module-specific parameters ---------------
modparam("siptrace", "db_url", DBURL)
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_on", 1)
# ----- jsonrpcs params -----
modparam("jsonrpcs", "pretty_format", 1)
/* set the path to RPC fifo control file */
# modparam("jsonrpcs", "fifo_name", "/run/kamailio/kamailio_rpc.fifo")
/* set the path to RPC unix socket control file */
# modparam("jsonrpcs", "dgram_socket", "/run/kamailio/kamailio_rpc.sock")
#!ifdef WITH_JSONRPC
modparam("jsonrpcs", "transport", 7)
#!endif

# ---------------------- mod uac params ------------------------------

modparam("uac", "reg_contact_addr", "ASTERISKIP:5060")
modparam("uac", "reg_db_url", "mysql://kamailio:kamailiorw@localhost/kamailio")
modparam("uac", "reg_db_table", "uacreg")
modparam("uac", "reg_timer_interval", 60)
modparam("uac","restore_mode","auto")
modparam("uac", "restore_dlg", 1)
modparam("uac","auth_realm_avp","$avp(s:auth_realm_avp)")
modparam("uac","auth_username_avp","$avp(s:auth_username_avp)")
modparam("uac","auth_password_avp","$avp(s:auth_password_avp)")



# ----- mi_fifo params -----
#modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")


# ----- tm params -----
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 30000)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 120000)
modparam("tm", "ruri_matching", 0)

# ----- rr params -----
# add value to ;lr param to cope with most of the UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this script)
#!ifdef WITH_ASTERISK
modparam("rr", "append_fromtag", 1)
#!else
modparam("rr", "append_fromtag", 0)
#!endif

# ----- registrar params -----
modparam("registrar", "method_filtering", 1)
/* uncomment the next line to disable parallel forking via location */
# modparam("registrar", "append_branches", 0)
/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam("registrar", "max_contacts", 10)
# max value for expires of registrations
modparam("registrar", "max_expires", 3600)
# set it to 1 to enable GRUU
modparam("registrar", "gruu_enabled", 0)


# ----- acc params -----
/* what special events should be accounted ? */
modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 0)
/* by default ww do not adjust the direct of the sequential requests.
if you enable this parameter, be sure the enable "append_fromtag"
in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;src_ip=$si;"
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
/* enhanced DB accounting */
#!ifdef WITH_ACCDB
modparam("acc", "db_flag", FLT_ACC)
modparam("acc", "db_missed_flag", FLT_ACCMISSED)
modparam("acc", "db_url", DBURL)
modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;src_ip=$si;"
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
#!endif


# ----- usrloc params -----
/* enable DB persistency for location entries */
#!ifdef WITH_USRLOCDB
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", MULTIDOMAIN)
modparam("usrloc", "matching_mode", 1)
modparam("usrloc", "db_insert_update", 1)
#!endif


# ----- auth_db params -----
#!ifdef WITH_AUTH

modparam("auth_db", "db_url", DBURL)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "load_credentials", "")

#!ifdef WITH_ASTERISK
modparam("auth_db", "user_column", "username")
modparam("auth_db", "password_column", "secret")
modparam("auth_db", "db_url", DBASTURL)
modparam("auth_db", "version_table", 0)
#!else
modparam("auth_db", "db_url", DBURL)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "use_domain", MULTIDOMAIN)
#!endif

# ----- permissions params -----
#!ifdef WITH_IPAUTH
modparam("permissions", "db_url", DBURL)
modparam("permissions", "db_mode", 1)
modparam("permissions", "trusted_table", "trusted")
#!endif

#!endif


# ----- alias_db params -----
#!ifdef WITH_ALIASDB
modparam("alias_db", "db_url", DBURL)
modparam("alias_db", "use_domain", MULTIDOMAIN)
#!endif


# ----- speedial params -----
#!ifdef WITH_SPEEDDIAL
modparam("speeddial", "db_url", DBURL)
modparam("speeddial", "use_domain", MULTIDOMAIN)
#!endif


# ----- domain params -----
#!ifdef WITH_MULTIDOMAIN
modparam("domain", "db_url", DBURL)
# register callback to match myself condition with domains list
modparam("domain", "register_myself", 1)
#!endif


#!ifdef WITH_PRESENCE
# ----- presence params -----
modparam("presence", "db_url", DBURL)

# ----- presence_xml params -----
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
#!endif


#!ifdef WITH_NAT
# ----- rtpproxy params -----
modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")

# ----- nathelper params -----
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_from", "sip:pinger@kamailio.org")

# params needed for NAT traversal in other modules
modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
modparam("usrloc", "nat_bflag", FLB_NATB)
#!endif


#!ifdef WITH_TLS
# ----- tls params -----
modparam("tls", "config", "/usr/local/etc/kamailio/tls.cfg")
#!endif

#!ifdef WITH_ANTIFLOOD
# ----- pike params -----
modparam("pike", "sampling_time_unit", 2)
modparam("pike", "reqs_density_per_unit", 16)
modparam("pike", "remove_latency", 4)

# ----- htable params -----
# ip ban htable with autoexpire after 5 minutes
#modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")
modparam("htable", "htable", "stats=>size=6;")

#!endif

#!ifdef WITH_XMLRPC
# ----- xmlrpc params -----
modparam("xmlrpc", "route", "XMLRPC");
modparam("xmlrpc", "url_match", "^/RPC")
#!endif

#!ifdef WITH_DEBUG
# ----- debugger params -----
#modparam("debugger", "cfgtrace", 1)
#modparam("debugger", "breakpoint", 1)
modparam("debugger", "log_level_name", "exec")
#!endif

####### Routing Logic ########


# Main SIP request routing logic
# - processing of any incoming SIP request starts with this route
# - note: this is the same as route { ... }


request_route {

route(DISPATCH);

# per request initial checks
route(REQINIT);

# NAT detection
route(NATDETECT);

# handle requests within SIP dialogs
route(WITHINDLG);

### only initial requests (no To tag)

if(is_method("OPTIONS"))
{
sl_send_reply("200","Keepalive");

exit;
}
if(is_method("NOTIFY"))
{
sl_send_reply("200","OK");

exit;
}

# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans())
t_relay();
exit;
}

t_check_trans();

# authentication

route(AUTH);

# record routing for dialog forming requests (in case they are routed)
# - remove preloaded route headers
remove_hf("Route");

if (is_method("INVITE|SUBSCRIBE"))
record_route();

# account only INVITEs
if (is_method("INVITE"))
{

setflag(FLT_ACC); # do accounting
}


# dispatch requests to foreign domains
route(SIPOUT);

### requests for my local domains

# handle presence related requests
route(PRESENCE);

# handle registrations
route(REGISTRAR);

if ($rU==$null)
{
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}

# dispatch destinations to PSTN
route(PSTN);

# user location service
route(LOCATION);

route(RELAY);
}


route[RELAY] {

# enable additional event routes for forwarded requests
# - serial forking, RTP relaying handling, a.s.o.
if (is_method("INVITE|SUBSCRIBE")) {
t_on_branch("MANAGE_BRANCH");
t_on_reply("MANAGE_REPLY");
}
if (is_method("INVITE")) {
t_on_failure("MANAGE_FAILURE");
}

if (!t_relay()) {
sl_reply_error();
}
exit;
}

# Per SIP request initial checks
route[REQINIT] {
#!ifdef WITH_ANTIFLOOD
# flood dection from same IP and traffic ban for a while
# be sure you exclude checking trusted peers, such as pstn gateways
# - local host excluded (e.g., loop to self)
if(src_ip!=myself)
{
if($sht(ipban=>$si)!=$null)
{
# ip is already blocked
xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n");
exit;
}
if (!pike_check_req())
{
xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n");
$sht(ipban=>$si) = 1;
exit;
}
}
#!endif



if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}

if(!sanity_check("1511", "7"))
{
xlog("Malformed SIP message from $si:$sp\n");
exit;
}
}

# Handle requests within SIP dialogs
route[WITHINDLG] {
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
if ( is_method("ACK") ) {
# ACK is forwarded statelessy
route(NATMANAGE);
}
route(RELAY);
} else {
if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
exit;
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# no loose-route, but stateful ACK;
# must be an ACK after a 487
# or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction ... ignore and discard
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}
}

# Handle SIP registrations
route[REGISTRAR] {
if (is_method("REGISTER"))
{
if(isflagset(FLT_NATS))
{
setbflag(FLB_NATB);
# uncomment next line to do SIP NAT pinging
## setbflag(FLB_NATSIPPING);
}
if (!save("location"))
sl_reply_error();

#!ifdef WITH_ASTERISK
route(REGFWD);
#!endif

exit;
}
}

# USER location service
route[LOCATION] {

#!ifdef WITH_SPEEDIAL
# search for short dialing - 2-digit extension
if($rU=~"^[0-9][0-9]$")
if(sd_lookup("speed_dial"))
route(SIPOUT);
#!endif

#!ifdef WITH_ALIASDB
# search in DB-based aliases
if(alias_db_lookup("dbaliases"))
route(SIPOUT);
#!endif

#!ifdef WITH_ASTERISK
if(is_method("INVITE") && (!route(FROMASTERISK))) {
# if new call from out there - send to Asterisk
# - non-INVITE request are routed directly by Kamailio
# - traffic from Asterisk is routed also directy by Kamailio
append_hf("FromIp: $src_ip\r\n", "Call-ID");
route(TOASTERISK);
exit;
}
#!endif

$avp(oexten) = $rU;
if (!lookup("location")) {
$var(rc) = $rc;
route(TOVOICEMAIL);
t_newtran();
switch ($var(rc)) {
case -1:
case -3:
send_reply("404", "Not Found");
exit;
case -2:
send_reply("405", "Method Not Allowed");
exit;
}
}

# when routing via usrloc, log the missed calls also
if (is_method("INVITE"))
{
setflag(FLT_ACCMISSED);
}
}

# Presence server route
route[PRESENCE] {
if(!is_method("PUBLISH|SUBSCRIBE"))
return;

#!ifdef WITH_PRESENCE
if (!t_newtran())
{
sl_reply_error();
exit;
};

if(is_method("PUBLISH"))
{
handle_publish();
t_release();
}
else
if( is_method("SUBSCRIBE"))
{
handle_subscribe();
t_release();
}
exit;
#!endif

# if presence enabled, this part will not be executed
if (is_method("PUBLISH") || $rU==$null)
{
sl_send_reply("404", "Not here");
exit;
}
return;
}

# Authentication route
route[AUTH] {
#!ifdef WITH_AUTH

#!ifdef WITH_ASTERISK
# do not auth traffic from Asterisk - trusted!
if(route(FROMASTERISK))
return;
#!endif

#!ifdef WITH_IPAUTH

if((!is_method("REGISTER")) && allow_source_address())
{

# source IP allowed
return;
}
if (is_method("REGISTER") || from_uri==myself){
if (!allow_trusted()) {
xlog('wokred here for ipauth check');
sl_send_reply("403", "Forbidden");
}
}



#!endif

if (is_method("REGISTER") || from_uri==myself)
{
# authenticate requests

#!ifdef WITH_ASTERISK

if (!auth_check("$fd", "sip_users", "1")) {
#!else
if (!auth_check("$fd", "subscriber", "1")) {
#!endif
auth_challenge("$fd", "0");
exit;
}
# user authenticated - remove auth header
if(!is_method("REGISTER|PUBLISH"))
consume_credentials();
}
# if caller is not local subscriber, then check if it calls
# a local destination, otherwise deny, not an open relay here
if (from_uri!=myself && uri!=myself)
{
sl_send_reply("403","Not relaying");
exit;
}

#!endif
return;
}

# Caller NAT detection route
route[NATDETECT] {
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("19")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
fix_nated_contact();
}
setflag(FLT_NATS);
}
#!endif
return;
}

# RTPProxy control
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
return;

rtpproxy_manage();

if (is_request()) {
if (!has_totag()) {
add_rr_param(";nat=yes");
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
fix_nated_contact();
}
}
#!endif
return;
}

# Routing to foreign domains
route[SIPOUT] {
if (!uri==myself)
{
append_hf("P-hint: outbound\r\n");
route(RELAY);
}
}

# PSTN GW routing
route[PSTN] {
#!ifdef WITH_PSTN
# check if PSTN GW IP is defined
if (strempty($sel(cfg_get.pstn.gw_ip))) {
xlog("SCRIPT: PSTN rotuing enabled but pstn.gw_ip not defined\n");
return;
}

# route to PSTN dialed numbers starting with '+' or '00'
# (international format)
# - update the condition to match your dialing rules for PSTN routing
if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$"))
return;

# only local users allowed to call
if(from_uri!=myself) {
sl_send_reply("403", "Not Allowed");
exit;
}

$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);

route(RELAY);
exit;
#!endif

return;
}

# XMLRPC routing
#!ifdef WITH_XMLRPC
route[XMLRPC] {
# allow XMLRPC from localhost
if ((method=="POST" || method=="GET")
&& (src_ip==127.0.0.1)) {
# close connection only for xmlrpclib user agents (there is a bug in
# xmlrpclib: it waits for EOF before interpreting the response).
if ($hdr(User-Agent) =~ "xmlrpclib")
set_reply_close();
set_reply_no_connect();
dispatch_rpc();
exit;
}
send_reply("403", "Forbidden");
exit;
}
#!endif

# route to voicemail server
route[TOVOICEMAIL] {
#!ifdef WITH_VOICEMAIL
if(!is_method("INVITE"))
return;

# check if VoiceMail server IP is defined
if (strempty($sel(cfg_get.voicemail.srv_ip))) {
xlog("SCRIPT: VoiceMail rotuing enabled but IP not defined\n");
return;
}
if($avp(oexten)==$null)
return;

$ru = "sip:" + $avp(oexten) + "@" + $sel(cfg_get.voicemail.srv_ip)
+ ":" + $sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
#!endif

return;
}

# manage outgoing branches
branch_route[MANAGE_BRANCH] {
xdbg("new branch [$T_branch_idx] to $ru\n");
route(NATMANAGE);
}

# manage incoming replies
onreply_route[MANAGE_REPLY] {
xdbg("incoming reply\n");
if(status=~"[12][0-9][0-9]")
route(NATMANAGE);
}

# manage failure routing cases
failure_route[MANAGE_FAILURE] {
route(NATMANAGE);

if (t_is_canceled()) {
exit;
}
if(t_check_status("401")) {
uac_auth();
}

#!ifdef WITH_BLOCK3XX
# block call redirect based on 3xx replies.
if (t_check_status("3[0-9][0-9]")) {
t_reply("404","Not found");
exit;
}
#!endif

#!ifdef WITH_VOICEMAIL
# serial forking
# - route to voicemail on busy or no answer (timeout)
if (t_check_status("486|408")) {
route(TOVOICEMAIL);
exit;
}
t_relay();
#!endif
}


# Test if coming from Asterisk
route[FROMASTERISK] {
# if($si==$sel(cfg_get.asterisk.bindip)
# && $sp==$sel(cfg_get.asterisk.bindport))
# return 1;
# return -1;

# dispatch: is this asterisk ip ?
if (ds_is_from_list("1"))
return 1;
return -1;
}

# Send to Asterisk
route[TOASTERISK] {
# $du = "sip:" + $sel(cfg_get.asterisk.bindip) + ":"
# + $sel(cfg_get.asterisk.bindport);
# append_hf("X-Asterisk-Context: dexter-phones\r\n");
# route(RELAY);
# exit;
# select asterisk port
append_hf("X-Asterisk-Context: dexter-phones\r\n");
route(DISPATCH);
}

route[DISPATCH] {
# round robin dispatching on gateways group '1'
#xlog("<<<<<<<<<<<<<<<<trying for dispatch>>>>>>>>>>>>>>>>>>>");

#if (is_method("INVITE")) {
# dst_select( "GROUP", "HASH METHOD")
#ds_select_dst("1","4");
#sl_send_reply("100","Trying");
# forward();
# exit();
#}
if (!ds_select_domain("1", "4")) {
send_reply("404", "No destination");
exit;
}
t_on_failure("RTF_DISPATCH");
route(RELAY);
exit;
}

# Forward REGISTER to Asterisk
route[REGFWD] {
if(!is_method("REGISTER"))
{
return;
}

$var(rip) = $sel(cfg_get.asterisk.bindip);
$uac_req(method)="REGISTER";
$uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport);
$uac_req(furi)="sip:" + $au + "@" + $var(rip);
$uac_req(turi)="sip:" + $au + "@" + $var(rip);
$uac_req(hdrs)="Contact: <sip:" + $au + "@" + $sel(cfg_get.kamailio.bindip) + ":" + $sel(cfg_get.kamailio.bindport) + ">\r\n";

if($sel(contact.expires) != $null)
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n";
else
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n";
uac_req_send();
}


“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@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
sipdebug=yes
username=kamailioSIP
canreinvite=no
secret=XXXX
qualify=yes
dtmfmode=auto

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
Last edited by Usama Shaikh on Tue Nov 10, 2020 9:45 am, edited 2 times in total.
Usama Shaikh
 
Posts: 7
Joined: Mon Nov 09, 2020 9:41 am

Re: Having trouble Setup Kamailio as a load balancer for Ast

Postby Usama Shaikh » Mon Nov 09, 2020 11:01 am

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) to extension '8100' rejected because extension not found in context 'none-dial'.

and not able to call extension to extension,
Usama Shaikh
 
Posts: 7
Joined: Mon Nov 09, 2020 9:41 am

Re: Having trouble Setup Kamailio as a load balancer for Ast

Postby Usama Shaikh » Tue Nov 10, 2020 8:40 am

and i am getting in my kamailio syslog the below logs while calling and call gets rejected.


ov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <1> <ACK>
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/receive.c:319]: receive_msg(): --- received sip message - request - call-id: [Hgq5NSR2rWyx-xSbPcZ30A..] - cseq: [1 ACK]
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/receive.c:379]: receive_msg(): preparing to run routing scripts...
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: dispatcher [dispatch.c:2098]: ds_manage_routes(): set [1]
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: dispatcher [dispatch.c:2204]: ds_manage_routes(): using alg [4] hash [0]
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: dispatcher [dispatch.c:2248]: ds_manage_routes(): selected [4-1-1/0] <sip:88.99.125.164:5060>
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: dispatcher [dispatch.c:2269]: ds_manage_routes(): using first entry [1/0]
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: dispatcher [dispatch.c:2059]: ds_select_dst_limit(): selected target destinations: 1
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: tm [t_lookup.c:1328]: t_newtran(): msg (0x7f220d186c80) id=18/17987 global id=17/17987 T start=(nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/parser/msg_parser.c:185]: get_hdr_field(): content_length=0
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: tm [t_lookup.c:497]: t_lookup_request(): start searching: hash=53712, isACK=1
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: tm [t_lookup.c:455]: matching_3261(): RFC3261 transaction matching failed - via branch [z9hG4bK-524287-1---7f051bff1f2026f8]
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: tm [t_lookup.c:675]: t_lookup_request(): no transaction found
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: tm [t_funcs.c:286]: t_relay_to(): forwarding ACK statelessly
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=1148205d
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/crypto/md5utils.c:67]: MD5StringArray(): MD5 calculated: 0fdd98dce422f35bf387e540338c236f
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/msg_translator.c:1796]: check_boundaries(): no multi-part body
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/forward.c:570]: forward_request(): Sending:
Nov 10 14:33:02 kamlaio kamailio[17976]: ACK sip:8100@88.99.125.164:5060 SIP/2.0
Nov 10 14:33:02 kamlaio kamailio[17976]: Via: SIP/2.0/UDP 95.217.223.95;branch=z9hG4bK0d1d.0fdd98dce422f35bf387e540338c236f.0
Nov 10 14:33:02 kamlaio kamailio[17976]: Via: SIP/2.0/UDP 192.168.0.101:63894;received=88.198.141.166;branch=z9hG4bK-524287-1---7f051bff1f2026f8;rport=63894
Nov 10 14:33:02 kamlaio kamailio[17976]: Max-Forwards: 70
Nov 10 14:33:02 kamlaio kamailio[17976]: To: <sip:8100@95.217.223.95>;tag=as798e3559
Nov 10 14:33:02 kamlaio kamailio[17976]: From: <sip:8101@95.217.223.95;transport=UDP>;tag=1148205d
Nov 10 14:33:02 kamlaio kamailio[17976]: Call-ID: Hgq5NSR2rWyx-xSbPcZ30A..
Nov 10 14:33:02 kamlaio kamailio[17976]: CSeq: 1 ACK
Nov 10 14:33:02 kamlaio kamailio[17976]: Content-Length: 0
Nov 10 14:33:02 kamlaio kamailio[17976]: #015
Nov 10 14:33:02 kamlaio kamailio[17976]: .
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/forward.c:571]: forward_request(): orig. len=328, new_len=435, proto=1
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/receive.c:437]: receive_msg(): request-route executed in: 346 usec
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list 0x7f22082fe178
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list 0x7f22082fe0d0
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list 0x7f22082fdf68
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/receive.c:528]: receive_msg(): cleaning up
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/udp_server.c:493]: udp_rcv_loop(): received on udp socket: (106/100/580) [[SIP/2.0 404 Not Found 0D 0A Via: SIP/2.0/UDP 95.217.223.95;branch=z9hG4bKdc1d.95f7bcaed0ea6f88a14061690e4]]
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:620]: parse_msg(): SIP Reply (status):
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:622]: parse_msg(): version: <SIP/2.0>
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:624]: parse_msg(): status: <404>
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:626]: parse_msg(): reason: <Not Found>
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bKdc1d.95f7bcaed0ea6f88a14061690e4b0ebf.0>; state=6
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 234, <received> = <95.217.223.95>; state=16
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=2
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:500]: parse_headers(): this is the first via
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 234, <received> = <88.198.141.166>; state=6
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK-524287-1---17978c706480e765>; state=6
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 235, <rport> = <63894>; state=16
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=78
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:511]: parse_headers(): this is the second via
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=as798e3559
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [41]; uri=[sip:8100@95.217.223.95]
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:174]: get_hdr_field(): to body (24)[<sip:8100@95.217.223.95>], to tag (10)[as798e3559]
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <2> <INVITE>
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/receive.c:319]: receive_msg(): --- received sip message - reply - call-id: [Hgq5NSR2rWyx-xSbPcZ30A..] - cseq: [2 INVITE]
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_lookup.c:1034]: t_check_msg(): msg (0x7f220d186c80) id=16/17985 global id=15/17985 T start=(nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_lookup.c:912]: t_reply_matching(): t_reply_matching: hash 53709 label 0 branch 0
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_lookup.c:1006]: t_reply_matching(): no matching transaction exists
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_lookup.c:1009]: t_reply_matching(): failure to match a transaction
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_lookup.c:1104]: t_check_msg(): msg (0x7f220d186c80) id=16/17985 global id=16/17985 T end=(nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_reply.c:2336]: reply_received(): transaction not found - (branch -1)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/msg_translator.c:2325]: generate_res_buf_from_sip_res(): old size: 580, new size: 471
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/msg_translator.c:2342]: generate_res_buf_from_sip_res(): copied size: orig:132, new: 23, rest: 448 msg=
Nov 10 14:33:02 kamlaio kamailio[17976]: SIP/2.0 404 Not Found
Nov 10 14:33:02 kamlaio kamailio[17976]: Via: SIP/2.0/UDP 192.168.0.101:63894;received=88.198.141.166;branch=z9hG4bK-524287-1---17978c706480e765;rport=63894
Nov 10 14:33:02 kamlaio kamailio[17976]: From: <sip:8101@95.217.223.95;transport=UDP>;tag=1148205d
Nov 10 14:33:02 kamlaio kamailio[17976]: To: <sip:8100@95.217.223.95>;tag=as798e3559
Nov 10 14:33:02 kamlaio kamailio[17976]: Call-ID: Hgq5NSR2rWyx-xSbPcZ30A..
Nov 10 14:33:02 kamlaio kamailio[17976]: CSeq: 2 INVITE
Nov 10 14:33:02 kamlaio kamailio[17976]: Server: Asterisk PBX 11.25.3-vici
Nov 10 14:33:02 kamlaio kamailio[17976]: Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Nov 10 14:33:02 kamlaio kamailio[17976]: Supported: replaces, timer
Nov 10 14:33:02 kamlaio kamailio[17976]: Content-Length: 0
Nov 10 14:33:02 kamlaio kamailio[17976]: #015
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/forward.c:685]: update_sock_struct_from_via(): using 'rport'
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/forward.c:694]: update_sock_struct_from_via(): using 'received'
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/forward.c:709]: update_sock_struct_from_via(): check if dns lookup is needed for [88.198.141.166]
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/forward.c:718]: update_sock_struct_from_via(): address is [88.198.141.166] port 63894 proto 1
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/forward.c:837]: do_forward_reply(): reply forwarded (2nd via address: 192.168.0.101 port 63894)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/forward.c:842]: do_forward_reply(): reply forwarding finished (2nd via address: 192.168.0.101 port 63894)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/receive.c:518]: receive_msg(): reply-route executed in: 274 usec
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: dialog [dlg_var.c:97]: cb_dlg_locals_reset(): resetting the local dialog shortcuts on script callback: 2147483652
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/receive.c:528]: receive_msg(): cleaning up
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/udp_server.c:493]: udp_rcv_loop(): received on udp socket: (106/100/328) [[ACK sip:8100@95.217.223.95;transport=UDP SIP/2.0 0D 0A Via: SIP/2.0/UDP 192.168.0.101:63894;branch=z9hG4b]]
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:610]: parse_msg(): SIP Request:
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:612]: parse_msg(): method: <ACK>
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): uri: <sip:8100@95.217.223.95;transport=UDP>
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0>
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK-524287-1---17978c706480e765>; state=6
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 235, <rport> = <n/a>; state=17
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=2
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:500]: parse_headers(): this is the first via
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=as798e3559
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [41]; uri=[sip:8100@95.217.223.95]
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:174]: get_hdr_field(): to body (24)[<sip:8100@95.217.223.95>], to tag (10)[as798e3559]
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <2> <ACK>
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/receive.c:319]: receive_msg(): --- received sip message - request - call-id: [Hgq5NSR2rWyx-xSbPcZ30A..] - cseq: [2 ACK]
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/receive.c:379]: receive_msg(): preparing to run routing scripts...
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: dispatcher [dispatch.c:2098]: ds_manage_routes(): set [1]
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: dispatcher [dispatch.c:2204]: ds_manage_routes(): using alg [4] hash [0]
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: dispatcher [dispatch.c:2248]: ds_manage_routes(): selected [4-1-1/0] <sip:88.99.125.164:5060>
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: dispatcher [dispatch.c:2269]: ds_manage_routes(): using first entry [1/0]
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: dispatcher [dispatch.c:2059]: ds_select_dst_limit(): selected target destinations: 1
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_lookup.c:1328]: t_newtran(): msg (0x7f220d186c80) id=21/17986 global id=18/17986 T start=0xffffffffffffffff
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:185]: get_hdr_field(): content_length=0
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_lookup.c:497]: t_lookup_request(): start searching: hash=53709, isACK=1
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_lookup.c:455]: matching_3261(): RFC3261 transaction matching failed - via branch [z9hG4bK-524287-1---17978c706480e765]
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_lookup.c:675]: t_lookup_request(): no transaction found
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_funcs.c:286]: t_relay_to(): forwarding ACK statelessly
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=1148205d
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/crypto/md5utils.c:67]: MD5StringArray(): MD5 calculated: 95f7bcaed0ea6f88a14061690e4b0ebf
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/msg_translator.c:1796]: check_boundaries(): no multi-part body
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/forward.c:570]: forward_request(): Sending:
Nov 10 14:33:02 kamlaio kamailio[17976]: ACK sip:8100@88.99.125.164:5060 SIP/2.0
Nov 10 14:33:02 kamlaio kamailio[17976]: Via: SIP/2.0/UDP 95.217.223.95;branch=z9hG4bKdc1d.95f7bcaed0ea6f88a14061690e4b0ebf.0
Nov 10 14:33:02 kamlaio kamailio[17976]: Via: SIP/2.0/UDP 192.168.0.101:63894;received=88.198.141.166;branch=z9hG4bK-524287-1---17978c706480e765;rport=63894
Nov 10 14:33:02 kamlaio kamailio[17976]: Max-Forwards: 70
Nov 10 14:33:02 kamlaio kamailio[17976]: To: <sip:8100@95.217.223.95>;tag=as798e3559
Nov 10 14:33:02 kamlaio kamailio[17976]: From: <sip:8101@95.217.223.95;transport=UDP>;tag=1148205d
Nov 10 14:33:02 kamlaio kamailio[17976]: Call-ID: Hgq5NSR2rWyx-xSbPcZ30A..
Nov 10 14:33:02 kamlaio kamailio[17976]: CSeq: 2 ACK
Nov 10 14:33:02 kamlaio kamailio[17976]: Content-Length: 0
Nov 10 14:33:02 kamlaio kamailio[17976]: #015
Nov 10 14:33:02 kamlaio kamailio[17976]: .
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/forward.c:571]: forward_request(): orig. len=328, new_len=435, proto=1
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/receive.c:437]: receive_msg(): request-route executed in: 588 usec
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list 0x7f22082fe178
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list 0x7f22082fe0d0
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list 0x7f22082fdf68
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/receive.c:528]: receive_msg(): cleaning up
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/udp_server.c:493]: udp_rcv_loop(): received on udp socket: (106/100/328) [[ACK sip:8100@95.217.223.95;transport=UDP SIP/2.0 0D 0A Via: SIP/2.0/UDP 192.168.0.101:63894;branch=z9hG4b]]
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:610]: parse_msg(): SIP Request:
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:612]: parse_msg(): method: <ACK>
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): uri: <sip:8100@95.217.223.95;transport=UDP>
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0>
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK-524287-1---17978c706480e765>; state=6
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 235, <rport> = <n/a>; state=17
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=2
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:500]: parse_headers(): this is the first via
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=as798e3559
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [41]; uri=[sip:8100@95.217.223.95]
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:174]: get_hdr_field(): to body (24)[<sip:8100@95.217.223.95>], to tag (10)[as798e3559]
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <2> <ACK>
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/receive.c:319]: receive_msg(): --- received sip message - request - call-id: [Hgq5NSR2rWyx-xSbPcZ30A..] - cseq: [2 ACK]
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/receive.c:379]: receive_msg(): preparing to run routing scripts...
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: dispatcher [dispatch.c:2098]: ds_manage_routes(): set [1]
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: dispatcher [dispatch.c:2204]: ds_manage_routes(): using alg [4] hash [0]
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: dispatcher [dispatch.c:2248]: ds_manage_routes(): selected [4-1-1/0] <sip:88.99.125.164:5060>
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: dispatcher [dispatch.c:2269]: ds_manage_routes(): using first entry [1/0]
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: dispatcher [dispatch.c:2059]: ds_select_dst_limit(): selected target destinations: 1
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: tm [t_lookup.c:1328]: t_newtran(): msg (0x7f220d186c80) id=15/17984 global id=14/17984 T start=(nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:185]: get_hdr_field(): content_length=0
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: tm [t_lookup.c:497]: t_lookup_request(): start searching: hash=53709, isACK=1
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: tm [t_lookup.c:455]: matching_3261(): RFC3261 transaction matching failed - via branch [z9hG4bK-524287-1---17978c706480e765]
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: tm [t_lookup.c:675]: t_lookup_request(): no transaction found
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: tm [t_funcs.c:286]: t_relay_to(): forwarding ACK statelessly
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=1148205d
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/crypto/md5utils.c:67]: MD5StringArray(): MD5 calculated: 95f7bcaed0ea6f88a14061690e4b0ebf
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/msg_translator.c:1796]: check_boundaries(): no multi-part body
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/forward.c:570]: forward_request(): Sending:
Nov 10 14:33:02 kamlaio kamailio[17976]: ACK sip:8100@88.99.125.164:5060 SIP/2.0
Nov 10 14:33:02 kamlaio kamailio[17976]: Via: SIP/2.0/UDP 95.217.223.95;branch=z9hG4bKdc1d.95f7bcaed0ea6f88a14061690e4b0ebf.0
Nov 10 14:33:02 kamlaio kamailio[17976]: Via: SIP/2.0/UDP 192.168.0.101:63894;received=88.198.141.166;branch=z9hG4bK-524287-1---17978c706480e765;rport=63894
Nov 10 14:33:02 kamlaio kamailio[17976]: Max-Forwards: 70
Nov 10 14:33:02 kamlaio kamailio[17976]: To: <sip:8100@95.217.223.95>;tag=as798e3559
Nov 10 14:33:02 kamlaio kamailio[17976]: From: <sip:8101@95.217.223.95;transport=UDP>;tag=1148205d
Nov 10 14:33:02 kamlaio kamailio[17976]: Call-ID: Hgq5NSR2rWyx-xSbPcZ30A..
Nov 10 14:33:02 kamlaio kamailio[17976]: CSeq: 2 ACK
Nov 10 14:33:02 kamlaio kamailio[17976]: Content-Length: 0
Nov 10 14:33:02 kamlaio kamailio[17976]: #015
Nov 10 14:33:02 kamlaio kamailio[17976]: .
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/forward.c:571]: forward_request(): orig. len=328, new_len=435, proto=1
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/receive.c:437]: receive_msg(): request-route executed in: 537 usec
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list 0x7f22082fe178
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list 0x7f22082fe0d0
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list 0x7f22082fdf68
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:02 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/receive.c:528]: receive_msg(): cleaning up
Nov 10 14:33:12 kamlaio kamailio[17976]: 8(17987) DEBUG: <core> [core/udp_server.c:516]: udp_rcv_loop(): probing packet received from 88.198.141.166 38649
Nov 10 14:33:12 kamlaio kernel: [413206.886257] [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:77:fe:c6:d2:74:7f:6e:37:e3:08:00 SRC=45.129.33.13 DST=95.217.223.95 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=3042 PROTO=TCP SPT=58476 DPT=40785 WINDOW=1024 RES=0x00 SYN URGP=0
Nov 10 14:33:33 kamlaio kernel: [413227.972221] [UFW BLOCK] IN=eth0 OUT= MAC=96:00:00:77:fe:c6:d2:74:7f:6e:37:e3:08:00 SRC=206.189.171.222 DST=95.217.223.95 LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=34432 PROTO=TCP SPT=42709 DPT=14408 WINDOW=1024 RES=0x00 SYN URGP=0
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/udp_server.c:493]: udp_rcv_loop(): received on udp socket: (106/100/749) [[REGISTER sip:95.217.223.95;transport=UDP SIP/2.0 0D 0A Via: SIP/2.0/UDP 192.168.0.101:63894;branch=z9hG4b]]
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:610]: parse_msg(): SIP Request:
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:612]: parse_msg(): method: <REGISTER>
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): uri: <sip:95.217.223.95;transport=UDP>
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0>
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK-524287-1---445307f8a2a61712>; state=6
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 235, <rport> = <n/a>; state=17
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=2
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:500]: parse_headers(): this is the first via
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=10
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [40]; uri=[sip:8101@95.217.223.95;transport=UDP]
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:174]: get_hdr_field(): to body (40)[<sip:8101@95.217.223.95;transport=UDP>
Nov 10 14:33:36 kamlaio kamailio[17976]: ], to tag (0)[]
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <3> <REGISTER>
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/receive.c:319]: receive_msg(): --- received sip message - request - call-id: [e2fZ8zzSikiRzOdFP1zrlQ..] - cseq: [3 REGISTER]
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/receive.c:379]: receive_msg(): preparing to run routing scripts...
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: dispatcher [dispatch.c:2098]: ds_manage_routes(): set [1]
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: dispatcher [dispatch.c:2204]: ds_manage_routes(): using alg [4] hash [0]
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: dispatcher [dispatch.c:2248]: ds_manage_routes(): selected [4-1-1/0] <sip:88.99.125.164:5060>
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: dispatcher [dispatch.c:2269]: ds_manage_routes(): using first entry [1/0]
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: dispatcher [dispatch.c:2059]: ds_select_dst_limit(): selected target destinations: 1
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_lookup.c:1328]: t_newtran(): msg (0x7f220d186c80) id=17/17985 global id=16/17985 T start=(nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:185]: get_hdr_field(): content_length=0
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_lookup.c:497]: t_lookup_request(): start searching: hash=3859, isACK=0
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_lookup.c:455]: matching_3261(): RFC3261 transaction matching failed - via branch [z9hG4bK-524287-1---445307f8a2a61712]
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_lookup.c:675]: t_lookup_request(): no transaction found
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_hooks.c:346]: run_reqin_callbacks_internal(): trans=0x7f22082fe220, callback type 1, id 0 entered
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_hooks.c:346]: run_reqin_callbacks_internal(): trans=0x7f22082fe220, callback type 1, id 0 entered
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=517f7e2f
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/crypto/md5utils.c:67]: MD5StringArray(): MD5 calculated: 7910cfec7a513b329f1b498fcd636b2a
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/msg_translator.c:1796]: check_boundaries(): no multi-part body
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: tm [t_funcs.c:376]: t_relay_to(): new transaction forwarded
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/receive.c:437]: receive_msg(): request-route executed in: 685 usec
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 6(17985) DEBUG: <core> [core/receive.c:528]: receive_msg(): cleaning up
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/udp_server.c:493]: udp_rcv_loop(): received on udp socket: (106/100/674) [[SIP/2.0 401 Unauthorized 0D 0A Via: SIP/2.0/UDP 95.217.223.95;branch=z9hG4bK31f.7910cfec7a513b329f1b498fc]]
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:620]: parse_msg(): SIP Reply (status):
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:622]: parse_msg(): version: <SIP/2.0>
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:624]: parse_msg(): status: <401>
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:626]: parse_msg(): reason: <Unauthorized>
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK31f.7910cfec7a513b329f1b498fcd636b2a.0>; state=6
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 234, <received> = <95.217.223.95>; state=16
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=2
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:500]: parse_headers(): this is the first via
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 234, <received> = <88.198.141.166>; state=6
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK-524287-1---445307f8a2a61712>; state=6
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 235, <rport> = <63894>; state=16
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=78
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:511]: parse_headers(): this is the second via
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=as55442f4a
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [55]; uri=[sip:8101@95.217.223.95;transport=UDP]
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:174]: get_hdr_field(): to body (38)[<sip:8101@95.217.223.95;transport=UDP>], to tag (10)[as55442f4a]
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <3> <REGISTER>
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/receive.c:319]: receive_msg(): --- received sip message - reply - call-id: [e2fZ8zzSikiRzOdFP1zrlQ..] - cseq: [3 REGISTER]
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_lookup.c:1034]: t_check_msg(): msg (0x7f220d186c80) id=22/17986 global id=21/17986 T start=(nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:185]: get_hdr_field(): content_length=0
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_lookup.c:912]: t_reply_matching(): t_reply_matching: hash 3859 label 0 branch 0
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_lookup.c:967]: t_reply_matching(): reply (0x7f220d186c80) matched an active transaction (T=0x7f22082fe220)!
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_lookup.c:1104]: t_check_msg(): msg (0x7f220d186c80) id=22/17986 global id=22/17986 T end=0x7f22082fe220
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_reply.c:2349]: reply_received(): transaction found - T:0x7f22082fe220 branch:0
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_reply.c:2362]: reply_received(): original status uas=0, uac[0]=0 local=0 is_invite=0)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_reply.c:1356]: t_should_relay_response(): ->>>>>>>>> T_code=0, new_code=401
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/action.c:1567]: run_actions(): null action list (rec_level=1)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: dialog [dlg_var.c:97]: cb_dlg_locals_reset(): resetting the local dialog shortcuts on script callback: 2147483650
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_reply.c:1585]: t_should_relay_response(): rps completed - uas status: 0 branch: 0
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_reply.c:1919]: relay_reply(): reply status=4 branch=0, save=0, relay=0 icode=0 msg status=401
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/msg_translator.c:2325]: generate_res_buf_from_sip_res(): old size: 674, new size: 566
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/msg_translator.c:2342]: generate_res_buf_from_sip_res(): copied size: orig:134, new: 26, rest: 540 msg=
Nov 10 14:33:36 kamlaio kamailio[17976]: SIP/2.0 401 Unauthorized
Nov 10 14:33:36 kamlaio kamailio[17976]: Via: SIP/2.0/UDP 192.168.0.101:63894;received=88.198.141.166;branch=z9hG4bK-524287-1---445307f8a2a61712;rport=63894
Nov 10 14:33:36 kamlaio kamailio[17976]: From: <sip:8101@95.217.223.95;transport=UDP>;tag=517f7e2f
Nov 10 14:33:36 kamlaio kamailio[17976]: To: <sip:8101@95.217.223.95;transport=UDP>;tag=as55442f4a
Nov 10 14:33:36 kamlaio kamailio[17976]: Call-ID: e2fZ8zzSikiRzOdFP1zrlQ..
Nov 10 14:33:36 kamlaio kamailio[17976]: CSeq: 3 REGISTER
Nov 10 14:33:36 kamlaio kamailio[17976]: Server: Asterisk PBX 11.25.3-vici
Nov 10 14:33:36 kamlaio kamailio[17976]: Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Nov 10 14:33:36 kamlaio kamailio[17976]: Supported: replaces, timer
Nov 10 14:33:36 kamlaio kamailio[17976]: WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6e18d899"
Nov 10 14:33:36 kamlaio kamailio[17976]: Content-Length: 0
Nov 10 14:33:36 kamlaio kamailio[17976]: #015
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_reply.c:2116]: relay_reply(): reply buffer sent out
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: tm [t_reply.c:1758]: cleanup_uac_timers(): RETR/FR timers reset
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/receive.c:518]: receive_msg(): reply-route executed in: 333 usec
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: dialog [dlg_var.c:97]: cb_dlg_locals_reset(): resetting the local dialog shortcuts on script callback: 2147483652
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/xavp.c:539]: xavp_destroy_list(): destroying xavp list (nil)
Nov 10 14:33:36 kamlaio kamailio[17976]: 7(17986) DEBUG: <core> [core/receive.c:528]: receive_msg(): cleaning up
Nov 10 14:33:36 kamlaio kamailio[17976]: 5(17984) DEBUG: <core> [core/udp_server.c:493]: udp_rcv_loop(): received on udp socket: (106/100/749) [[REGISTER sip:95.217.223.95;transport=UDP SIP/2.0 0D 0A Via: SIP/2.0/UDP 192.168.0.101:63894;branch=z9hG4b]]
Usama Shaikh
 
Posts: 7
Joined: Mon Nov 09, 2020 9:41 am

Re: Having trouble Setup Kamailio as a load balancer for Ast

Postby carpenox » Tue Nov 10, 2020 9:27 am

What would be the reason for using kamalio for load balancing instead of asterisks itself?
Alma Linux 9.3 | Version: 2.14-911a | SVN Version: 3815 | DB Schema Version: 1710 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3
carpenox
 
Posts: 2230
Joined: Wed Apr 08, 2020 2:02 am
Location: Coral Springs, FL

Re: Having trouble Setup Kamailio as a load balancer for Ast

Postby Usama Shaikh » Tue Nov 10, 2020 9:50 am

carpenox wrote:What would be the reason for using kamailio for load balancing instead of asterisks itself?


Hi Carpenox,
Thanks a lot for your response.

Actually i have 2 or more asterisk servers having different IPs, and i want to do is to register all the asterisk servers registrations from my Single Kamailio IP so that there will not be need of remembering all the asterisk servers IPs but the Single Kamailio IP and then want to use load balancing using kamailio module dispathcer.


Kindly help me in this.

Thanks in advance. :-)
Usama Shaikh
 
Posts: 7
Joined: Mon Nov 09, 2020 9:41 am

Re: trouble Setting Kamailio as a load balancer for Asterisk

Postby carpenox » Tue Nov 10, 2020 10:01 am

seems like overkill for something that asterisk has built in already, what do u mean remembering all the asterisk IP's? The only reason I would think for this would be to have one IP allowed for a voip carrier and needing all calls to come from that IP, but if thats the case, you can just specify that one server to actually make the calls, and the others to spread the load across the servers for bandwith traffic. Is there another reason you would want to do this/? I am confused
Alma Linux 9.3 | Version: 2.14-911a | SVN Version: 3815 | DB Schema Version: 1710 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3
carpenox
 
Posts: 2230
Joined: Wed Apr 08, 2020 2:02 am
Location: Coral Springs, FL

Re: trouble Setting Kamailio as a load balancer for Asterisk

Postby Usama Shaikh » Tue Nov 10, 2020 10:12 am

carpenox wrote:seems like overkill for something that asterisk has built in already, what do u mean remembering all the asterisk IP's? The only reason I would think for this would be to have one IP allowed for a voip carrier and needing all calls to come from that IP, but if thats the case, you can just specify that one server to actually make the calls, and the others to spread the load across the servers for bandwith traffic. Is there another reason you would want to do this/? I am confused


sorry if I am not able to clear my point, simply what i want to do is to register my asterisk extensions in softphones with the Kamailio IP and then want to calling among them... so if i have 5 asterisk servers then i will able to get the extensions registeres with my kamailio IP...

so far i am able to register my 2 asterisk extensions with my kamailio IP but not able to call between them.

if it gets successful then i can do ahead.

Your Help will be appreciated.

Thanks
Usama Shaikh
 
Posts: 7
Joined: Mon Nov 09, 2020 9:41 am

Re: trouble Setting Kamailio as a load balancer for Asterisk

Postby carpenox » Tue Nov 10, 2020 1:17 pm

I am unfamiliar with kamailio, but i believe the outcome you are trying to achieve does not need kamailio
Alma Linux 9.3 | Version: 2.14-911a | SVN Version: 3815 | DB Schema Version: 1710 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3
carpenox
 
Posts: 2230
Joined: Wed Apr 08, 2020 2:02 am
Location: Coral Springs, FL

Re: trouble Setting Kamailio as a load balancer for Asterisk

Postby Usama Shaikh » Tue Nov 10, 2020 1:30 pm

carpenox wrote:I am unfamiliar with kamailio, but i believe the outcome you are trying to achieve does not need kamailio



Okay so then what i need? what do you think about it please if you can guide me.


for now i am just trying to make internal calling working from the extensions which is now registered with kamailio IP.

i dont have much idea about asterisk extension(dialplans) if you can help me to setup that
Usama Shaikh
 
Posts: 7
Joined: Mon Nov 09, 2020 9:41 am

Re: trouble Setting Kamailio as a load balancer for Asterisk

Postby Usama Shaikh » Wed Nov 11, 2020 1:52 pm

i searched on the internet and tried it, and got some success in this…

(and what i did was to put some of the conf dialplans from general context to my none-dial context) and i successfully got call when I login agent and able to listen the
“conf-onlyperson.gsm” the only person audio… and also was able to call 8101 to 8102 (but I don't know why not able to call vice versa from 8102 to 8101)

but the issue now is (i suppose) now only at asterisk side because now again i am not able to call which was working before please help me in this and if you have idea why the behavior is intermittent so please point out the stuff…
the issue i am facing now is asterisk side kindly help me in this,
your help will be much appreciated.


now my extensions.conf look like this is :

Code: Select all
[none-dial]

include => vicidial-auto

exten => _1122,1,Answer()
exten => _1122,n,Playback(demo-congrats)
exten => _1122,n,Hangup()

exten => _XXXXXXXXXX,1,AGI(agi-DID_route.agi)
exten => s,1,AGI(agi-DID_route.agi)


; Local blind monitoring
;exten => _08600XXX,1,Dial(${TRUNKblind}/6${EXTEN:1},55,To)
;exten => _08600XXX,n,Hangup()



; Local agent alert extensions
exten => _8600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
exten => _8600XXX*.,n,Hangup()
exten => _78600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
exten => _78600XXX*.,n,Hangup()

; astGUIclient conferences
exten => _86000[0-4]X,1,Meetme(${EXTEN},q)
exten => _86000[0-4]X,n,Hangup()

; VICIDIAL conferences
exten => _86000[5-9]X,1,Meetme(${EXTEN},F)
exten => _86000[5-9]X,n,Hangup()
exten => _8600[1-2]XX,1,Meetme(${EXTEN},F)
exten => _8600[1-2]XX,n,Hangup()

exten => _XXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _XXXX,2,Dial(${KAMAILIOTRUNK}/${EXTEN},,To) ; any call forward back to kamailio
exten => _XXXX,3,Hangup()

;exten => _XXXX,2,NoOp(internal context called on Server A to ${EXTEN},
;CALLERID_num ${CALLERID(num)}, CALLERID_num_f2 ${CALLERID(num):0:2})
;exten => _XXXX,3,Dial(SIP/${EXTEN},15)

exten => s,n,Dial(SIP/${EXTEN},,)
exten => s,n,Hangup()

; MeetMe Adjustment Extensions
exten => _X48600XXX,1,MeetMeAdmin(${EXTEN:2},T,${EXTEN:0:1})
exten => _X48600XXX,2,Hangup()

exten => _X38600XXX,1,MeetMeAdmin(${EXTEN:2},t,${EXTEN:0:1})
exten => _X38600XXX,2,Hangup()

exten => _X28600XXX,1,MeetMeAdmin(${EXTEN:2},m,${EXTEN:0:1})
exten => _X28600XXX,2,Hangup()

exten => _X18600XXX,1,MeetMeAdmin(${EXTEN:2},M,${EXTEN:0:1})
exten => _X18600XXX,2,Hangup()

exten => _55558600XXX,1,MeetMeAdmin(${EXTEN:4},K)
exten => _55558600XXX,2,Hangup()

exten => _8[0-2]XX,1,Meetme(8600${EXTEN:1},mqX) ; Listen
exten => _8[0-2]XX,n,Hangup()
exten => _99[0-2]XX,1,Meetme(8600${EXTEN:2},X)  ; Barge
exten => _99[0-2]XX,n,Hangup()

; quiet entry and leaving conferences for VICIDIAL (inbound announce, SendDTMF and ring-agent)
exten => _78600XXX,1,Meetme(${EXTEN:1},Fq)
exten => _78600XXX,n,Hangup()

; quiet monitor-only extensions for meetme rooms (for room managers)
exten => _68600XXX,1,Meetme(${EXTEN:1},Fmq)
exten => _68600XXX,n,Hangup()

; Asterisk 1.8 workaround
exten => _58600XXX,1,Meetme(${EXTEN:1},Fmq)
exten => _58600XXX,n,Hangup()

; quiet monitor-only entry and leaving conferences for VICIDIAL (recording)
exten => _558600XXX,1,Meetme(${EXTEN:2},Fmq)
exten => _558600XXX,n,Hangup()

; voicelab exten
exten => _86009XX,1,Meetme(${EXTEN},Fmq)
; voicelab exten moderator
exten => _986009XX,1,Meetme(${EXTEN:1})


and now my sip.conf is

Code: Select all
[kamailio]
type=friend
host=95.217.223.95
port=5060
transport=udp
disallow=all
allow=all
allow=gsm
allow=g729
allow=alaw
allow=ulaw
context=none-dial
insecure=invite,port
Permit=95.217.223.95
sipdebug=yes
canreinvite=no
dtmfmode=auto
srvlookup=yes
canreinvite=no


these are the logs in my asterisk -r while i am dialing and calling not working

Code: Select all

[Nov 11 13:33:12]     -- Registered SIP '8101' at 175.107.201.168:61846
[Nov 11 13:33:54]     -- Registered SIP '8101' at 88.198.141.166:61846
[Nov 11 13:33:57]     -- Unregistered SIP '8101'
[Nov 11 13:33:59]     -- Registered SIP '8101' at 88.198.141.166:61846
[Nov 11 13:33:59]     -- Unregistered SIP '8101'
[Nov 11 13:34:00]     -- Registered SIP '8101' at 88.198.141.166:61846
[Nov 11 13:34:01]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:34:01]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:34:01]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:34:04]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:34:05]     -- Unregistered SIP '8100'
[Nov 11 13:34:06]     -- Registered SIP '8100' at 192.168.0.101:56643
[Nov 11 13:34:06]        > Saved useragent "Z 3.15.40006 rv2.8.20" for peer 8100
[Nov 11 13:34:06]     -- Registered SIP '8101' at 175.107.201.168:61846
[Nov 11 13:34:16]     -- Unregistered SIP '8102'
[Nov 11 13:34:25]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:34:25] NOTICE[7689][C-00000001]: channel.c:5690 __ast_request_and_dial: Unable to request channel SIP/8101
[Nov 11 13:34:26]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:34:38]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:34:38]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:34:38]     -- Executing [55558600054@default:1] MeetMeAdmin("Local/55558600054@default-00000000;2", "8600054,K") in new stack
[Nov 11 13:34:38] WARNING[7709][C-00000002]: app_meetme.c:5053 admin_exec: Conference number '8600054' not found!
[Nov 11 13:34:38]     -- Executing [55558600054@default:2] Hangup("Local/55558600054@default-00000000;2", "") in new stack
[Nov 11 13:34:38]   == Spawn extension (default, 55558600054, 2) exited non-zero on 'Local/55558600054@default-00000000;2'
[Nov 11 13:34:38]     -- Executing [h@default:1] AGI("Local/55558600054@default-00000000;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16---------------") in new stack
[Nov 11 13:34:38]     -- <Local/55558600054@default-00000000;2>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------- completed, returning 0
[Nov 11 13:34:39]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:34:39]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:34:48]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:34:48] NOTICE[7726][C-00000003]: channel.c:5690 __ast_request_and_dial: Unable to request channel SIP/8102
[Nov 11 13:34:49]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:34:54]     -- Registered SIP '8101' at 88.198.141.166:61846
[Nov 11 13:35:00]     -- Registered SIP '8101' at 175.107.201.168:61846
[Nov 11 13:35:02]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:35:02]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:35:02]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:35:04]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:35:37]     -- Registered SIP '8102' at 192.168.0.101:51817
[Nov 11 13:35:37]        > Saved useragent "Bria release 6.0.1 stamp 102003" for peer 8102
[Nov 11 13:35:37]     -- Unregistered SIP '8102'
[Nov 11 13:35:38]     -- Registered SIP '8102' at 88.198.141.166:51817
[Nov 11 13:35:42] NOTICE[5105]: chan_sip.c:29904 sip_poke_noanswer: Peer '8102' is now UNREACHABLE!  Last qualify: 0
[Nov 11 13:35:43]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:35:43]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:35:43]     -- Executing [55558600056@default:1] MeetMeAdmin("Local/55558600056@default-00000001;2", "8600056,K") in new stack
[Nov 11 13:35:43] WARNING[7849][C-00000004]: app_meetme.c:5053 admin_exec: Conference number '8600056' not found!
[Nov 11 13:35:43]     -- Executing [55558600056@default:2] Hangup("Local/55558600056@default-00000001;2", "") in new stack
[Nov 11 13:35:43]   == Spawn extension (default, 55558600056, 2) exited non-zero on 'Local/55558600056@default-00000001;2'
[Nov 11 13:35:43]     -- Executing [h@default:1] AGI("Local/55558600056@default-00000001;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16---------------") in new stack
[Nov 11 13:35:43]     -- <Local/55558600056@default-00000001;2>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------- completed, returning 0
[Nov 11 13:35:44]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:35:44]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:35:48]     -- Registered SIP '8101' at 88.198.141.166:61846
[Nov 11 13:35:50]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov 11 13:35:50] NOTICE[7861][C-00000005]: channel.c:5690 __ast_request_and_dial: Unable to request channel SIP/8102
[Nov 11 13:35:51]   == Manager 'sendcron' logged off from 127.0.0.1
[Nov 11 13:35:55]     -- Registered SIP '8101' at 175.107.201.168:61846
Usama Shaikh
 
Posts: 7
Joined: Mon Nov 09, 2020 9:41 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 69 guests