Hi,
I am using Kamailio behind NAT, unable to figure how to make it put “public ip” in Record-route header, I am manually inserting the hard-coded header myself as below.
However now I am having trouble choosing the right port number in all scenarios.
$var(dstPort) = 5061;
if (dst_port==5060)
{
$var(dstPort) = 5060;
}
insert_hf("Record-Route: <sip:MY_PUBLICIP_ADDR:$var(dstPort);transport=tls;lr;nat=yes>\r\n", "Record-Route");
In …
[View More]one scenario I see the conflicting port numbers in “via” header vs “Record route”.
The ACK is being set to port 5060 based on Record route header and is not being received by the callee.
2017-01-23 14:52:49.970233 [blink.exe 2780]: SENDING: Packet 11, +0:00:36.411867
10.0.27.108:58217 -(SIP over TLS)-> 172.31.211.31:5061
SIP/2.0 180 Ringing
Via: SIP/2.0/TLS 63.149.103.72:5061;received=172.31.211.31;branch=z9hG4bK4799.7067bd2a48063748a4c353fa408eaefa.0
Via: SIP/2.0/UDP 10.0.16.52;rport=5060;branch=z9hG4bK4799.935a27c6ef5ad112225964cbe7c1be44.0;i=2
Via: SIP/2.0/TLS 10.11.200.12:51793;rport=51793;received=10.11.200.12;branch=z9hG4bKPj49f6aeca3f9b4155ab4c5304b544aa4d;alias
Record-Route: <sip:63.149.103.72:5060;transport=tls;lr;nat=yes>
Record-Route: <sip:10.0.16.52:5061;transport=tls;lr;nat=yes>
Call-ID: 09ce10efa6a946bf9445ccc21857393e
From: "cust1" <sip:cust1@devtranslation.sms-test.cyracom.com>;tag=95082caabecc42548c2fec5ccd29e5de
To: <sip:spanish@translation.sms-test.cyracom.com>;tag=ec365cc8489b48a7bc5725d21b7d97a1
CSeq: 17422 INVITE
Server: Blink 3.0.0 (Windows)
Contact: <sip:20745891@10.0.27.108:58216;transport=tls>
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Content-Length: 0
Questions:
1. How can I let in-built record-route function automatically choose “public ip” so I can get rid of my manual insertion altogether.
2. If no option, what is the right way to choose the port on which packet is being received, so it is same as what is on “VIA”.
3. Any other pointers to improve the logic here?
[View Less]
Hello, everyone!
I'm trying to enable dns_srv_lb but I'm stuck just before I can get there.
If I don't enable use_dns_failover, lookups work and calls route but always
to the first host. We need to load balance, so that doesn't work very well.
If I enable use_dns_failover, the lookups stop working completely and we
get a dns lookup failure like so:
ERROR: tm [ut.h:296]: uri2dst2(): ERROR: uri2dst: failed to resolve "
redacted.hostname.here.com" :unresolvable A or AAAA request (-7)
This …
[View More]works:
use_dns_cache=on
dns_use_search_list=no
dns_try_naptr=on
# use_dns_failover=on
This breaks it:
use_dns_cache=on
dns_use_search_list=no
dns_try_naptr=on
use_dns_failover=on
I have checked to see that use_dns_failover is compiled in:
version: kamailio 4.4.2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.9.2
[View Less]
Hi
I am running Kamailio 4.4 and have come across a strange SBC which is
sending DTMF within the SDP body of a NOTIFY with a Content-Type
audio/telephone-event.
Has anybody come across this before?
The content itself comes through on a tcpdump/ngrep trace as four dots
"...." and Kamailio puts an empty string into the logs if I try to log the
contents of $rb, however Wireshark manages to decode it as something
readable "\005\000\a\320" and usable. (essentially the digit 5)
Is there any way I …
[View More]can get access to this decoded version within Kamailio
at all? Even if I have to pass it out to an external program?
Many thanks for any help anyone can offer!
Pete
[View Less]
Hi,
What is the best way to get a complete dump of incoming/outgoing SIP messages of Kamailio server?
I encountered “SIPTrace” module, but it writes to database. Is there a way we can write to syslog instead?
Thanks
Pranathi
Dear all,
I am trying to make a call between 2 sipml5 client over WSS. Everything
works fine and as expected when using WS. While using WSS, the clients are
registered successfully, but when I make a call, the called party is
disconnected from the network and the caller gets "User offline" message.
There a wireshark capture here:
https://drive.google.com/file/d/0B6LMw8kmoAMYMGhrYXNUVXJySEk/view?usp=shari…
The call is made from Alice to Bob, the port Nrs: 4060: PCSCF, 5060:ICSCF,
and 6060 …
[View More]SCSCF. WWS is running on 4443.
The error message that is shown in Firefox console: "The connection to
wss://192.168.0.11:4443/ was interrupted while the page was loading."
Thanks in advance,
Serhat
[View Less]
Hi Guys,
Anybody knows how to get the ip of the new contact of the redirect? I need
it to update one xavp variable that contains the INVITE destination.
6 2017-01-20 12:44:55.138473 172.16.213.38 *172.16.208.121* SIP/SDP 85 Request:
INVITE sip:01152780776@172.16.208.121:5060 |
9 2017-01-20 12:44:55.142296 172.16.208.121 172.16.213.38 SIP 661 Status:
302 Moved temporarily |
10 2017-01-20 12:44:55.156268 172.16.213.38 172.16.208.121 SIP 423 Request:
ACK sip:01152780776@172.16.208.121:5060 |
16 …
[View More]2017-01-20 12:44:55.293349 172.16.213.38 *172.16.208.111* SIP/SDP
95 Request:
INVITE sip:1152780776@172.16.208.111:5060;user=phone |
My cfg:
# Manage failure routing cases
failure_route[MANAGE_FAILURE] {
....
if (t_check_status("302")) {
xlog("Got a 302 - redirecting");
get_redirects("*:1");
* $xavp(ip_b[$avp(current_route)]=>name) =
"172.16.208.111";#Hardcoded for testing*
xlog("Got a 302 - redirecting $hdr(Contact)");
route(RELAY);
#t_relay();
}
Thanks in advance.
Diego.
[View Less]
Hi,
I think Siremis not work correctly in a multi domain scenario if the
extension number are the same for two domains.
I explain a little more. I have two extension:
1 200(a)sip1.domain.org
2 200(a)sip2.domain.org
On the Siremis I create the user 200 with the SIPuser role. When I login
with this user, and go to subscriber data i can see bots extensions.
I think is relate to this select on kamailio database:
.....SELECT T0.id, T0.username, T0.domain, T0.password,
T0.email_address, T0.…
[View More]ha1, T0.ha1b, T0.rpid FROM `subscriber` T0 WHERE
T0.username='200' LIMIT 10
Any hint?
Regards
[View Less]
can someone please guide me where to find the usage of auc module, thanks
in advance.
I am registering the uac in one end then i want to forward that
registration to an external registrar, if i use $du some domain, some of
the ipv6 info is going to be forwarded, i need to make it look more like an
a b2bua than a outbound proxy therefore i need to use the auc module(also i
need to cover all ipv6 info since i am proxying from ipv4 to ipv6).
i am able to register the client to kamailio, then …
[View More]kamailio send the
registration to the external registrar, but when the registrar sends back
the challenge uac does not reply, any ideas how can achieve this.
uac(linphone etc) --registration--->kamailio(registrar
module)------register(uac)--->SBC
sbc----invite---->kamailio(lookup)---------invite---->uac(linphone etc)
this is the code i am using.
# Handle SIP registrations
route[REGISTRAR] {
xlog("REGISTERING ");
if (is_method("REGISTER"))
{
if(isflagset(FLT_NATS))
{
setbflag(FLB_NATB);
# uncomment next line to do SIP NAT pinging
## setbflag(FLB_NATSIPPING);
}
if(af==INET6)
setbflag(FLB_IPV6);
xlog("IT IS IPV6");
if (!save("location"))
sl_reply_error();
route(REGSBCFWD);
exit;
}
}
route[REGSBCFWD]{
xlog("CREATING OTHER LEG TO THE SBC");
if(!is_method("REGISTER"))
{
return;
}
xlog("CREATING PACKAGE $si -- $fU-- $au--$du-- $tU --$ru");
$var(rip) = "sip.somedomain.com";
$uac_req(method)="REGISTER";
$uac_req(ruri)="sip:" + $var(rip) + ":" + "5060";
$uac_req(furi)="sip:" + $tU + "@" + $var(rip);
$uac_req(turi)="sip:" + $tU + "@" + $var(rip);
$uac_req(hdrs)="Contact: <sip:" + $tU + "@"
+ "10.0.0.222"
+ ":" "5060" + ">\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();
}
REGISTER sip:sip.somedomain.com:5060 SIP/2.0.
Via: SIP/2.0/UDP 10.0.0.222:5060
;branch=z9hG4bK285f.13a7f0c0000000000000000000000000.0.
To: <sip:14052423@sip.somedomain.com>.
From: <sip:14052423@sip.somedomain.com
>;tag=a82eaf71666096790d1397845fbd3254-ebaa.
CSeq: 10 REGISTER.
Call-ID: 357e21ae51d8416d-26605(a)10.0.0.222.
Max-Forwards: 70.
Content-Length: 0.
User-Agent: kamailio (4.4.4 (x86_64/linux)).
Contact: <sip:140524@10.0.0.222:5060>.
Expires: 3600.
.
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 10.0.0.222:5060
;branch=z9hG4bK4b53.ad842757000000000000000000000000.0.
To: <sip:14052423@sip.somedomain.com>.
From: <sip:14052423@sip.somedomain.com
>;tag=a82eaf71666096790d1397845fbd3254-37da.
Call-ID: 357e21ae51d8416d-26603(a)10.0.0.222.
CSeq: 10 REGISTER.
WWW-Authenticate: Digest realm="sip.somedomain.com",
nonce="f5831435-3e69-4b78-ab6d-dcb0897e477b", algorithm=MD5, qop="auth".
User-Agent: somedomain.com Host:some proxy.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY, PUBLISH, SUBSCRIBE.
Content-Length: 0.
.
[View Less]
Hello,
We are using Kamailio's perl module and want our custom library to set the
body on a SIP message.
Is it possible to set a SIP message body from within Perl, or can we return
a string to the Kamailio configuration to then use with set_body()?
Thanks for any advice.
--
David Cunningham, Voisonics
http://voisonics.com/
USA: +1 213 221 1092
Australia: +61 (0) 2 8063 9019
root@homer02:~# netstat -altp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 homer02.xxxxx.xxx:sip *:*
LISTEN 16018/kamailio
tcp 0 0 homer02.xxxxx.xxx:5066 *:*
LISTEN 16018/kamailio
Thanks.
JR
> If you use netstat, what is in the recv queue for tcp packets on sip ports?
>
> netstat -altp
>
> Cheers,
> Daniel
>
>
> On 18/01/…
[View More]2017 16:43, JR Richardson wrote:
>> Yes, this is a sipcapture node. I'm listening on a switch port that is
>> set to mirror my VoIP traffic. I see all SIP UDP/TCP packets on the
>> mirror port and the Ethernet port of the host node. Just don't see any
>> TCP packets process in kamailio, debug 3. UDP packets are processed as
>> expected.
>>
>> My config is using port mirror for the capture parameters:
>>
>> modparam("sipcapture", "capture_on", 1)
>> modparam("sipcapture", "hep_capture_on", 0)
>> modparam("sipcapture", "raw_ipip_capture_on", 0)
>> modparam("sipcapture", "raw_moni_capture_on", 1)
>>
>> modparam("sipcapture", "raw_sock_children", 4)
>> modparam("sipcapture", "raw_interface", "eth1")
>> modparam("sipcapture", "raw_socket_listen", "10.99.99.99:5060-5070")
>> modparam("sipcapture", "promiscious_on", 1)
>> modparam("sipcapture", "raw_moni_bpf_on", 1)
>>
>> Is there a method I could diagnose if the SIP TCP Packets are getting
>> from the kernel network process and the kamailio process?
>>
>> # ngrep -d eth1 -W byline host x.x.x.x | /var/run/kamailio/kamailio.pid
>>
>> Or pipe to kamailio local unix socket?
>>
>> I don't know, I'm just guessing.
>>
>> Thanks.
>>
>> JR
>>
>>
>>> Somehow is not clear for me how you have the configuration there ...
>>> before commenting further, this needs to be clarified.
>>>
>>> The node you presented the config is a sipcapture instance, right? What
>>> is sending traffic to it? Is another kamailio with siptrace module? Or
>>> the sipcature agent? Or you have a port mirroring in the router?
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 17/01/2017 16:37, JR Richardson wrote:
>>>>> On Mon, Jan 16, 2017 at 10:29:39AM -0600, JR Richardson wrote:
>>>>>> Yes, I'm familiar with the methods sipcapture uses, I don't use HEP,
>>>>>> using raw socket capture, I think this may be a sipcapture issue,
>>>>>> debuging kamailio shows normal startup and processing of UDP SIP
>>>>>> packets, but does not show any activity with TCP packets.
>>>>> I never used HOMER sofar but when I saw your first message my thoughts
>>>>> was that this can't work in a simple way since for TCP you need to
>>>>> complete a 4 way handshake before you can start to send data.
>>>>>
>>>> Interesting. Are you referring to handshaking on the network stack or
>>>> SIP TCP TLS handshaking? I guess I can see it two ways.
>>>>
>>>> 1) if your talking about TCP/IP handshake, even though the SIP packet
>>>> comes into the mirror port on the host node, the kernel processing the
>>>> TCP packet is not establishing a valid connection due to no TCP
>>>> handshake because its only a monitor port, no transmit back, then the
>>>> kernel network stack does not pass the SIP TCP packet to the kamailio
>>>> process for capture because it drops the packet due to no valid
>>>> handshake?
>>>>
>>>> 2) the kernel network stack is passing the SIP TCP packet to the
>>>> kamailio process, but since kamailio cannot handshake back it drops
>>>> the packet and does not process through the sipcapture module. This
>>>> kinda breaks the whole capture ability for homer with SIP TCP. Using
>>>> ngrep, I see all SIP TCP packets, invite -->, trying <--, session
>>>> progress <--, request timeout <--, ack -->, etc...
>>>>
>>>> So how would I diagnose if the network stack is the culprit? Debugging
>>>> kamailio is pretty straight forward, setup and listening for SIP TCP,
>>>> but never see any processing of any TCP packets.
>>>>
>>>> Thanks.
>>>>
>>>> JR
>
[View Less]