Hello,
do people here have (implemented) special ways to properly start
rtpengine with kernel forwarding after system reboot?
>From rtpengine readme:
"""
A typical start-up sequence including in-kernel forwarding might look
like this:
# this only needs to be one once after system (re-) boot
modprobe xt_RTPENGINE
iptables -I INPUT -p udp -j RTPENGINE --id 0
ip6tables -I INPUT -p udp -j RTPENGINE --id 0
# ensure that the table we want to use doesn't exist - usually needed
after a daemon
# restart, otherwise will error
echo 'del 0' > /proc/rtpengine/control
# start daemon
/usr/sbin/rtpengine --table=0 --interface=10.64.73.31
--interface=2001:db8::4f3:3d \
--listen-ng=127.0.0.1:2223 --tos=184 --pidfile=/run/rtpengine.pid
--no-fallback
"""
I was relying on shell scripts executed on boot time, but now that
systemd is more common, I am looking to see what are
"standard"/"recommended" ways for running additional scripts besides the
start/stop daemon, which makes it also easier to build packages not
worrying about the type of OS and how it can run scripts at startup.
Systemd seems to have the "ExecStartPre" option, is it what people use
to ensure the rtpengine kernel module is loaded and iptables rule exists?
Any systemd-specific wayt to run a script only once after system boot? I
have seen workarounds on the net for creating like a rc.local service,
but they didn't look to be systemd-native, ...
Not strictly related, but if someone is aware or had some experiences
with, I am curious if "echo 'del 0' > /proc/rtpengine/control" is
really needed because on a system where I forgot to have it in the
scripts (well, was commented), I haven't noticed any issues after
rtpengine restarts.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com
Hi All,
I'm having some issues trying to properly send a '302 Moved Temporarily'
reply to the calling UAC (UAC1) when the remote UAC (UAC2) returns a 486
status (Do Not Disturb). The goal is to redirect UAC1 to a voicemail server
when UAC2 is in DND.
Here are the pertinent parts of my config:
route {
# drop some things right away
route(DROP);
# perform sanity check
route(SANITYCHECK);
# handle registrations
if(is_method("REGISTER")) {
route(REGISTRATION);
exit;
}
# handle invites
if(is_method("INVITE")) {
route("INVITE");
exit;
}
route(RELAY);
}
route[INVITE] {
# add this proxy to the record-route so it stays in the loop
record_route();
# if we can find this user in the location DB...
if(lookup("location")) {
# relay the invite to the new dURI
t_on_failure("FOURDIGITFAIL");
t_on_reply("FOURDIGITREPLY");
route(RELAY);
# go back to the main route
return;
}
onreply_route[FOURDIGITREPLY] {
if(t_check_status("4[0-9]{2}")) {
t_reply("302", "Moved Temporarily");
}
}
I'm having issues with the t_reply in the onreply_route. It successfully
sends the reply, but I can't seem to set the Contact header properly. I'm
trying to set it to the location of the user's mailbox on the voicemail
sever (ie sip:1000@vmpbx.domain.com), but nothing I try works. I've tried:
remove_hf("Contact");
insert_hf("Contact: sip:1000@vmpbx.domain.com");
t_reply("302", "Moved Temporarily");
But as I understand it, that just changes the header in the reply from
UAC2, not the reply I'm sending to UAC1
Then I tried:
append_to_reply("Contact: sip:1000@vmpbx.domain.com" );
t_reply("302", "Moved Temporarily");
But I can't use append_to_reply in an onreply block.
How can I change the Contact header in the reply that's sent? Am I just
going about this the wrong way? Any help would be appreciated. Thanks
Hello,
I am considering to release Kamailio v5.1.10 on Thursday, Jan 30, 2020,
to mark the end of official packaging from branch 5.1. At this moment
the last two stable branches are 5.2 and 5.3.
If anyone is aware of some commits for fixes that should be backported
to branch 5.1, write to sr-dev.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com
We have Kamailio-cluster via route53(round-robin) some-domain.net
we have two kamailio with public IP's
phone1 is registered on kam1
phone2 is registered on kam2
when we are calling from phone1 to phone2 callflow looks:
phone1 => kam1 => asterisk => kam1 => t_relay(address of second
kamailio:5078) => kam2 => phone2
it works perfectly, but in case when we are using polycom as phone2 - we are
getting 404 response from polycom...
*Invite from second kamailio
*
2020/01/20 10:31:21.799327 10.199.240.19:5078 -> 37.17.41.5:49811
INVITE sip:jyu3xsfkrz6c5qn@10.3.0.116;transport=tcp SIP/2.0
Record-Route:
<sip:10.199.240.19:5078;transport=tcp;r2=on;lr;nat=yes;rtp=bridge>
Record-Route: <sip:10.199.240.191:5078;r2=on;lr;nat=yes;rtp=bridge>
Record-Route: <sip:10.199.240.135:5078;lr>
Via: SIP/2.0/TCP
some-domain.net:5078;branch=z9hG4bK9ca3.93c2345f3eb1d4b0e1244e722a9bfb6e.0
Via: SIP/2.0/UDP
some-domain.net:5078;rport=5078;received=10.199.240.135;branch=z9hG4bK9ca3.89b66f1dd6e86a5922180b8ed8475072.0
Via: SIP/2.0/UDP
10.199.240.179:7060;received=10.199.240.179;rport=7060;branch=z9hG4bKPj269365e0-798d-404b-bb77-2ad78472905c
From: "Penny"
<sip:1015@10.199.240.179>;tag=ba402508-a640-409f-ba30-dffdfe499f43
To: <sip:jyu3xsfkrz6c5qn@10.199.240.135>
Contact: <sip:asterisk@10.199.240.179:7060;alias=10.199.240.179~7060~1>
Call-ID: c3a406ca-9ac7-423d-9697-06d0603f48d5
CSeq: 22619 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE,
CANCEL, UPDATE, MESSAGE, REFER
Supported: timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: "Penny" <sip:1015@10.199.240.179>
Max-Forwards: 68
User-Agent: Awesome Calling Platform 3.0
Content-Type: application/sdp
Content-Length: 463
*Response from POLYCOM
*
2020/01/20 10:31:22.054766 37.17.41.5:49811 -> 10.199.240.19:5078
SIP/2.0 400 Bad Request
Via: SIP/2.0/TCP
some-domain.net:5078;branch=z9hG4bK9ca3.93c2345f3eb1d4b0e1244e722a9bfb6e.0
Via: SIP/2.0/UDP
some-domain.net:5078;rport=5078;received=10.199.240.135;branch=z9hG4bK9ca3.89b66f1dd6e86a5922180b8ed8475072.0
Via: SIP/2.0/UDP
10.199.240.179:7060;received=10.199.240.179;rport=7060;branch=z9hG4bKPj269365e0-798d-404b-bb77-2ad78472905c
From: "Penny"
<sip:1015@10.199.240.179>;tag=ba402508-a640-409f-ba30-dffdfe499f43
To: <sip:jyu3xsfkrz6c5qn@10.199.240.135>;tag=8BC58304-83D9B045
CSeq: 22619 INVITE
Call-ID: c3a406ca-9ac7-423d-9697-06d0603f48d5
Record-Route:
<sip:10.199.240.19:5078;transport=tcp;r2=on;lr;nat=yes;rtp=bridge>,
<sip:10.199.240.19:5078;r2=on;lr;nat=yes;rtp=bridge>,
<sip:10.199.240.235:5078;lr>
User-Agent: PolycomVVX-VVX_450-UA/5.8.0.12848
Accept-Language: en
Content-Length: 0
Any ideas how to fix it?
--
Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html
Hi,
I must have missed the discussion about it somewhere, but what is the
inspiration for the new $vn variable container?
According to the documentation, the only difference is that it can hold
$null values, whereas variables initialised in $var to $null are coerced
into an integer value of 0.
But why was this a concern? Why is it necessary? Is it not confusing to
users?
Thanks,
-- Alex
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Thanks for the info Yuri!
I tried several scenarios but without success. My sip proxy has ipv4
and ipv6 address. The other nodes use ipv4. When there is a request
for a ipv6 UAC/customer comming to the proxy the rtpengine/sipwise is
rewriting the sdp with the correct ipv6 address of the proxy. So I am
trying to get the ipv6 address of the proxy from the sdp (which is
always the same ipv6 address) and the port (which is always
different).
I've enabled
modparam("rtpengine", "write_sdp_pv", "$avp(sdp)")
And I have in request section:
rtpengine_manage($avp(rtpproxy_offer_flags));
set_body("$avp(sdp)", "application/sdp");
xlog("L_INFO", "Request SDP $avp(sdp))\n");
And the problem is that I am always getting the ipv4 address and port but
not the rewritten by the proxy ipv6 address and port.
Any idea?
Regards,
Pavel