Hi Everyone,
I am trying to add DMQ for redundancy of registrations and USRLOC, and I’m trying to send calls to the correct SBC that is the original registrar for a handset. I’ve been using the thread here where Charles gave some guidance on how to use path to store and use the original SBC: https://lists.kamailio.org/pipermail/sr-users/2018-February/100246.html and https://lists.kamailio.org/pipermail/sr-users/2013-September/079736.html
I am struggling with when to decide to modify the destination URI. My testing shows this is required otherwise some handsets will ignore the invite, but right now I am doing it in a blanket form, right before SIPOUT (which is where the origin SBC handles the invite instead of LOCATION). I am sure this is being too heavy-handed though and there are some cases where I won’t want to set this, but I am not sure which?
# 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();
}
…
xlog("Setting du according to path. Current du is $du\n");
xlog("Current route header: $(hdr(Route))\n");
xlog("Current route: $(hdr(Route){uri.host})\n");
>>> $du = $(hdr(Route){param.value,received});
#xlog("New du destination uri is: $du\n");
# dispatch requests to foreign domains
route(SIPOUT);
In the linked threads, Charles mentioned that only the last-hop registrar should make this change, but what’s the best way to determine if I am on the last-hop registrar?
As per the snippet above, I tried using the {uri.host} transformation to extract the origin SBC’s IP from the route header. My plan is to then compare this against “myself” but I am struggling to extract the right info from the route header. And I am not even sure if this is the right general approach?
The route header looks like this: <sip:ORIGIN_SBC_IP:5060;received=sip:UAC_WAN_IP:2048;lr>
Any guidance or examples would be appreciated.
Thanks!
Rhys Hanrahan | Chief Information Officer
e: rhys(a)nexusone.com.au<mailto:rhys@nexusone.com.au>
[www.nexusone.com.au]<http://www.nexusone.com.au/> [signature_555064778] <http://www.fusiontech.com.au/>
NEXUS ONE | FUSION TECHNOLOGY SOLUTIONS
p: 1800 NEXUS1 (1800 639 871) or 1800 565 845 | a: Suite 12.03 Level 12, 227 Elizabeth Street, Sydney NSW 2000
www.nexusone.com.au<http://www.nexusone.com.au/> | www.fusiontech.com.au<http://www.fusiontech.com.au/>
The information in this email and any accompanying attachments may contain; a. Confidential information of Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties; b. Legally privileged information of Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties; and or c. Copyright material Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties. If you have received this email in error, please notify the sender immediately and delete this message. Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd does not accept any responsibility for loss or damage arising from the use or distribution of this email.
Please consider the environment before printing this email.
I have a problem when trying to add an advertised address in Kamailio 5.4.2
we have a checf config that is populating various variable. some of
these are for the Listeners
we have this working and Im getting all protocols for the listeners
based on the non _TLS Vars but the TLS config is trying to resolve
ADVERTISE_NAT_ADDRESS_TLS. If I try and quote the variable
"ADVERTISE_NAT_ADDRESS_TLS" id get an error saying 1.2.3.4:5061 is not
resolvable
therefroe I have udp,tcp and tls listeners all on the default ports
where i need the tls on port 5061 ans not 5060
listen LISTEN_EXTERNAL_SOCKET advertise ADVERTISE_NAT_ADDRESS name = "ext"
listen LISTEN_INTERNAL_SOCKET name = "int"
listen LISTEN_EXTERNAL_SOCKET_TLS advertise name = "ext-tls"
listen LISTEN_INTERNAL_SOCKET_TLS name = "int-tls"
the Vars are defined as
#!define TOPO_NAT
#!substdef "!LISTEN_EXTERNAL_SOCKET!10.10.10.10:5060!g"
#!substdef "!LISTEN_INTERNAL_SOCKET!10.10.10.10:5080!g"
#!substdef "!ADVERTISE_NAT_ADDRESS!1.2.3.4:5060!g"
#!define ENABLE_TLS
#!define TLS_CONFIG_FILE "chef-managed/tls.cfg"
#!substdef "!LISTEN_EXTERNAL_SOCKET_TLS!tls:10.225.73.16:5061!g"
#!substdef "!LISTEN_INTERNAL_SOCKET_TLS!tls:10.225.73.16:5061!g"
#!substdef "!ADVERTISE_NAT_ADDRESS_TLS!1.2.3.4:5061!g"
REgards,
Richard
Hi there,
I'm already using Kamailio as a simple proxy and it worked flawlessly.
This time, I need to have a new setup like this:
[UAC (sip phone)] <--- register & has to deal only with ----> | PUBLIC |
[Kamailio + RtpEngine] | PRIVATE | <----> [Asterisk]
Client = 37.100.100.100 (public)
Asterisk = 172.17.200.20 (private)
Kamailio/RtpEngine = 172.17.203.102 (private, advertising 3.99.99.99 public
IP)
Kamailio and RtpEngine will behave as a SBC/B2BUA, the client will deal
only with kamailio using public access (internet), and asterisk will handle
the calls but stays 100% private behind kamailio.
Kamailio will handle registrations to reduce the load put on the asterisk
boxes.
The setup is running on AWS, my Kamailio has 1 Private IP address tied to 1
Public IP address (an Elastic public IP) so, no multi-homing, one network
interface.
I made a "simple" work in progress configuration, the registration is
working as a PoC, and my calls are *almost* working but with some nonsense.
My Main issue is that when my UAC (SIP phone) make a call, to let's
say +1000, the call enters kamailio, then kamailio handle the invite,
trigger rtpEngine, but the IP addresses in Record-Route and Via headers are
wrong.
>From Kamailio to UAC Sip Phone, it seems OK.
But from Kamailio to Asterisk, the record-route/via headers are set with
Kamailio Public IP when it should be the Kamailio private IP.
So, when Asterisk sends a BYE, it tries to send it to the public IP of
Kamailio, which is wrong.
There are probably other quirks in the configuration but this one, I can't
figure out what's wrong.
I'm attaching a capture file, a log file and my configuration file (some
informations are redacted).
I am missing something and sadly I can't figure out what, a little help
would be appreciated :)
Regards
Hi all,
im currently trying to add a Outbound Proxying to our system which right
now does inbound loadbalancing for our application servers.
Current:
Inbound SIP Trunk -> Kamailio -> dispatcher -> ApplicationServer 1..n
i now want to add the ability for our internal Application Servers to
terminate their outbound calls through the kamailio system.
currently i've setup a gateway in the (freeswitch) application server
that has the kamailio system set as outbound-proxy. this leads to sip
calls started with
originate sofia/gateway/kamailio/<number>@<outbound carrier IP>
to be sent to the kamailio system which then forwards it to the given
carrier IP. Sadly our main carrier answers with "503 service unavailable
- no bandwith available". (maybe due to the internal ip-addresses within
some of the headers?)
i've attached our current kamailio configuration and also a pcap of a
call i tried to start with our main carrier.
i tried this way as it seemed to be the easiest way so our application
servers still can select the outbound carrier within their flow.
maybe i'm on the wrong way here and need to solve this problem in a
completely different way i don't know.
TLDR: sip proxying does not work as expected. need a way to achieve
outbound calls routed through kamailio from internal application servers
any hint/help into the right direction is appreciated
Best Regards
Christoph Russow
--
________________________________________________________________
EMTEX GmbH
Christoph Russow
Software Engineer
Bischof-Otto-Weg 9
D-91086 Aurachtal
Geschäftsführer: Markus Enzinger
Tel. +49 9132 7490 0 Sitz der Gesellschaft: 91086 Aurachtal
Fax. +49 9132 7490 900 Amtsgericht Fürth: HRB6804
________________________________________________________________
Hello,
What choices do I have to implement a feature to Kamailio which would
limit calls per customer?
The environment:
Two kamailio nodes sitting in different sites and they are not aware
of each others sessions/dialogs and thus serving customer calls
independently. Configurations on the nodes are identical excluding ip
addresses. Customer call can be routed through either one of these Kam
nodes. The two nodes share a common external mysql database from which
all dialplan and htable entries are loaded (used in call routing for
example).
Customers are identified based on IP address & tel numbering and as a
final result we are populating an variable which holds the customer id
$var(REALM_NAME) when the identification has been done. The call
limiting should be "tagged/profiled" somehow with this information if
possible.
Any suggestions which way to go with this?
Initial ideas if one of these are worth of setting a starting point:
-> Counting calls with htable and replicating with DMQ to other node
(can the data survive from a restart?)
-> Using the common mysql database to hold the counted calls from
where both kam nodes could load data? (database load increasing?)
-> Some new exciting module for this job?
Cheers,
Olli
Hi
we have configured snmp module on our Kamailio server following https://www.kamailio.org/dokuwiki/doku.php/utils:kamailio-and-snmp guidance.
Description
we could able to poll or snmpwalk most of the OIDs in KAMAILIO-REG-MIB , KAMAILIO-SIP-SERVER-MIB but having issues below from KAMAILIO-SIP-COMMON-MIB
snmpd[358730]: Cannot adopt OID in KAMAILIO-SIP-COMMON-MIB: kamailioSIPStatsMethod ::= { kamailioSIPMethodStatsEntry 1 }
Cannot adopt OID in KAMAILIO-SIP-COMMON-MIB: kamailioSIPStatsOutbounds ::= { kamailioSIPMethodStatsEntry 2 }
Cannot adopt OID in KAMAILIO-SIP-COMMON-MIB: kamailioSIPStatsInbounds ::= { kamailioSIPMethodStatsEntry 3 }
Cannot adopt OID in KAMAILIO-SIP-COMMON-MIB: kamailioSIPStatusCodeMethod ::= { kamailioSIPStatusCodesEntry 1 }
Cannot adopt OID in KAMAILIO-SIP-COMMON-MIB: kamailioSIPStatusCodeValue ::= { kamailioSIPStatusCodesEntry 2 }
Cannot adopt OID in KAMAILIO-SIP-COMMON-MIB: kamailioSIPStatusCodeIns ::= { kamailioSIPStatusCodesEntry 3 }
Cannot adopt OID in KAMAILIO-SIP-COMMON-MIB: kamailioSIPStatusCodeOuts ::= { kamailioSIPStatusCodesEntry 4 }
Cannot adopt OID in KAMAILIO-SIP-COMMON-MIB: kamailioSIPStatusCodeRowStatus ::= { kamailioSIPStatusCodesEntry 5 }
Troubleshooting
root@host# snmpwalk -v2c -c public localhost .1.3.6.1.4.1.34352.3.1.1.1.4.1.1.2.0
SNMPv2-SMI::enterprises.34352.3.1.1.1.4.1.1.2.0 = No Such Object available on this agent at this OID
root@host# snmpwalk -v2c -c public localhost .1.3.6.1.4.1.34352.3.1.1.1.4.1.1.2
SNMPv2-SMI::enterprises.34352.3.1.1.1.4.1.1.2 = No Such Object available on this agent at this OID
Reproduction
using snmpwalk or snmget to any of the above mentioned kamailioSIPStats* OIDs will do
Additional Information
* Kamailio Version - output of kamailio -v
version: kamailio 5.5.1 (x86_64/linux) 307af8-dirty
* Operating System:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Any advice, why we seeing this issue for these OIDs ? Are these decremented now ?
Regards,
Arun Bonela
Arun Bonela
UCaaS Ops – Technical Lead
Tel: 0333 043 7319
Mobile: 07468 728 007
Email: Arun.Bonela(a)gamma.co.uk
This is an email from Gamma Telecom Ltd, trading as “Gamma”. The contents of this email are confidential to the ordinary user of the email address to which it was addressed. This email is not intended to create any legal relationship. No one else may place any reliance upon it, or copy or forward all or any of it in any form (unless otherwise notified). If you receive this email in error, please accept our apologies, we would be obliged if you would telephone our postmaster on +44 (0) 808 178 9652 or email postmaster(a)gamma.co.uk
Gamma Telecom Limited, a company incorporated in England and Wales, with limited liability, with registered number 04340834, and whose registered office is at 5 Fleet Place, London, EC4M 7RD and whose principal place of business is at Kings House, Kings Road West, Newbury, Berkshire, RG14 5BY.
Hi,
I resend this mail because of the initial destination address was not
correct.
The topic was a logging problem :
With the upgrade of my SIP Router proxies to RHEL 7 (and Kamailio 5.0.7) ,
we encounter problems where the logs are blocked to be written in the
syslog.
This problem is similar as the one reported in this article : [SR-Users]
Kamailio logs in RHEL 7 environment
<https://lists.kamailio.org/pipermail/sr-users/2018-April/101065.html> .
The resolution was to increase some journald/rsyslog settings
(RateLimitBurst=1000000 / $imjournalRatelimitInterval 1
$imjournalRatelimitBurst 500000).
But it is somehow a workaround.
Im looking to know if it should be possible for kamailio to write directly
the logs to the syslog only.
Thanks in advance to those can help me.
Regards
Patrick Ginhoux
De : Ginhoux, Patrick
Envoyé : lundi 22 novembre 2021 16:49
À : 'sr-users' <sr-users-bounces(a)lists.kamailio.org>
Objet : How to not write logs to journald with kamailio
Hi,
With the upgrade of my SIP Router proxies to RHEL 7 (and Kamailio 5.0.7) ,
we encounter problems where the logs are blocked to be written in the
syslog.
This problem is similar as the one reported in this article : [SR-Users]
Kamailio logs in RHEL 7 environment
<https://lists.kamailio.org/pipermail/sr-users/2018-April/101065.html> .
The resolution was to increase some journald/rsyslog settings
(RateLimitBurst=1000000 / $imjournalRatelimitInterval 1
$imjournalRatelimitBurst 500000).
But it is somehow a workaround.
Im looking to know if it should be possible for kamailio to write directly
the logs to the syslog only.
Thanks in advance to those can help me.
Regards
Patrick Ginhoux
My log is filled with this and have been unsuccessful locating additional information by increasing debug level.
Any thoughts on how to quickly isolate?
/usr/local/sbin/kamailio[7678]: ERROR: jansson [jansson_funcs.c:48]: janssonmod_get_helper(): json error at line 1, col 0: '[' or '{' expected near end of file
/usr/local/sbin/kamailio[7677]: ERROR: jansson [jansson_funcs.c:46]: janssonmod_get_helper(): failed to parse json:
/usr/local/sbin/kamailio[7677]: ERROR: jansson [jansson_funcs.c:48]: janssonmod_get_helper(): json error at line 1, col 0: '[' or '{' expected near end of file
/usr/local/sbin/kamailio[7675]: ERROR: jansson [jansson_funcs.c:46]: janssonmod_get_helper(): failed to parse json:
/usr/local/sbin/kamailio[7675]: ERROR: jansson [jansson_funcs.c:48]: janssonmod_get_helper(): json error at line 1, col 0: '[' or '{' expected near end of file
-dan
If your db supports DB_CAP_FETCH, lcr rules are loaded from the db 1024
rows per cycle. You could check what you get to syslog from this statement
after you set log level to debug level and then execute lcr.reload:
LM_DBG("loading, cycle %d with <%d> rows\n", n++, RES_ROW_N(res));
-- Juha
Hello, First time poster and I am stuck.
I am using K as a mid registar to several AST boxes. The problem I am
having is if AST or the END USER DEVICE sends a 302 for some reason I am
getting a 500 THEN the 302 to the END USER DEVICE or AST depending which
direction the call flow is.
Example
END USER DEVICE -> CALLS 700 -> K -> AST
AST -> 302 -> K -> 500 & 302 -> END USER DEVICE
What I would like to happen is when K receives the 302 it deals with it
directly and it is not handed off to either end.
I am using a configuration I found online with some base modifications to
dip into the database real time to get the AST box IPS
Any direction would be helpful.
Thank you,
Nathan