I'm trying to configure HOMER sip capture server to do some accounting
of the cases when "503 Service Unavailable" message arrives from
capture agents.
I've implemented the following to record the source IPs from which 503
message originates.
onreply_route {
......................
......................
......................
else if(status == "503") {
if($sht(a=>alarm::503) == $null) {
$sht(a=>alarm::503) = 0;
$sht(a=…
[View More]>alarm::$si::503) = 0;
}
xlog("Got 503");
xlog("($sht(a=>alarm::$si::503))");
$sht(a=>alarm::$si::503) = $sht(a=>alarm::$si::503) + 1;
}
...................
...................
...................
The following route supposed run periodically to update the databases.
}
route[TIMER_STATS] {
.....................
.....................
xlog("($sht(a=>alarm::$si::503))");
if($sht(a=>alarm::$si::503) > 0) {
sql_query("cb", "INSERT INTO alarm_data (create_date, type,
total, description, source_ip) VALUES(NOW(), 'Too Many 503',
$sht(a=>alarm::$si::503), 'service unavailable', $si)");
xlog("adding stuff to db");
}
$sht(a=>alarm::503) = 0;
$sht(a=>alarm::$si::503) = 0;
}
But the xlog("adding stuff to db") never executed. But in the first
block of code, the log message to print the value
$sht(a=>alarm::$si::503), which is shown to be non zero.
Don't understand why its not working.
--
-Cheers
-Arif
[View Less]
I am looking for something that would act as front end to various SIP PBX systems. I am using Asterisk, but compatibility with others might be necessary. What I want to do is pass subscribe requests with certain content types to an external program (written in Java) and the rest onto the SIP PBX. Can Kamailio do this and if so, is there some example config files somewhere that I can look at to get started?
Tom Johnson<mailto:tjohnson@microautomation.com> | Senior Software Engineer
…
[View More]O: 703-543-2118 | F: 703-543-2099
5870 Trinity Parkway, Suite 600, Centreville, VA 20120
[cid:image001.png@01CE18AF.8F231EB0]<http://www.microautomation.com/>
[View Less]
looking at the code, i appears that mt_match does not initialize
pv_values pv when it stores matched values thus keeping possible
existing values from previous calls. is that intended behavior? readme
uses word "store".
-- juha
looks like 4.1 and master mtree README is missing these parameters:
{"pv_dstid", STR_PARAM, &dstid_param.s},
{"pv_weight", STR_PARAM, &weight_param.s},
{"pv_count", STR_PARAM, &count_param.s},
i didn'd find in the code any use for the last.
-- juha
defined($avp(foo)) can be used to test if avp $avp(foo) has been
defined. i looked through kamailio wiki, but didn't find defined
function documented anywhere.
-- juha
Hi,
I'm trying to fetch attribute list with kamailio ldap_search:
ldap_search("ldap://agents/ou=Xxxxx,dc=xxxx,dc=yyyyyy,dc=zz?memberOf?sub?(sAMAccountName=$fU)");
ldap_result("memberOf/$avp(s:ldapmemberof1)");
xlog("L_INFO", "LDAP $fU memberOf = $avp(s:ldapmemberof1)");
if (ldap_result_next())
{
xlog("L_INFO", "if loop ldap_result");
ldap_result("memberOf/$avp(s:ldapmemberof2)");
xlog("L_INFO", "LDAP $fU memberOf = $avp(s:ldapmemberof2)");
}
There's must be seven …
[View More]returning attributes list of memberOf, but I can only
retrieve only one of them (looks like last of seven). First xlog output log
into my log file, but if loop didn't start. What I'm doing wrong?
[View Less]
Hi,
I have a kamailio with the dispatcher module setup. I use:
ds_select_dst("1", "9");
to load balance between 3 gateways.
My database looks like this:
id setid destination flags priority attrs
5 1 sip:1.1.1.1 0 0 weight=10
8 1 sip:1.1.1.2 0 0 weight=45
9 1 sip:1.1.1.3 0 0 weight=45
As I understand it, most of the calls should be split evenly between
gateways 8 and 9, and some calls (around 10%) going to gateway 5.
Well, gateway 8 gets 99% of the calls. I am using kamailio 4.1 …
[View More]and I really
cannot understand why this is happening. Running ds_list shows me that all
gateays and weights are correctly parsed into kamailio.
This is the result of my ds_list:
SET:: 1
URI:: sip:1.1.1.1 flags=AP priority=0 attrs=weight=10
URI:: sip:1.1.1.2 flags=AP priority=0 attrs=weight=45
URI:: sip:1.1.1.3 flags=AP priority=0 attrs=weight=45
I have tried changing the priority to 100, or to 1 in every gateway, and
the result is still the same. I have tried adding ; after the weight
parameter, the colon is gone in the ds_list once kamailio parses it.
If, keeping the same database, I use ds_select_dst("1", "0") the calls are
split evenly across all 3 gateways. This is great, but not what I want, but
it at least proves that something is working.
Is there anything else I can try?
Thanks a lot for the help!
Alex
[View Less]
Slightly offtopic, but for QA reasons I'm interested in logging RTCP reports
from peers that send them. It looks like rtpproxy-ng might be used to do this
(I'm already using rtpproxy anyway). Is someone already doing this and willing
to share some pointers?
I am in need of a Kamailio expert that has some availability for
consulting services (remote is fine). Feel free to contact me for details.
Thanks,
Sharan Harkisoon
Hi Gents,
We have created a small redirect server using the Lua API to get the
destinations.
Lets say that it takes some time while the script generates the answer,
during this time we got a CANCEL.
How we can handle this properly ? As far as I could see the TM module
always sends back the answer (302) and after that I get the "CANCEL" in
my script.
Here is my config: http://pastebin.com/7PyKBJyD
Here is my test Lua script: http://pastebin.com/6VXn5y8m
Could you please help me what is the …
[View More]best way to handle the CANCEL ?
Is it possible to do it properly ?
Thanks,
Misi
[View Less]
I am planing to implement mediaproxy so which NAT module will be good for
media proxy and why?
should i use nat_traversal ro nathelper ? I haven't see any example people
using nat_traversa. most of example i found on google are based on
nathelper so just want to make sure which one i should use and why?
Hello,
A question on Kamailio variables and using dispatcher:
When in failure_route I want to know if the request message was going to a
dispatcher ip or a sip client ip (as in any other than dispatcher ip), how
do I make an if statement for that?
If I use ds_is_from_list(), I get wrong results because in both cases the
request was sent by Kamailio. Also, I don't seem to be able to get the
source ip of the 4xx message (src_ip shows the source ip of the request
message).
cheers,
Olli
Hi
I just created an account with iptel.org.
But I can not log in to my account through my SIP software from OSX.
Please see below for details:
I type “Alexis82” as password.
All the best,
Alexis
I have post many question on topology hiding any not get any reply back from people and developers now I don't have any option except some goofy hack
When I use topology hiding it removes Route: and because of that callee doesn't able to send BYE back to opensips.
I want use insert_hf to inject Route: so I get clean BYE message. Do you guys have any suggestion?
Sent from my iPhone
Hi All
I'm scratching my head on this one, I have set everything up in the following configuration:
Public ip natted to DMZ via Cisco ASA 5510 <= DMZ => Kamailio & RTP Proxy <= Voice DMZ => Asterisk
My kamailio configuration is based heavily on the one found here: http://saevolgo.blogspot.co.uk/2013/08/rtpproxy-revisited-kamailio-40.html & http://saevolgo.blogspot.co.uk/2011/11/how-to-increasing-voip-services.html
So far everything is working fine, I can register via …
[View More]the public IP address, IM & presence is working, and as does audio, however when I dial an extension the caller id comes up like this 12345@172.16.15.123:5080<mailto:12345@172.16.15.123:5080> which is the ip addresses of the asterisk server that the dispatcher has assigned to the call, I have tried setting the P-Asserted-Identity, P-Preferred-Identity & Remote-Party-ID headers to no effect. What I would like to achieve is that the public IP or domain name comes up when I call an extension. From examining the sip traffic traversing the kamailio box, it seems that the From and Contact headers sent by asterisk are the source of the internal implementation information reaching the end-user.
How can I prevent implementation information like this leaking out? I consider this to be a security risk as I don't want anyone to be able to enumerate the number of servers that comprise a given cluster as easily as placing a few calls, ideally I only want data relating to the public side of the network getting out. But I would be happy if it takes digging into the sip traffic to glean any details initially.
I'm getting the feeling that this could well be an asterisk configuration issue, so apologies if this is a little off topic, however I have been unable to find a similar configuration to try and achieve my desired results.
Tim.
[View Less]
Hi,
Back in Kamailio 1.5, the release notes state:
"support for TLS server_name extension (aka SNI=server name indication)"
However, I cannot find any indication of this in the current TLS docs, and
trying to set tls_server_name or server_name in tls.cfg fails with
"unsupported option".
Is this actually supported?
Thanks.
-Barry Flanagan
Please consider the following SIP packet exchange, as seen by a tcpdump running on 201.234.196.170. Here 198.58.101.75 initiates a call to 201.234.196.170:
IP 198.58.101.75.5060 > 201.234.196.170.5060
INVITE sip:*43@201.234.196.170:5060 SIP/2.0
Via: SIP/2.0/UDP 198.58.101.75:5060;branch=z9hG4bK7a792c1e;rport
Max-Forwards: 70
From: "9002" <sip:9002@198.58.101.75>;tag=as0bc522a9
To: <sip:*43@201.234.196.170:5060>
Contact: <sip:9002@198.58.101.75:5060>
Call-ID: …
[View More]2c14c21f5052a74a78ca4ab736657b00@198.58.101.75:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.8.1(1.8.20.0)
Date: Fri, 29 Aug 2014 18:23:17 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 299
v=0
o=root 521741684 521741684 IN IP4 198.58.101.75
s=Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3
c=IN IP4 198.58.101.75
t=0 0
m=audio 16426 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
IP 201.234.196.170.5060 > 198.58.101.75.5060
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 198.58.101.75:5060;branch=z9hG4bK7a792c1e;rport=5060
From: "9002" <sip:9002@198.58.101.75>;tag=as0bc522a9
To: <sip:*43@201.234.196.170:5060>
Call-ID: 2c14c21f5052a74a78ca4ab736657b00@198.58.101.75:5060
CSeq: 102 INVITE
Server: kamailio (4.1.5 (x86_64/linux))
Content-Length: 0
IP 201.234.196.170.5060 > 198.58.101.75.5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 198.58.101.75:5060;branch=z9hG4bK7a792c1e;rport=5060
Record-Route: <sip:127.0.0.1;r2=on;lr=on;ftag=as0bc522a9;vsf=SRoZSkpbSEZbLF1YW0dGeB8ICB8bDxsxMDEuNzU-;nat=yes>
Record-Route: <sip:192.168.2.18;r2=on;lr=on;ftag=as0bc522a9;vsf=SRoZSkpbSEZbLF1YW0dGeB8ICB8bDxsxMDEuNzU-;nat=yes>
From: "9002" <sip:9002@198.58.101.75>;tag=as0bc522a9
To: <sip:*43@201.234.196.170:5060>;tag=as2798a3b9
Call-ID: 2c14c21f5052a74a78ca4ab736657b00@198.58.101.75:5060
CSeq: 102 INVITE
Server: Asterisk PBX 11.12.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:*43@127.0.0.1:5080;alias=127.0.0.1~5080~1>
Content-Type: application/sdp
Require: timer
Content-Length: 305
v=0
o=root 159029581 159029581 IN IP4 201.234.196.170
s=Asterisk PBX 11.12.0
c=IN IP4 201.234.196.170
t=0 0
m=audio 18446 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
a=nortpproxy:yes
According to a strict interpretation of the SIP RFC, which address should the machine at 198.58.101.75 use to send the subsequent ACK? Which field(s) are to be used to extract said address? I am trying to understand an issue of a missing ACK between
201.234.196.17x and a different public IP, with the only difference that the other IP is not running Asterisk. For the exchange shown above, 201.234.196.170 receives an ACK, but I want to know whether the packets correctly indicate the address for the ACK,
or whether the Asterisk at 198.58.101.75 is compensating for a malformed packet.
[View Less]
Hi Senthil,
You can use record_route function to add Record_route header
in INVITE message( use rr.so module). This record_route header will become
Route header while sending BYE message from client. Suppose if you want add
directly Route header, then you can use Insert_hf function. Please go thru
the textops modules for the same.
Regards
surendra
Sorry for putting this question on both dev and user mailing lists, as it
is a rather theoretical question and i hope some SIP guru on either mail
list will answer.
For non-WS endpoints which use TCP or UDP for SIP transport, each upstream
request has top most VIA header pointing to the previous hop which
forwarded the request to current hop while each downstream request has top
most VIA header pointing to next hop to which it will be forwarded from
current hop.
But for WS endpoints, the top …
[View More]most VIA has dummy static value, so there is
no way to identify who sent this request or to whom the reply is going to.
Please note that i am not specifically interested in network address of
remote endpoint (though VIA header is suppose to provide it), i only need
to match requests and responses from / to a specific device using SIP v2.0
standard.
Any help is highly appreciated.
Thank you.
[View Less]
Dear Kamailio-Community,
i would be very pleased when someone could help me with my private non-profit project.
I do not want other people to do my work, but i'm not as good with SIP as i should to solve this problem by myself.
So here is my Goal:
Use Kamailio as (TLS-SIP-)Gateway to my (non-TLS)-FritzBox to do (local-country) fixed-line Calls from all over the World.
In Detail:
Connect to (Portforwarded / NAT behind Fritzbox-Router) Kamalio-Server with User from "Subsriber-List" by TLS-…
[View More]SIP
Now I want Kamailio to connect to local fritz.box (by SIP) with one fritzbox-user to handle all invites and calls.
-------------------------------
Scenario (fictional):
Fritzbox (Router and VOIP-Server)
Internal-IP: 192.168.178.1 or fritz.box
External-IP: dynip.de
VOIP-User: 610
VOIP-Passwort: test
Kamailio (running on RaspberryPI and Siremis)
Internal-IP: 192.168.178.2
Network Gateway: 192.168.178.1
Connection from Outside (NAT): dynip.de:5061
User: euser
Pass: epass
-------------------------------
Questions:
Is there a Module i could use to do this Job? (configurable through Siremis e.g. Dispatcher List?)
How can i ensure that my user "euser" from subsriber-list connects with 610:test to fritz.box?
Is there a simple configuration to solve this problem?
I'm sorry to ask you these my non-skilled questions, since it is not my business to use SIP, but this scenario could be a useful tutorial for many many fritz.box users over the world. Roaming prices for mobile-calls could be safed with sitting into next McDonalds and do a SIP-Call through free Wifi.
Thank you very much!
I would be very grateful to get some help.
Sincerly yours
Lukatz
[View Less]
Hello Kamailio Team,
I am using kamailio server successfully for some time now. I have a
specific set of problem. We have a Kamailio Server setup in Amazon EC2
Cloud, the users are able to register on the server and make use of this.
*Now the problem:*
If I am trying to register multiple SIP clients from same
Public_IP:Private_IP (i.e. alice and bob from same computer) on a kamailio
server which is sitting behind Amazon EC2 Cloud Based Server, then only the
first user (who sends REGISTER …
[View More]packet first) is able to register
successfully on the server and all the other users after the first one are
not able to register on the server. Am I missing something in the
configuration file such that this is happening.
Please help in this regard. Waiting in anticipation
Thanks & Best Regards
Saurabh Srivastava
[View Less]