Hello everyone,
I have system setup where there are few Asterisk servers behind Kamailio
that is behind the firewall. There is a problem with call initiation. When
phone from outside sends INVITE to Kamailio, it then passes it to one of
Asterisk servers. Asterisk server eventually replies to Kamailio with 200
OK. Contact header contains Asterisk's local IP address and port. Kamailio
executes function *fix_nated_contact* before sending reply to the phone.
However Contact header will still have Asterisk's local socket.
*fix_nated_contact* is being executed with no doubt. I can see xlog output
that I set before and after it. Can someone tell how exactly
*fix_nated_contact* gets "*request's source address:port pair*" and if it
can be printed to the log?
Thank you!
Hi All
Trying to get a basic version of homer working on Kamailio V5. So far I have sipcapture throwing everything in to a single mysql table.
So first question; Should I be using sipcapture or siptrace? I’m not sure I can see the difference.
Second question; On what I have working so far using sipcapture, I’m seeing the invites, subscribes, cancels, act’s all end up in the database. What I’m missing is any responses from Kamailio back to the handset (AUTh Challenges etc)
modparam("sipcapture", "db_url", "mysql://sipcapture:secretpassword@localhost/homer_data")
modparam("sipcapture", "capture_on", 1)
modparam("sipcapture", "hep_capture_on", 1)
modparam("sipcapture", "insert_retries", 5)
modparam("sipcapture", "insert_retry_timeout", 10)
plus a sprinkling of "sip_capture(); “ in the “xxx_route {“ blocks
What am I missing?
Mark
*Hi I have presence_xml parameter force_active set to 1 and still i get
**error** presence_xml:mod_init: Can't bind xcap_client*
*kamailio 5.1.0-dev6 (x86_64/linux) *
Hello
We're using Kamailio & freeswitch as my company voice system.
So far, everything is good, except the MWI.
I tried to find out how to forward MWI between Kamailio and Freeswitch, or
let the Presence_MWI module can work with the freeswitch behind Kamailio.
If it was possiable, could anyone give me an idea or some links or demo
configure for this.
I really appreciate your help.
Best Regards
Wallace Wang
Hello! provider trunks registration on kamailio UAC?! it's clear.
but how does asterisk find out through which trunk the call should be made?
I tried to set the header from asterisk dialplan.
for example:
if (is_method("INVITE")) {
#record_route_preset("109.195.102.122");
route(DIRECTION);
setflag(FLT_ACC); # do accounting
}
# ------ LOADBALANCE ROUTE ------------ #
if(!ds_is_from_list()) {
route(DISPATCH);
}
route[DISPATCH] {
#round robin dispatching on gateways group '1'
if(!ds_select_dst("1", "4"))
{
send_reply("404", "No destination");
exit;
}
xlog("L_DBG", "--- SCRIPT: going to <$ru> via <$du>\n");
t_on_failure("RTF_DISPATCH");
route(NATMANAGE);
route(DRELAY);
exit;
}
route[DIRECTION] {
if ($hdr(x-trunk) != $null) {
if (!is_method("BYE")){
$fu="";
t_on_failure("MANAGE_FAILURE");
$dlg_ctx(timeout_route) =
"DIALOG_END";
$avp(i:10)=43200;
$dlg_ctx(timeout_bye) = 0;
sql_pvquery("ca", "select l_uuid, auth_username, auth_password,
realm, l_domain, r_domain from uacreg where id='$hdr(x-trunk)'",
"$avp(uuid), $avp(uname), $avp(passwd), $avp(realm), $avp(src_ipaddr),
$avp(dst_ipaddr)");
t_on_failure("MANAGE_FAILURE");
$dlg_ctx(timeout_route) =
"DIALOG_END";
$avp(i:10)=43200;
$dlg_ctx(timeout_bye) = 0;
$fu="";
uac_replace_from("sip:$avp(uname)@$avp(dst_ipaddr)");
$tu="sip:"+$tU+"@"+$avp(dst_ipaddr);
$ru="sip:"+$tU+"@"+$avp(dst_ipaddr);
remove_hf("Contact");
$var(contact)="sip:"+$avp(uname)+"@10.49.9.2:5060";
insert_hf("Contact: <$var(contact)>\r\n");
#insert_hf("Contact: ");
msg_apply_changes();
fix_nated_register();
xlog("L_INFO","Contact header $var(contact)
111111111111111111111111111111111111111 is $ct {$ct}\n");
route(RELAY);
} #### BYE
} ### XTRUNK
But in this configuration I do not come bye
but when I register providers trunks on asterisk - problem with BYE not
visible.
but I can not register provider-trunks on all the asterisks, because
incoming invite arrives at the link + address, and all the asteriscs ring.
All my asterisk's behind nat
Hello.
Have a following task. Select carrier by carrierroute module from db, try to route (dial, relay, bridge - you name it) call there and if call is failed/rejected due to any reason, go to failure_route(?), perform carrierroute lookup again for another carrier and route call there. Main problem is that different carriers require different From/To format. And Kamailio don't allow to use uac* functions in failure_route. How to resolve this? Maybe entire routing method is wrong for my task? Any advice?
--
sent from myMail for Android
Hi Mykyta,
since you are plain sip without encryption you can see your sip-traffic on
the wire,
use sngrep on the kamailio box to figure out whats with the sip-dialogs -
it helps a lot.
https://github.com/irontec/sngrep
and if its more an kamailio config problem, it would be better to stay at
sr-users@.
Or you can setup an webhomer for debugging.
Kind Regards
2017-09-01 17:49 GMT+02:00 Sean Ingham <sean(a)missionlabs.co.uk>:
> Once a call is answered FreeSWITCH sends a 200 OK SIP message to your
> Kamailio loadbalancer. As per the SIP spec your kamailio box should respond
> to a 200 OK with an ACK. The FS logs show that it never receives an ACK,
> and it repeatedly tries sending the 200 OK with no response. After 30
> seconds without an ACK FS will assume the call has failed and hangup.
>
> Looking at your Kamailio SIP logs you can see the 200 OKs getting through
> okay, and no attempt to send an ACK back to FS. I think this indicates an
> issue with your kamailio.cfg rather than FreeSWITCH.
>
>
> Sean
> www.wirex-precision.co.uk
>
> On Fri, Sep 1, 2017 at 3:40 PM, Микита Нікітенко <
> nikitanikitenko(a)gmail.com> wrote:
>
>>
>> Hello! I have server at digital ocean with a floating ip address and I
>> have routed sip traffic to this floating ip. At this server installed
>> kamailio which balancing between freeswitch servers. I have a problem that
>> call drops after 32 seconds with error ACK Timeout. Traffic comming throug
>> the kamailio proxy.
>>
>> kamailio.cfg - https://pastebin.com/x0CL3TEZ
>> kamailio sip messages log - https://pastebin.com/wyT3cBbD
>> freeswitch logs with sip debug - https://pastebin.com/zPysfQkV
>>
>> I'm struggling for a week and have no idea how to fix it.
>> Thank you very much.
>> Mykyta Nikitenko
>>
>>
>>
>>
--
Mit freundlichen Grüßen
*Karsten Horsmann*
Hello! I have server at digital ocean with a floating ip address and I have
routed sip traffic to this floating ip. At this server installed kamailio
which balancing between freeswitch servers. I have a problem that call
drops after 32 seconds with error ACK Timeout.
kamailio.cfg - https://pastebin.com/x0CL3TEZ
kamailio sip messages log - https://pastebin.com/wyT3cBbD
freeswitch logs with sip debug - https://pastebin.com/zPysfQkV
I'm struggling for a week and have no idea how to fix it.
Thank you very much.
Mykyta Nikitenko
Hello,
at this moment i try to figure out the best way to add an "switch" for
debug/log output.
I use many xlog, like everyone that starts with kamailio too.
Then i go further and add #!ifdef cases around to switch this via #!define.
Is there any other way to turn on/off my "debug"-logging on the fly, while
kamailio is still running?
#!define TESTBED_MODE
request_route{
...
#!ifdef TESTBED_MODE
route(DEBUG);
#!endif
...
#!ifdef TESTBED_MODE
xlog("L_INFO","---FIX_SIPS-after: ru:($ru)");
#!endif
...
}
--
Kind Regards
*Karsten Horsmann*