Hi,
we have a setup, where we have a TCP loadbalancer, which converts the
requests from attached devices using TCP into UDP for the rest of our
setup. This loadbalancer has a service IP, and additionally the host IP, it
listens to different addresses.
Example:
Host IP is: 1.1.1.1
Service IP is: 2.2.2.2
Device is at: 5.5.5.5
Proxy: 9.9.9.9
Gateway: 8.8.8.8
Kamailio listen IPs:
tcp:1.1.1.1:15060 (used just for XMLRPC querys)
tcp:2.2.2.2:5060
udp:1.1.1.1:5062
udp:2.2.2.2:5060
The Host IP should only be used for some management functions, not for
routing.
We've had the problem at first, that when converting from TCP to UDP,
Kamailio did not use the same IP but instead the first configured one. I
got rid of that by using force_send_socket.
Now I'm calling a registered device. Since the registered device is saved
with a path, the request comes in via UDP with the following parameters:
U 2014/05/13 16:15:31.225132 9.9.9.9:5060 -> 2.2.2.2:5060
INVITE sip:user@5.5.5.5:5060;uniq=F373C9746E87D6271688292199F83;transport=tcp
SIP/2.0
Record-Route: <sip:9.9.9.9;lr>
Record-Route: <sip:2.2.2.2;lr;ftag=as458ff869>
Via: SIP/2.0/UDP
9.9.9.9;branch=z9hG4bK17ec.ea7c017baba4072b27c5b0b9daa23346.0
Route: <sip:2.2.2.2;lr;received=sip:5.5.5.5:4956%3Btransport%3Dtcp>
Via: SIP/2.0/UDP
2.2.2.2;branch=z9hG4bK17ec.7db07192e57ae94739d5c3e1444d7ef3.0
Via: SIP/2.0/UDP 8.8.8.8:5060;branch=z9hG4bK5ba05442
Up until now everything looks good. But this is what the loadbalancer sends
out:
T 2014/05/13 16:15:31.226987 2.2.2.2:5060 -> 5.5.5.5:4956 [A]
INVITE sip:user@5.5.5.5:5060;uniq=F373C9746E87D6271688292199F83;transport=tcp
SIP/2.0
Record-Route: <sip:1.1.1.1:15060;transport=tcp;r2=on;lr;ftag=as458ff869>
Record-Route: <sip:2.2.2.2;r2=on;lr;ftag=as458ff869>
Record-Route: <sip:9.9.9.9;lr>
Record-Route: <sip:2.2.2.2;lr;ftag=as458ff869>
Via: SIP/2.0/TCP 1.1.1.1:15060
;branch=z9hG4bK17ec.99e285f5a9e03594d3f7ae6048d1868d.0
Via: SIP/2.0/UDP
9.9.9.9;branch=z9hG4bK17ec.ea7c017baba4072b27c5b0b9daa23346.0
Via: SIP/2.0/UDP
2.2.2.2;branch=z9hG4bK17ec.7db07192e57ae94739d5c3e1444d7ef3.0
Via: SIP/2.0/UDP 8.8.8.8:5060;branch=z9hG4bK5ba05442
As you can see, the the packet is sent out through the correct socket. But
in RR and Via header it advertises the other TCP socket. This breaks BYEs
later on.
Is there some way, I can influence, which IP and port Kamailio writes into
those headers? Or is this a bug, that Kamailio doesn't check the sending
socket correctly?
Best Regards,
Sebastian
When the following lines are on top of my kamailio.cfg
#!KAMAILIO
#!define WITH_MYSQL
#!define WITH_NAT
#!define WITH_TLS
#!define WITH_AUTH
Kamailio does not start and prints out
root@voip:/etc/kamailio# /etc/init.d/kamailio start
[....] Starting Kamailio SIP server: kamailio:loading modules under
/usr/lib/x86_64-linux-gnu/kamailio/modules/
Listening on
udp: 127.0.0.1:5060
udp: 107.170.93.193:5060
tcp: 127.0.0.1:5060
tcp: 107.170.93.193:5060
tls: 127.0.0.1:5061
tls: 107.170.93.193:5061
Aliases:
tls: voip:5061
tls: localhost:5061
tcp: voip:5060
tcp: localhost:5060
udp: voip:5060
udp: localhost:5060
[FAIL] already running ... failed!
. ok
But when I remove "#!define WITH_AUTH" it starts up. How can I find out
what the problem is?
Hello list,
Can anybody suggest the way to remove a line/attribute from SDP that
matches some pattern (regexp), some kind of "grep -v" for SDP ?
I'm trying to remove unnecessary ICE candidates from the SDP body and
only thing I know is the IP address of the candidate I need to remove.
I was trying to use avp_subst() + set_body() or subst_body() but didn't
get valid SDP.
kamailio-3.2.4.
Hi Guys,
I was wondering if anyone could help?
I am currently using reg_fetch_contacts to manipulate signaling based on the user agent device being used, therefore I use the result of;
if(reg_fetch_contacts("location", "$ru", "callee")){ xlog("callee=>user_agent $ulc(callee=>user_agent)\n");}
I then use $ulc(callee=>user_agent) to make routing decisions.
This seems to only return the user-agent device being used for the first registration at that AOR, as I have two devices registered, a Cisco, and a jitsi client, and it only returns the user_agent of the jitsi client I registered first.
Is it possible to return the user agents of all the devices registered against an AOR so I can manage decisions accordingly?
Many thanks
Jon
Hello list,
we're using kamailio presence for BLF functionality, that means lamps on
the phone are green when phone is IDLE, blinking RED when - ringing and
RED when busy.
The problem is - when the phone send SUBSCRIBE first time - presence
answers with empty NOTIFY (with no XML info), and lamps on the phone
(for some extension) are OFF. The laps will became green only after
first call to that extension.
How to make non empty first NOTIFY message ?
My config:
#!ifdef WITH_PRESENCE
# ----- presence params -----
modparam("presence", "db_url", DBURL)
modparam("presence", "subs_db_mode", 2)
modparam("presence", "server_address", SBC_IPADDR)
modparam("presence", "max_expires", 60)
modparam("presence", "db_update_period", 200)
# ----- presence_xml params -----
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
modparam("presence_xml", "integrated_xcap_server", 0)
modparam("presence_dialoginfo", "force_single_dialog", 1)
#dialog need as dependence
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "db_mode", 0)
#!endif
the kamailio 3.3.4
example of initial empty NOTIFY:
NOTIFY sip:user_A@192.168.4.2:5064 SIP/2.0
Via: SIP/2.0/UDP
xx.xx.xx.xx;branch=z9hG4bK693a.4fc432a84fe66cca11790dc1db4d520b.0
Via: SIP/2.0/UDP 10.10.10.10;rport=5060;branch=z9hG4bK693a.e25d1976.0
To: sip:user_A@xx.xx.xx.xx;tag=1632547193
From: sip:user_A@xx.xx.xx.xx;tag=40b780c8a91f5771f2f8fb63063e8dc6-f960
CSeq: 57 NOTIFY
Call-ID: 997810293-5064-30(a)BJC.BGI.E.C
Route: <sip:10.10.11.11;r2=on;lr=on;ftag=1632547193>,
<sip:xx.xx.xx.xx;r2=on;lr=on;ftag=1632547193>
Content-Length: 0
User-Agent: kamailio (3.3.4 (x86_64/linux))
Max-Forwards: 69
Event: dialog
Contact: <sip:10.10.10.10:5060>
Subscription-State: active;expires=60
example of NOTIFY with XML info:
NOTIFY sip:user_A@12.12.12.12:1049 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.10;branch=z9hG4bKb7e2.4fd3e262.0
To: sip:user_A@xx.xx.xx.xx;tag=2032642966
From: sip:user_B@xx.xx.xx.xx;tag=40b780c8a91f5771f2f8fb63063e8dc6-a5e9
CSeq: 195 NOTIFY
Call-ID: 734484242-5064-35(a)BJC.BGI.E.C
Route: <sip:10.10.11.11;r2=on;lr=on;ftag=2032642966>,
<sip:xx.xx.xx.xx;r2=on;lr=on;ftag=2032642966>
Content-Length: 327
User-Agent: kamailio (3.3.4 (x86_64/linux))
Max-Forwards: 70
Event: dialog
Contact: <sip:xx.xx.xx.xx:5060>
Subscription-State: active;expires=60
Content-Type: application/dialog-info+xml
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="00000000000" state="full" entity="user_B(a)10.10.10.10">
<dialog id="fd72b08c-5603-1232-f192-005056954c8a"
call-id="fd72b08c-5603-1232-f192-005056954c8a" direction="recipient">
<state>terminated</state>
</dialog>
</dialog-info>
Hi All,
I want to handle a special case in the Kamailio 4.1.3. When I receive
INVITE from some UAC I wanto reply it with 403 message. I am using the
Kamailio in Proxy mode when the INVITE comes I want to reply it with 403
and do not want to send this INVITE to SIP Server.
I expored the Kamailio source code and found that fucntion receive_msg() in
file receive.c receives all the SIP messages. I am able to parse the SIP
INVITE from such UACs but how to reply them with 403 SIP Code. I am unable
to use the t_reply("403","Forbidden") here in this function/file. Also in
this function finally the forward_reply(msg); is called which sends the
INVITE to the Sip Server. But I dont want to send anything to SIP Server in
this case but want to reply the UAC with 403. Can you please guide me how
to do and where to do this.
I am new to kamailio. Please help.
Regards
Varun
Hi,
i'm trying to create SIP dialog for SUBSCRIBE messages, but it's still
unsuccessful (.
if (is_method("SUBSCRIBE")) {
setflag(4);
dlg_manage();
xlog("L_INFO", "DLG_count=$DLG_count,
DLG_status=$DLG_status, DLG_lifetime=$DLG_lifetime - (Method=$rm
RURI=$ru From=$fu To=$tu IP=$si DST=$du -- $ci)\n");
}
In kamailio.log:
May 10 18:15:11 /usr/sbin/kamailio[18355]: DEBUG: dialog
[dlg_hash.c:652]: no dialog callid='265619152(a)192.168.4.18' found
May 10 18:15:11 /usr/sbin/kamailio[18355]: DEBUG: dialog
[dlg_hash.c:683]: no dialog callid='265619152(a)192.168.4.18' found
May 10 18:15:11 /usr/sbin/kamailio[18355]: DEBUG: dialog
[dlg_handlers.c:1170]: Callid '265619152(a)192.168.4.18' not found
Does kamailio 3.3.4 support Dialog for PRESENCE (Subscribe, Publish,
Notify) ?
Best Regards,
Ewgeny