would it be possible to enhance avpops module to print config file line
number when error occurs?
now i just get:
Jun 24 14:13:43 host /usr/sbin/sip-proxy[29890]: ERROR: avpops
[avpops_impl.c:1170]: ops_check_avp(): value types don't match
-- juha
Hey list,
I've been trying the relay OPTIONS messages from an asterisk
server through kamailio to clients so to preserve the qualify feature in
asterisk. So
ASTERISK -----OPTIONS----> KAMAILIO ------------> UA
UA ----OK-----> KAMAILIO ---OK-----> ASTERISK
But I'm seeing floods of OPTIONS messages between asterisk and kamailio
now. So much so that kamailio seems to deadlock introducing 10 -20 second
delays in processing messages
firstly I've enabled the options.so but this is just enable remote
monitoring of the application and in my FROMASTERISK route
#!ifdef WITH_ASTERISK
# Test if coming from Asterisk
route[FROMASTERISK] {
# if($si==$sel(cfg_get.asterisk.bindip)
# && $sp==$sel(cfg_get.asterisk.bindport))
if ((method==OPTIONS) && (uri=~"sip:.*[@]+.*")) {
xlog("L_INFO","Options Reply from $ru to $fu\r\n");
return 1;
}
if(ds_is_from_list("2")){
$sht(forw=>$ft)=$si;
xlog("L_INFO","INVITE: INVITE Passed From [$fu] Asterisk
Cluster To [$rm:$au].\n");
return 1;
}
return -1;
}
I've included a debug below, stating *RFC3261 transaction matching failed. *Can
anyone help or advise on how I should solve this
Thanks in advance
Ian
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:630]: SIP Request:
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:632]: method: <OPTIONS>
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:634]: uri: <sip:XXXXXXXX@P.P.P.P:5060>
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:636]: version: <SIP/2.0>
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/parse_via.c:1287]: Found param type 232, <branch> =
<z9hG4bK50c02ae3>; state=6
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/parse_via.c:1287]: Found param type 235, <rport> = <n/a>; state=17
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/parse_via.c:2300]: end of header reached, state=5
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:515]: parse_headers: Via found, flags=2
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:517]: parse_headers: this is the first via
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [receive.c:145]: After
parse_msg...
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [receive.c:186]:
preparing to run routing scripts...
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [socket_info.c:501]:
grep_sock_info - checking if host==us: 10==10 && [P.P.P.P] == [P.P.P.P]
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [socket_info.c:504]:
grep_sock_info - checking if port 5060 matches port 5060
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [socket_info.c:501]:
grep_sock_info - checking if host==us: 10==10 && [A.A.A.A] == [P.P.P.P]
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [forward.c:446]:
check_self: host != me
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/parse_to.c:174]: DEBUG: add_param: tag=as2c63e7cc
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/parse_to.c:803]: end of header reached, state=29
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/parse_to.c:803]: end of header reached, state=10
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:187]: DEBUG: get_hdr_field: <To> [32];
uri=[sip:XXXXXXXX@P.P.P.P:5060]
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:167]: get_hdr_field: cseq <CSeq>: <102> <OPTIONS>
KamP /usr/local/sbin/kamailio[19288]: DEBUG: maxfwd [mf_funcs.c:85]: value
= 70
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:201]: DEBUG: get_hdr_body : content_length=0
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core>
[parser/msg_parser.c:103]: found end of header
KamP /usr/local/sbin/kamailio[19288]: DEBUG: geoip [geoip_pv.c:395]:
attempt to match: A.A.A.A
KamP /usr/local/sbin/kamailio[19288]: DEBUG: geoip [geoip_pv.c:401]: geoip
PV updated for: A.A.A.A
KamP /usr/local/sbin/kamailio[19288]: INFO: <script>: SIP message from
unprohibited source IE (ip: A.A.A.A) - Packet accepted
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [msg_translator.c:204]:
check_via_address(A.A.A.A, A.A.A.A, 0)
KamP /usr/local/sbin/kamailio[19288]: DEBUG: siputils [checks.c:73]: no
totag
KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_lookup.c:1081]: DEBUG:
t_check_msg: msg id=294 global id=293 T start=0xffffffffffffffff
*KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_lookup.c:528]:
t_lookup_request: start searching: hash=44040, isACK=0*
*RFC3261 transaction matching failedKamP /usr/local/sbin/kamailio[19288]:
DEBUG: tm [t_lookup.c:485]: DEBUG: RFC3261 transaction matching failed
KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_lookup.c:711]: DEBUG:
t_lookup_request: no transaction found*
KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_lookup.c:1150]: DEBUG:
t_check_msg: msg id=294 global id=294 T end=(nil)
KamP /usr/local/sbin/kamailio[19288]: INFO: <script>: SIP Dialog From
Asterisk Gatways A.A.A.A- No Authentication
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [socket_info.c:501]:
grep_sock_info - checking if host==us: 10==10 && [P.P.P.P] == [P.P.P.P]
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [socket_info.c:504]:
grep_sock_info - checking if port 5060 matches port 5060
KamP /usr/local/sbin/kamailio[19288]: DEBUG: siputils [checks.c:73]: no
totag
KamP /usr/local/sbin/kamailio[19288]: DEBUG: rr [record.c:519]:
rr_param_buf=<;nat=yes>
KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_lookup.c:1379]: DEBUG:
t_newtran: msg id=294 , global msg id=294 , T on entrance=(nil)
KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_lookup.c:528]:
t_lookup_request: start searching: hash=44040, isACK=0
KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_lookup.c:485]: DEBUG:
RFC3261 transaction matching failed
KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_lookup.c:711]: DEBUG:
t_lookup_request: no transaction found
KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_hooks.c:374]: DBG:
trans=0x2b8a8f4f0ed8, callback type 1, id 0 entered
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [msg_translator.c:204]:
check_via_address(A.A.A.A, A.A.A.A, 0)
KamP /usr/local/sbin/kamailio[19288]: DEBUG: tm [t_funcs.c:388]: SER: new
transaction fwd'ed
KamP /usr/local/sbin/kamailio[19288]: DEBUG: <core> [usr_avp.c:646]:
DEBUG:destroy_avp_list: destroying list (nil)
KamP last message repeated 5 times
Hi Allen!
Again on-list, please do not use private emails unless you have to
provide sensitive data.
On 28.06.2013 01:17, Allen Zhang wrote:
> Hi Klaus,
>
> I dived into it and found the problem:
>
> When UA2 send a REGISTER to the load balancer, fix_nated_register() is called and source ip of the UA is stored in the connection hash by tcpconn_new(), instead of the port from the contact header field.
> But when proxy tries to send the INVITE to UA2 via the load balancer, the load balancer calls tcpconn_find() with the port from the contact header field.
> Hence can't match the connection stored in hash.
I do not understand that.
fix_nated_register stores both info: the original contact +
src-ip:port:transport.
After lookup(), the Request-URI is filled with the original contact, but
$du (destination URI, internally used by Kamailio for routing) is
populated with src-ip:port:transport. Thus, Kamailio should use the $du
to find the TCP connection.
Anyway, TLS debugging is always difficult. I suggest to try to make it
running with TCP. If TCP works, TLS will work too.
regards
Klaus
>
> I need to use fix_nated_register() because the UA will be behind NAT in the future. How do I let the LB use aliased port instead of the port from the contact header field?
>
> Regards,
>
> Allen
>
>
> -----Original Message-----
> From: Klaus Darilion [mailto:klaus.mailinglists@pernau.at]
> Sent: Thursday, 27 June 2013 10:54 p.m.
> To: Kamailio (SER) - Users Mailing List
> Cc: Allen Zhang; Shane Harrison
> Subject: Re: [SR-Users] kamailio loadbalancer with TLS problem forwarding INVITE back to UA
>
> make sure to also use handle_ruri_alias()
> http://kamailio.org/docs/modules/4.0.x/modules/nathelper.html#idp16851488
> for requests from the proxy->lb->client
>
> see the default kamailio config for proper usage of handle_ruri_alias() and add_contact_alias()
>
> regards
> klaus
>
>
> On 27.06.2013 02:34, Allen Zhang wrote:
>> Hi,
>>
>> Our set up:
>>
>> UA1 -----
>>
>> ------ Proxy1
>>
>>
>> \
>> /
>>
>> Loadbalancer (dispatcher module)
>>
>> / \
>>
>> UA2-----
>>
>> ------ Proxy2
>>
>> Both proxies have registrar module loaded and share the same database.
>>
>> REGISTERs work fine.
>>
>> The problem is this:
>>
>> TLS TCP
>>
>> UA1 ----------------------> LB --------------------> Proxy
>>
>> INVITE(to UA2) INVITE(to UA2)
>>
>> TLS TCP
>>
>> UA1 <------------- LB <------------- Proxy
>>
>> 100 Trying
>>
>> TLS TCP
>>
>> UA1 <------------- LB <----------------------- Proxy
>>
>> INVITE(to UA2)
>>
>> TLS
>> TCP
>>
>> UA1 <----------------------- LB <----------------------- Proxy
>>
>> 100 Trying
>>
>> All above worked fine. Below is what's expected but never happened:
>>
>> TLS
>> TCP
>>
>> UA2 <----------------------- LB <----------------------- Proxy
>>
>> INVITE(to UA2)
>>
>> We'd like the LB to reuse the TLS connection initiated by UA2. But LB
>> can't find an open connection and tries to start a new TLS connection.
>> The new connection fails.
>>
>> UAs are not behind NAT at the moment but will be in the future.
>>
>> Tried this approaches on LB:
>>
>> route(ADD_CONTACT_ALIAS);
>>
>> If (not from proxy)
>>
>> t_relay();
>>
>> else
>>
>> do load balancing
>>
>> No luck.
>>
>> Any help is appreciated.
>>
>> Regards,
>>
>> Allen
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>> list sr-users(a)lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
Hi!
I've the following setup: Teleco <-> Kamailio <-> Asterisk(s)
The proxy has one public IP (say 1.2.3.4) and one private (10.0.0.1).
The asterisk-pbx:es has private adresses (10.0.0.2 in this example)
I noticed that if I bind like this in kamilio.cfg
listen=tcp:1.2.3.4:5060
listen=udp:1.2.3.4:5060
listen=tcp:10.0.0.1:5060
listen=udp:10.0.0.1:5060
Then if a call comes in from the Telco to Kamailio (1.2.3.4), kamailio
should forward the SIP-packet from it's private address (10.0.0.1) to
asterisk (10.0.0.2)
However, the source address of the packets sent from Kamilio to Asterisk
is wrong - it uses the public ip. Like this (tcpdump output):
15:02:08.999642 IP 1.2.3.4.sip > 10.0.0.1.5060: SIP, length: 1346
15:02:09.474525 IP 1.2.3.4.sip > 10.0.0.1.5060: SIP, length: 1346
15:02:10.474524 IP 1.2.3.4.sip > 10.0.0.1.5060: SIP, length: 1346
15:02:12.474525 IP 1.2.3.4.sip > 10.0.0.1.5060: SIP, length: 1346
Obviously kamailio doesn't get any answers here. The packet goes out of
the right interface, but with the wrong src-address.
However, if I remove the lines with "listen=" in kamailio.cfg to allow
kamilio to bind to all interfaces the src-address is correct and
everything works!
(I've also done some tests with icmp and telnet and the src-addr seems
right in all these cases.)
Is this a bug or am I missing something here?
--
Johan Wilfer
Hi,
I'm using the xhttp_pi module to query the kamailio user registration table "location". Per the defined clause_cols operators in the module, it doesn't seem possible to achieve a query equivalent to a SQL "contains" or "like".
An exact match is required to query the record; e.g., http://xxxxxxx/location/QueryContacts?cmd=on&0=sip:8675309@a.b.c.d:5060;tra…. Is my understanding correct that there is no way to match on an regular expression? My end goal is to be able to query for a user's AOR and expiration status based on a search string (e.g. 8675309) via a webservice. Can anyone share a better method to do this? Perhaps asynchronously? All feedback is appreciated.
Sample contact field:
sip:8675309@a.b.c.d:5060;transport=udp
Sample Framework:
<cmd><cmd_name>QueryContacts</cmd_name>
<db_table_id>location</db_table_id>
<cmd_type>DB1_QUERY</cmd_type>
<clause_cols>
<col><field>contact</field><operator>=</operator></col>
</clause_cols>
<query_cols>
<col><field>username</field></col>
<col><field>contact</field></col>
<col><field>expires</field></col>
</query_cols>
</cmd>
Thanks,
Simpson
________________________________
From: "sr-users-request(a)lists.sip-router.org" <sr-users-request(a)lists.sip-router.org>
To: sr-users(a)lists.sip-router.org
Sent: Thursday, June 27, 2013 5:00 AM
Subject: sr-users Digest, Vol 97, Issue 104
Send sr-users mailing list submissions to
sr-users(a)lists.sip-router.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
or, via email, send a message with subject or body 'help' to
sr-users-request(a)lists.sip-router.org
You can reach the person managing the list at
sr-users-owner(a)lists.sip-router.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of sr-users digest..."
Today's Topics:
1. kamailio loadbalancer with TLS problem forwarding INVITE back
to UA (Allen Zhang)
2. Re: dialplan not working (Victor V. Kustov)
----------------------------------------------------------------------
Message: 1
Date: Thu, 27 Jun 2013 00:34:00 +0000
From: Allen Zhang <Allen.Zhang(a)imgtec.com>
To: "sr-users(a)lists.sip-router.org" <sr-users(a)lists.sip-router.org>
Cc: Shane Harrison <Shane.Harrison(a)imgtec.com>
Subject: [SR-Users] kamailio loadbalancer with TLS problem forwarding
INVITE back to UA
Message-ID:
<04588C075527D74CABD19E7C320BCB1C013BE6F6(a)WEMAIL01.we.imgtec.org>
Content-Type: text/plain; charset="us-ascii"
Hi,
Our set up:
UA1 ----- ------ Proxy1
\ /
Loadbalancer (dispatcher module)
/ \
UA2----- ------ Proxy2
Both proxies have registrar module loaded and share the same database.
REGISTERs work fine.
The problem is this:
TLS TCP
UA1 ----------------------> LB --------------------> Proxy
INVITE(to UA2) INVITE(to UA2)
TLS TCP
UA1 <------------- LB <------------- Proxy
100 Trying
TLS TCP
UA1 <------------- LB <----------------------- Proxy
INVITE(to UA2)
TLS TCP
UA1 <----------------------- LB <----------------------- Proxy
100 Trying
All above worked fine. Below is what's expected but never happened:
TLS TCP
UA2 <----------------------- LB <----------------------- Proxy
INVITE(to UA2)
We'd like the LB to reuse the TLS connection initiated by UA2. But LB can't find an open connection and tries to start a new TLS connection. The new connection fails.
UAs are not behind NAT at the moment but will be in the future.
Tried this approaches on LB:
route(ADD_CONTACT_ALIAS);
If (not from proxy)
t_relay();
else
do load balancing
No luck.
Any help is appreciated.
Regards,
Allen
Hi,
Our set up:
UA1 ----- ------ Proxy1
\ /
Loadbalancer (dispatcher module)
/ \
UA2----- ------ Proxy2
Both proxies have registrar module loaded and share the same database.
REGISTERs work fine.
The problem is this:
TLS TCP
UA1 ----------------------> LB --------------------> Proxy
INVITE(to UA2) INVITE(to UA2)
TLS TCP
UA1 <------------- LB <------------- Proxy
100 Trying
TLS TCP
UA1 <------------- LB <----------------------- Proxy
INVITE(to UA2)
TLS TCP
UA1 <----------------------- LB <----------------------- Proxy
100 Trying
All above worked fine. Below is what's expected but never happened:
TLS TCP
UA2 <----------------------- LB <----------------------- Proxy
INVITE(to UA2)
We'd like the LB to reuse the TLS connection initiated by UA2. But LB can't find an open connection and tries to start a new TLS connection. The new connection fails.
UAs are not behind NAT at the moment but will be in the future.
Tried this approaches on LB:
route(ADD_CONTACT_ALIAS);
If (not from proxy)
t_relay();
else
do load balancing
No luck.
Any help is appreciated.
Regards,
Allen
Hi All,
I have just started and installed Kamailio on EC2 Ubuntu instance.
I am going on with the steps provided in this link
http://www.kamailio.org/wiki/install/4.0.x/git
i have gone ahead and installed Kamailiio. I have just reached to Section
no. 8 on the link.
But i am not sure if there is anything extra i need to take care.
Kindly let me know if any extra parameters / details need to be checked for
Kamailio on EC2.
On Wed, Jun 26, 2013 at 6:00 PM, aft <aftnix(a)gmail.com> wrote:
> What have you tried?
>
> On Wed, Jun 26, 2013 at 2:55 PM, Sunil Chandrasekharan
> <sunil.kainat(a)gmail.com> wrote:
> > Hi All,
> >
> > I am trying to install Kamailio on Amazon EC2. I read out in web about
> some
> > people already achieved configuring Kamailio on EC2.
> >
> > Kindly support on the pre-requisties to be installed before i go with
> > Kamailio installation..
> >
> > My requirements ;
> >
> > Kamailio to be installed with Presence module.
> >
> > In the config file , i see that we have to use define with NAT and
> install
> > RTP proxy. Is it required?
> > Is there any module to be added to get MSRP working, so that i can share
> a
> > file.
> >
> > Kindly support to get Kamailio running with register,presence,IM and
> MSRP on
> > Amazon EC
> >
> >
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users(a)lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> >
>
>
>
> --
> -Cheers
> -Arif
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>