Hi All
Is there any way to extract round trip lime state from keepalives? I have a customer who’d like to duplicate the qualify feature of Asterisk. ie latency / distance of endpoint from server.
Can’t see any way to hook in from the docs.
Thanks
Mark
Hello,
I am using Kamailio working as edge proxy with topos module active.
Kamailio is proxing requests from Freeswitch's to the SBC Metaswitch.
The Freeswitch sends SIP REGISTER requests and it is ok (Contact: <
sip:1003@172.29.210.164:5070>).
When Freeswitch sends SIP INVITE quest, it receives a reply with Forbiden
(Contact: <sip:btpsh-5aa0219a-2a32-2@172.29.210.164:5070>).
You can check the sip trace at https://pastebin.com/raw/JZUNgYx5
I analysed this issue on SBC Metaswitch and it requires that the INVITE and
REGISTER have the same Contact Header.
I know that this is not required from SIP RFC, but that it is SBC default
security policy.
There is any way to configure Kamailio using topos to have the same Contact
Header on INVITE and REGISTER?
Best regards,
José Lopes
Greetings,
Does Kamailio has a method or variable that indicates who
cancelled,rejected or terminated a call and, therefore ended the dialog?
Currently i'm looking for the sources of BYE's, CANCEL and replies greater
than 300 to first INVITE, but i would safer if such a method existed.
Thanks in advance
Hi All
Got a presence problem with what should be a very simple config.
Would much appreciate someone having a look at the following and seeing if I’ve missed something obvious :-)
Thanks
Mark
I’ve gone right back to basics and using the example at http://kb.asipto.com/kamailio:presence:k43-blf <http://kb.asipto.com/kamailio:presence:k43-blf>
Changes to that example are;
- Kamailio 5.1.2
- RTPEngine
- NAT Enabled
- JSON RPC replacing mi_rpc
- HA1 Passwords
Setup is;
Three phone 20,21,22 all on site behind a NAT (10.1.3.x local IP) at 1.2.3.4 External IP.
Phone 21 has BLF Subscriptions on 20 and 22
Domain is set as “mykamailio.com”
Kamailio is an Ubuntu server “In the cloud” on 5.6.7.8
(Assuming I have got my domain & ip rewrites correct on the cut’n’paste)
What’s Happening;
All three phones register
21 Issues SUBSCRIBE:Dialog for 20 and 22. Which get 202 Accepted back after a 407 Proxy Auth
SUBSCRIBE sip:22@mykamailio.com:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.3.84:5065;rport;branch=z9hG4bK3894730624
From: "21@SBC-2" <sip:21@mykamailio.com>;tag=1678729960
To: <sip:22@mykamailio.com>
Call-ID: 1544456221(a)10.1.3.84
CSeq: 1 SUBSCRIBE
Contact: <sip:21@10.1.3.84:5065>
Accept: application/dialog-info+xml
Max-Forwards: 70
User-Agent: Yealink SIP-T26P 6.73.0.50
Expires: 1800
Event: dialog
Content-Length: 0
I can see these arrive in active_watchers table;
*************************** 2. row ***************************
id: 2
presentity_uri: sip:20@mykamailio.com
watcher_username: 21
watcher_domain: mykamailio.com
to_user: 20
to_domain: mykamailio.com
event: dialog
event_id:
to_tag: a6c744f901d779619c580c9ef48ab5e9-2651
from_tag: 1809677495
callid: 2674059037(a)10.1.3.84
local_cseq: 0
remote_cseq: 2
contact: sip:21@10.1.3.84:5065;alias=1.2.3.4~5065~1
record_route:
expires: 1520711354
status: 1
reason:
version: 0
socket_info: udp:5.6.7.8:5060
local_contact: sip:5.6.7.8:5060
from_user: 21
from_domain: mykamailio.com
updated: -1
updated_winfo: -1
flags: 0
user_agent: Yealink SIP-T26P 6.73.0.50
If I make a call from 20 to 22 it works as expected but no notify is sent.
For completeness the changes I’ve made to the kamailio.cfg file are;
# diff kamailio.cfg_presence_example kamailio.cfg
6a7
> #!define WITH_NAT
119c120
< #!define DBURL "mysql://kamailio:kamailiorw@localhost/kamailio"
---
> #!define DBURL "mysql://kamailiorw:password@localhost/test_kamailio"
169a171
> alias="mykamailio.com"
221c223
< mpath="/usr/local/lib/kamailio/modules/"
---
> mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"
228c230
< loadmodule "mi_fifo.so"
---
> loadmodule "jsonrpcs.so"
245d246
< loadmodule "mi_rpc.so"
279c280
< loadmodule "rtpproxy.so"
---
> loadmodule "rtpengine.so"
304,307d304
< # ----- mi_fifo params -----
< modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
<
<
375,376c372,374
< modparam("auth_db", "calculate_ha1", yes)
< modparam("auth_db", "password_column", "password")
---
> modparam("auth_db", "calculate_ha1", no)
> modparam("auth_db", "password_column", "ha1")
> modparam("auth_db", "password_column_2", "ha1b")
414c412
< modparam("presence", "server_address", "sip:192.168.178.54:5060" )
---
> modparam("presence", "server_address”, "sip:5.6.7.8:5060")
454c452
< modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
---
> modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:2223")
835c833
< rtpproxy_manage("co");
---
> rtpengine_manage("co”);
If you're not listening or identifying that IP and specific port as an alias, then yes, this is expected. One reason why would be to run another program on that port.
Fred Posner
direct: +1 (224) 334-FRED (3733)
> On Mar 9, 2018, at 6:52 AM, Nicolas Breuer <Nicolas.Breuer(a)belcenter.biz> wrote:
>
> --_000_VI1PR0402MB359898CF4C2CDFCD4EBA5DA189DE0VI1PR0402MB3598_
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> Hello the List,
>
> I saw a strange behavior on the last Kamailio v4.
>
> The Kamailio is binding on port 5060.
>
> If (from_uri=3D=3Dmyself){
> ......
> }
>
>
> * When the From uri in the INVITE is <xxxx@myalias:5070>
> * When the myalias is an alias > No issue the IF routine is executed.
> * When the myalias is the ip address of the server > The IF Routine is =
> NOT executed because there is a mismatch in the port (5060 >< 5070)
>
>
> Is it the expected behavior ?
>
> Thanks
>
>
>
>
>
>
> --_000_VI1PR0402MB359898CF4C2CDFCD4EBA5DA189DE0VI1PR0402MB3598_
> Content-Type: text/html; charset="us-ascii"
> Con
Hello the List,
I saw a strange behavior on the last Kamailio v4.
The Kamailio is binding on port 5060.
If (from_uri==myself){
......
}
* When the From uri in the INVITE is <xxxx@myalias:5070>
* When the myalias is an alias > No issue the IF routine is executed.
* When the myalias is the ip address of the server > The IF Routine is NOT executed because there is a mismatch in the port (5060 >< 5070)
Is it the expected behavior ?
Thanks
I need to track all messages (SIP Requests, SIP Responses) for some SIP dialogs. Let's say I need to log something specific on each state for calls initiated from a certain IP (initial request, temporary replies, rejection with a negative response, call was accepted with 200, termination with BYE, termination with CANCEL etc. ).
I am thinking on using flags but I am not sure after reading the tutorial on flags (http://www.kamailio.org/dokuwiki/doku.php/tutorials:openser-flag-operations) if that is going to work properly. The doc says: "They provide a very easy and fast way of keeping states during processing a request or during a transaction". I am afraid that the ACK if the call is accepted and the BYE won't be tracked properly because they are not part of the initial transaction. Also the doc does not mention if the flag is preserved among branches spawned during the processing of the call.
The idea is for example:
request_route {
if (is_method("INVITE")){
if ($si == "192.168.168.100"){ #condition that would set the flag, INVITE came from "my_IP"
#flag/mark dialog
setflag(1);
#log call from "my_IP" was received
}
route("INCOMING);
}
If(loose_route() ){
if (is_method("ACK")){
if(isflagset(1)){
#log ACK related to "my_IP" was received
}
}
if (is_method("CANCEL")){
if(isflagset(1)){
#log CANCEL related to "my_IP" was received
}
}
if (is_method("BYE")){
if(isflagset(1)){
#log BYE related to "my_IP" was received
}
}
}
}
Then :
route["INCOMING"] {
# do some processing
# do some processing
t_onreply("INCOMING");
t_on_failure("INCOMING");
t_relay();
}
onreply_route[INCOMING] {
#do some processing
if(isflagset(1)){
#log a reply related to "my_IP" was received
}
}
failure_route[INCOMING] {
#do some processing
if(isflagset(1)){
#log a negative reply related to "my_IP" was received
}
}
Will the flags work on this case ?
My 2nd approach is to use a htable and use the call_id for my calls as the key. The on each route section (reply, failure_reply, ACK processing etc.) find the $ci on the htable and if it is there do the appropriate action. But I need to delete the key:value once the call ends or leave it autoexpire with a expire value bigger than the max_call_duration_time that we have in our system.
Hi,
Does sql_pvquery() clean up after itself?
The other query APIs return a result handle that you clean up with sql_result_free(), but sql_pvquery() doesn’t appear to return any handle, so is it self-collecting?
Cheers,
Ben
Hello All,
I have noticed that almost all, if not all examples of installing Kamailio install the PostgreSQL libraries. If one is using MySQL, is there a need for this? Is there something in Kamailio that requires these PostgreSQL libraries to be installed?
Thank you
Hello,
I'd like know which is the best way to resend a Authenticate REGISTER to
two or more Asterisk.
Repeating rewritehostport and forward commands for the number of
Asterisk Servers, there is a problem with the Via Header; Kamailio add
one with his IP for each forward. I try to remove the first Via before
send the REGISTER to the second Asterisk without success.
Any hint or tip?
Thank you
Regards
--
---
I'm SoCIaL, MayBe