Hello,
We are trying to use Kamailio 4.2 with RTPEngine 3.3 behind NAT.
Somehow SIP responses (200 OK) are not handled by Kamailio.
The following INVITE is send to the receiving end (WebRTC Client):
INVITE sip:evQzk4l62MdF3G7U6eudj@whtest3.24dial.com SIP/2.0
Record-Route: <sip:104.155.11.255:5060;nat=yes;lr=on>
Via: SIP/2.0/UDP 104.155.11.255:5060
;branch=z9hG4bK865.9db0c023bec2f314e89ae0f18b78d2f0.0
Via: SIP/2.0/UDP 10.240.215.73:5060
;rport=5060;received=146.148.113.245;branch=z9hG4bK644600e2
Max-Forwards: 69
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as68f0a26a
To: <sip:evQzk4l62MdF3G7U6eudj@whtest3.24dial.com>
Contact: <sip:anonymous@10.240.215.73:5060;alias=146.148.113.245~5060~1>
Call-ID: 368f6ec901a3552e3b37a70907634f4f@10.240.215.73:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 12.5.0
Date: Fri, 24 Oct 2014 08:38:09 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 738
P-hint: outbound
.......
The client response looks like this:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 104.155.11.255:5060
;branch=z9hG4bK865.9db0c023bec2f314e89ae0f18b78d2f0.0;rport=5060;received=104.155.11.255
, SIP/2.0/UDP 10.240.215.73:5060
;rport=5060;received=146.148.113.245;branch=z9hG4bK644600e2
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as68f0a26a
To: <sip:evQzk4l62MdF3G7U6eudj@whtest3.24dial.com
>;tag=E2VMB39U5NYHCXLZREFGQV2DAXPCZXNQ6J6P
Contact: <sip:evQzk4l62MdF3G7U6eudj@whtest3.24dial.com
>;tag=E2VMB39U5NYHCXLZREFGQV2DAXPCZXNQ6J6P
Call-ID: 368f6ec901a3552e3b37a70907634f4f@10.240.215.73:5060
CSeq: 102 INVITE
Record-Route: <sip:104.155.11.255:5060;nat=yes;lr=on>
Content-Type: application/sdp
Content-Length: 938
.......
I have a xlog call as the first statement in kamailio routing script. I can
see the request, which get's handled correctly but the response does not
appear in kamailio log, though it arrives at the machine.
I am totally helpless, what might be wrong. If we use kamailio on a public
accessable machine everything works as expected.
Maybe anyone might have had similiar problems using kamailio behind NAT.
Kind regards,
Marko
Just a question for the RPM maintainers...
Is there a reason for some of the modules (such as carrierroute) not being included in the RPMS?
It's been bugging me for a while, when I do an installation, I have to go and compile all the sources .... Not that it's an issue, just easier to do it from RPM if available.
Thanks!
Derrick
Hi,
I have a few asterisk servers providing some basic SIP trunking and routing.
We have remote PBXs trunked onto asterisk which calls come into asterisk and are routing down to extensions on the remote PBX via prefix routing.
I'm looking to have a central Kamailio Registrar/Proxy/Loadbalancer which Invites come into and are routed out to either SIP phones which are registered or to the remote PBX.
I'm looking for some advice as to which modules would be best to use to achieve this as the remote PBXs will be dynamically registered rather than fixed gateways.
Please let me know what further information would be helpful.
Thanks
Kenny Watson
Hi,
What is the practical limit to the number of async worker processes?
With SIP child processes, it seems to be about the number of available
CPUs in /proc/cpuinfo. After that--at least, per my testing--one begins
to hit the point of diminishing returns, presumably due to SHM IPC and
synchronisation issues.
Is the restriction similar in the async execution context?
--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
Please be kind to the English language:
http://www.entrepreneur.com/article/232906
Hello list.
root@proxy:/# kamcmd core.version
kamailio 4.1.4 (i386/linux)
I'm getting a crash when I'm trying to simulate a ringing UAS from
kamailio config.
To achieve this I've added the next config actions:
> if (is_method("INVITE") && !has_totag() && $rU =~ "^999") {
> sl_send_reply("100", "Fake Trying");
> sl_send_reply("180", "Fake Ringing");
>
> t_set_fr(120000, 120000);
> t_set_retr(65000, 65000);
> t_set_auto_inv_100(0);
>
> async_sleep("60");
> send_reply("480", "Fake Temporary Unavailable");
>
> t_release(); #<---
>
> exit();
> };
I expect to receive 180 reply immediately and 480 after 60 seconds. The
problem appears when a caller cancels a call after 60 seconds which is
equal to async_sleep() wait time.
I suppose there is a race condition happens between UDP worker that
processes CANCEL request and timer process which calls t_continue()
(tm's function). Calling t_newtran() explicitly doesn't change the
situation. The only way I found to avoid crash is to remove t_release()
call. In this case kamailio complains that "script write didn't release
transaction" but continues to process new calls.
With -DTIMER_DEBUG and -DDBG_QM_MALLOC I got next information:
/usr/sbin/kamailio[11307]: : <core> [mem/q_malloc.c:468]: qm_free():
BUG: qm_free: freeing already freed pointer (0xb1d8c520), called from
tm: h_table.c: free_cell(178), first free tm: h_table.c: free_cell(157)
- aborting
Crash mostly happens because of broken circular list of timers
(timer_ln->next == NULL), but one time I saw got abort() during CANCEL
request processing when tm tried to call free_cell() for an already
freed pointer.
Please check ICE server settings. Your browser may be publishing local IP. One way voice or no voice is typical case when client is behind firewall.
Regards,
Amit Patkar
dodul <dodul(a)live.com> wrote:
>Hi
>
>I didn't get any responses from anyone regarding my issue. Can someone please give me some clue what I can do? Or if more information is needed please let know so that I can provide.
>
>
>Sent from my Samsung Galaxy smartphone.
>
>
>-------- Original message --------
>From: Kamrul Khan <dodul(a)live.com>
>Date:10-21-2014 17:45 (GMT-06:00)
>To: sr-users(a)lists.sip-router.org
>Cc:
>Subject: [SR-Users] One sided or no voice issue with websockets
>
>Hi,
>
>We have a setup with sipml5 to kamailio. It works perfectly within local network. In public network the signaling establishes perfectly, but most of the time we hear no voice, sometimes we hear one sided voice and in rare cases we hear voice from both sides. To fix this issue we configured our nathandler like the below: But, still no luck. Any idea how to fix this? Please HELP!!!
>
>modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
>modparam("nathelper", "nortpproxy_str", "a=sdpmangled:yes\r\n")
>.
>.
>.
>route {
>.
>.
> if (nat_uac_test("115")) {
> if(nat_uac_test("64"))
> force_rport();
> }
> if (method=="REGISTER") {
> fix_nated_register();
> add_rcv_param();
> } else {
> fix_nated_contact();
> if(nat_uac_test("64")){
> if (!add_contact_alias()) {
> xlog("L_ERR", "Error aliasing contact <$ct>\n");
> sl_send_reply("400", "Bad Request");
> exit;
> }
> } else {
> add_rcv_param();
> }
> }
> }
>.
>.
>
>onreply_route {
> if (nat_uac_test(64)) {
> add_contact_alias();
> }
>.
>.
>}
>
>
>
>
>_______________________________________________
>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
>
>_______________________________________________
>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
Hello,
I have a problem with the following configuration.
I want to make calls from Asterisk to a browser using RTPEngine as relay.
Everything works fine, if Kamailio is not natted (See
kamailio_without_nat.log).
If it's address is translated, then 200 OK responses from the browser don't
seem to be received by kamailio.
I have configured Kamailio (4.2) and RTPEngine (3.3) both with
advertisement of the public IP.
Asterisk has public IP: 146.148.113.245
Kamilio has public IP: 104.155.11.255
Browser has public IP: 79.241.195.106
The INVITE after SDP Rewrite looks like this:
INVITE sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com SIP/2.0
Record-Route: <sip:104.155.11.255;lr=on;nat=yes>
Via: SIP/2.0/UDP 104.155.11.255:5060
;branch=z9hG4bK683.5e75aa8b7f88561a91033a9b611fc0aa.0
Via: SIP/2.0/UDP 10.240.215.73:5060
;rport=5060;received=146.148.113.245;branch=z9hG4bK5a79a7cf
Max-Forwards: 69
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as53a7de72
To: <sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com>
Contact: <sip:anonymous@10.240.215.73:5060;alias=146.148.113.245~5060~1>
Call-ID: 523c5fda707c565c51b78c586247818e@10.240.215.73:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 12.5.0
Date: Thu, 23 Oct 2014 15:29:17 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 738
P-hint: outbound
v=0
o=root 985629145 985629145 IN IP4 104.155.11.255
s=Asterisk PBX 12.5.0
c=IN IP4 104.155.11.255
t=0 0
a=ice-lite
m=audio 31630 RTP/SAVPF 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
a=rtcp:31631
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:H9uLHKvstgjd58cZKa0LeRaxvf5XNJhaHgxDut7L
a=setup:actpass
a=fingerprint:sha-1
D9:26:45:E1:D6:E7:01:A4:04:90:F2:15:AF:A3:AD:01:3C:39:9B:7D
a=ice-ufrag:YoTvWbLM
a=ice-pwd:eifInSr3Oh8ZvMXjlE89mh8kF1OC
a=tDndidate:krhMgLYHbAxWidfK 1 UDP 2130706431 104.155.11.255 31630 typ host
a=candidate:krhMgLYHbAxWidfK 2 UDP 2130706430 104.155.11.255 31631 typ host
The 200 OK like this:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 104.155.11.255:5060
;branch=z9hG4bK683.5e75aa8b7f88561a91033a9b611fc0aa.0;rport=5060;received=104.155.11.255
, SIP/2.0/UDP 10.240.215.73:5060
;rport=5060;received=146.148.113.245;branch=z9hG4bK5a79a7cf
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as53a7de72
To: <sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com
>;tag=6QTSN6N2SBW2FW49TMGJQJYZMGHQZ7LCUMQT
Contact: <sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com
>;tag=6QTSN6N2SBW2FW49TMGJQJYZMGHQZ7LCUMQT
Call-ID: 523c5fda707c565c51b78c586247818e@10.240.215.73:5060
CSeq: 102 INVITE
Content-Type: application/sdp
Content-Length: 938
v=0
o=- 1907956949290984340 2 IN IP4 127.0.0.1
s=-
t=0 0
m=audio 43590 UDP/TLS/RTP/SAVPF 0 8 101
c=IN IP4 79.241.195.106
a=rtcp:1 IN IP4 0.0.0.0
a=candidate:290309024 1 udp 2122260223 192.168.35.78 43590 typ host
generation 0
a=candidate:2416297236 1 udp 1686052607 79.241.195.106 43590 typ srflx
raddr 192.168.35.78 rport 43590 generation 0
a=candidate:1607352144 1 tcp 1518280447 192.168.35.78 0 typ host tcptype
active generation 0
a=candidate:2416297236 1 udp 1686052607 79.241.195.106 43590 typ srflx
raddr 192.168.35.78 rport 43590 generation 0
a=ice-ufrag:ZtbtZieUG9l22iCb
a=ice-pwd:kRkmd0XuFdj+CKXVpInmK3yV
a=fingerprint:sha-256
ED:DB:B8:D5:4D:38:1F:81:DC:94:9F:EB:6D:07:56:75:57:45:F4:F7:57:4D:C6:89:70:CC:13:6D:35:C0:8B:45
a=setup:active
a=mid:audio
a=sendrecv
a=rtcp-mux
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=msid-semantic: WMS mPbtogqqqsv8DygpyOmxrTkjgW9aGzkbP3Vk
Unfortunately Kamailio log does not tell me, that the response get's
processed. (See kamailio_behind_nat.log). I traced with TShark and can see
that the SIP/200 OK arrive at kamailio host.
Any Idea, what might be missing in my routing script?
The attachements can be found here:
https://drive.google.com/folderview?id=0BxwAyaFvy_7fdHVnWXdFa2hEeHM&usp=sha…
I would be very grateful for any help.
Regards,
Marko
Hello,
I have a problem with the following configuration.
I want to make calls from Asterisk to a browser using RTPEngine as relay.
Everything works fine, if Kamailio is not natted (See
kamailio_without_nat.log).
If it's address is translated, then 200 OK responses from the browser don't
seem to be received by kamailio.
I have configured Kamailio (4.2) and RTPEngine (3.3) both with
advertisement of the public IP.
Asterisk has public IP: 146.148.113.245
Kamilio has public IP: 104.155.11.255
Browser has public IP: 79.241.195.106
The INVITE after SDP Rewrite looks like this:
INVITE sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com SIP/2.0
Record-Route: <sip:104.155.11.255;lr=on;nat=yes>
Via: SIP/2.0/UDP 104.155.11.255:5060
;branch=z9hG4bK683.5e75aa8b7f88561a91033a9b611fc0aa.0
Via: SIP/2.0/UDP 10.240.215.73:5060
;rport=5060;received=146.148.113.245;branch=z9hG4bK5a79a7cf
Max-Forwards: 69
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as53a7de72
To: <sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com>
Contact: <sip:anonymous@10.240.215.73:5060;alias=146.148.113.245~5060~1>
Call-ID: 523c5fda707c565c51b78c586247818e@10.240.215.73:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 12.5.0
Date: Thu, 23 Oct 2014 15:29:17 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 738
P-hint: outbound
v=0
o=root 985629145 985629145 IN IP4 104.155.11.255
s=Asterisk PBX 12.5.0
c=IN IP4 104.155.11.255
t=0 0
a=ice-lite
m=audio 31630 RTP/SAVPF 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
a=rtcp:31631
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:H9uLHKvstgjd58cZKa0LeRaxvf5XNJhaHgxDut7L
a=setup:actpass
a=fingerprint:sha-1
D9:26:45:E1:D6:E7:01:A4:04:90:F2:15:AF:A3:AD:01:3C:39:9B:7D
a=ice-ufrag:YoTvWbLM
a=ice-pwd:eifInSr3Oh8ZvMXjlE89mh8kF1OC
a=tDndidate:krhMgLYHbAxWidfK 1 UDP 2130706431 104.155.11.255 31630 typ host
a=candidate:krhMgLYHbAxWidfK 2 UDP 2130706430 104.155.11.255 31631 typ host
The 200 OK like this:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 104.155.11.255:5060
;branch=z9hG4bK683.5e75aa8b7f88561a91033a9b611fc0aa.0;rport=5060;received=104.155.11.255
, SIP/2.0/UDP 10.240.215.73:5060
;rport=5060;received=146.148.113.245;branch=z9hG4bK5a79a7cf
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as53a7de72
To: <sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com
>;tag=6QTSN6N2SBW2FW49TMGJQJYZMGHQZ7LCUMQT
Contact: <sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com
>;tag=6QTSN6N2SBW2FW49TMGJQJYZMGHQZ7LCUMQT
Call-ID: 523c5fda707c565c51b78c586247818e@10.240.215.73:5060
CSeq: 102 INVITE
Content-Type: application/sdp
Content-Length: 938
v=0
o=- 1907956949290984340 2 IN IP4 127.0.0.1
s=-
t=0 0
m=audio 43590 UDP/TLS/RTP/SAVPF 0 8 101
c=IN IP4 79.241.195.106
a=rtcp:1 IN IP4 0.0.0.0
a=candidate:290309024 1 udp 2122260223 192.168.35.78 43590 typ host
generation 0
a=candidate:2416297236 1 udp 1686052607 79.241.195.106 43590 typ srflx
raddr 192.168.35.78 rport 43590 generation 0
a=candidate:1607352144 1 tcp 1518280447 192.168.35.78 0 typ host tcptype
active generation 0
a=candidate:2416297236 1 udp 1686052607 79.241.195.106 43590 typ srflx
raddr 192.168.35.78 rport 43590 generation 0
a=ice-ufrag:ZtbtZieUG9l22iCb
a=ice-pwd:kRkmd0XuFdj+CKXVpInmK3yV
a=fingerprint:sha-256
ED:DB:B8:D5:4D:38:1F:81:DC:94:9F:EB:6D:07:56:75:57:45:F4:F7:57:4D:C6:89:70:CC:13:6D:35:C0:8B:45
a=setup:active
a=mid:audio
a=sendrecv
a=rtcp-mux
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=msid-semantic: WMS mPbtogqqqsv8DygpyOmxrTkjgW9aGzkbP3Vk
Unfortunately Kamailio log does not tell me, that the response get's
processed. (See kamailio_behind_nat.log). I traced with TShark and can see
that the SIP/200 OK arrive at kamailio host.
Any Idea, what might be missing in my routing script?
I would be very grateful for any help.
Regards,
Marko
Hey Guys,
I am in the process of testing the reloading of the uac registrations
(thanks Daniel for that), and hit some issue:
* when using uac_reg_info twice in a row, second command always hangs.
"""
root@Dev2:/etc/kamailio# kamcmd -s tcp:127.0.0.1:2046 uac.reg_info
l_uuid 301
{
l_uuid: 301
l_username: 301
l_domain: pbx.example.com
r_username: 301
r_domain: pbx.example.com
realm: asterisk
auth_username: 301
auth_password: check123
auth_proxy: sip:172.16.254.75
expires: 360
flags: 0
diff_expires: -1414052722
timer_expires: 0
}
root@Dev2:/etc/kamailio#
root@Dev2:/etc/kamailio#
root@Dev2:/etc/kamailio#
root@Dev2:/etc/kamailio# kamcmd -s tcp:127.0.0.1:2046 uac.reg_info
l_uuid 301
^C
root@Dev2:/etc/kamailio# kamcmd -s tcp:127.0.0.1:2046 uac.reg_info
l_uuid 301
"""
Do you see anything wrong with my data or did I hit a bug?
Since we are here and could not find much documentation around, is there
a way to decrease the default 150 seconds blocking reloads from the
database?
"""
root@Dev2:/etc/kamailio# kamcmd -s tcp:127.0.0.1:2046 uac.reg_reload
root@Dev2:/etc/kamailio# kamcmd -s tcp:127.0.0.1:2046 uac.reg_reload
error: 500 - Failed to shift records - check log messages
"""
Syslog:
"""
Oct 23 10:32:17 Dev2 /usr/sbin/kamailio[2693]: ERROR: uac
[uac_reg.c:369]: uac_reg_ht_shift(): shifting the memory table is not
possible in less than 150
"""
Thanks in advance for any kind of tip!
DanB
Hello,
I'm currently using the $TS psuedovariable to get the current unix timestamp, but this only returns the timestamp up to a second precision.
Is it possible in kamailio to get the current unix timestamp with milliseconds precision?
Regards,
Grant