Hi,
I am hitting bit of a wall here.
- I am setting bflags for NAT, and SIPPING before save("location") however,
when I do "kamctl ul show", the Cflag is 0.
I also checked see if the bflags are set or not in the register routine -
they are being set.
What am I missing?
snippets of the config files.
#!define FLB_NATB 6
#!define FLB_NATSIPPING 7
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_method", "INFO")
modparam("nathelper", "sipping_from", "sip:pinger@50.62.1.7")
# params needed for NAT traversal in other modules
modparam("nathelper|registrar|usrloc", "received_avp", "$avp(RECEIVED)")
modparam("usrloc", "nat_bflag", FLB_NATB)
# Caller NAT detection route
route[NAT] {
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("19")) {
if (method=="REGISTER") {
fix_nated_register();
} else {
fix_nated_contact();
}
setflag(FLT_NATS);
setbflag(FLB_NATB);
}
#!endif
return;
}
# Handle SIP registrations
route[REGISTRAR] {
if (is_method("REGISTER"))
{
xlog("L_ALERT", "REGISTER: From $fU, $fd To $tU, $td");
if (isflagset(FLT_NATS) || isbflagset(FLB_NATB))
{
setbflag(FLB_NATB);
# uncomment next line to do SIP NAT pinging
setbflag(FLB_NATSIPPING);
}
# 7/28/11 - make sure only one contact location is active
# at any given time
# unregister("location", "$rU");
if (isbflagset(FLB_NATB))
{
xlog("L_ALERT", "REGISTRAR: For $fU, $fd FLB_NATB
set");
}
if (isbflagset(FLB_NATSIPPING))
{
xlog("L_ALERT", "REGISTRAR: For $fU, $fd
FLB_NATSIPPING set");
}
if (!save("location"))
{
xlog("L_ALERT", "REGISTRAR: From $fU, $fd Location
could not be saved");
sl_reply_error();
}
exit;
}
}
The debug log snippets
==================
Oct 1 15:58:30 siptest /usr/sbin/kamailio[19515]: ALERT: <script>:
REGISTER: From p_krishna_test_com, 50.62.1.7 To p_krishna_test_com,
50.62.1.7
Oct 1 15:58:30 siptest /usr/sbin/kamailio[19515]: ALERT: <script>:
REGISTRAR: For p_krishna_test_com, 50.62.1.7 FLB_NATB set
Oct 1 15:58:30 siptest /usr/sbin/kamailio[19515]: ALERT: <script>:
REGISTRAR: For p_krishna_test_com, 50.62.1.7 FLB_NATSIPPING set
Oct 1 15:58:30 siptest /usr/sbin/kamailio[19515]: DEBUG: sl [sl.c:278]:
reply in stateless mode (sl)
Output of kamctl command
====================
$ sudo kamctl ul show
Domain:: location table=512 records=1 max_slot=1
AOR:: p_krishna_test_com
Contact:: sip:p_krishna_test_com@75.62.17.45:50073;transport=tcp;ob Q=
Expires:: 287
Callid:: ad2d3a7bf39a4345861db1661576a7f3
Cseq:: 54856
User-agent:: QliqDesktop 1.0.0 (pjproject 1.10.0/win32)
State:: CS_NEW
Flags:: 0
Cflag:: 0
<================= Cflag is not being set.
Socket:: tcp:10.1.0.6:5060
Methods:: 8143
Thanks
Krish Kura
I'm using Kamailio as dispatcher to a FreeSwitch setup.
Currently it "almost" work. I have 2 extensions connected to my FreeSwitch
via Kamailio. However, I can only send calls one way because Kamailio seems
to change the domain on the extension.
One extension is registered with ID(a)sip.my-domain.com. This I can send calls
to.
The other extension is registered with ID@local-ip. This I cannot send calls
to.
Isn't it possible to have Kamailio register the extension on my FreeSwitch
with @sip.my-domain.com?
If I register both extension directly to my FreeSwitch everything works.
Alternately, if you dislike any of these paradigms or find the order of operations inconvenient, just roll your own. That's what sqlops is for.
--
This message was painstakingly thumbed out on my mobile, so apologies for brevity, errors, and general sloppiness.
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/
On Oct 1, 2011, at 10:43 AM, "graham(a)g-rock.net" <graham(a)g-rock.net> wrote:
> I know I am Auth'ing users, but apparently need to confirm the location of www_authorize. Thanks for the pointers Alex.
>
> Sent from my HTC on the Now Network from Sprint!
>
> ----- Reply message -----
> From: "Alex Balashov" <abalashov(a)evaristesys.com>
> Date: Sat, Oct 1, 2011 9:07 am
> Subject: [SR-Users] Setting avp from load_credentials
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users Mailing List" <sr-users(a)lists.sip-router.org>
>
> Sure it is, but credentials only get loaded if you are doing proxy/www_authorize() beforehand. Are you?
>
> --
> This message was painstakingly thumbed out on my mobile, so apologies for brevity, errors, and general sloppiness.
>
> Alex Balashov - Principal
> Evariste Systems LLC
> 260 Peachtree Street NW
> Suite 2200
> Atlanta, GA 30303
> Tel: +1-678-954-0670
> Fax: +1-404-961-1892
> Web: http://www.evaristesys.com/
>
> On Oct 1, 2011, at 9:24 AM, Graham Wooden <graham(a)g-rock.net> wrote:
>
> > Hi there,
> >
> > Just doing a quick test and this doesn’t appear to be working. Kamailio
> > 1.5.5-notls. Snippet of code:
> >
> > modparam("auth_db", "load_credentials", "username")
> > .
> > .
> > .
> > xlog("username is $avp(s:username)\n");
> >
> >
> > The result is '<null>'. Is this not available in the route{} ?
> >
> > Thanks,
> >
> > -graham
> >
> >
> >
> >
> >
> > _______________________________________________
> > 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
>
>
I know I am Auth'ing users, but apparently need to confirm the location of www_authorize. Thanks for the pointers Alex.
Sent from my HTC on the Now Network from Sprint!
----- Reply message -----
From: "Alex Balashov" <abalashov(a)evaristesys.com>
Date: Sat, Oct 1, 2011 9:07 am
Subject: [SR-Users] Setting avp from load_credentials
To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users Mailing List" <sr-users(a)lists.sip-router.org>
Sure it is, but credentials only get loaded if you are doing proxy/www_authorize() beforehand. Are you?
--
This message was painstakingly thumbed out on my mobile, so apologies for brevity, errors, and general sloppiness.
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/
On Oct 1, 2011, at 9:24 AM, Graham Wooden <graham(a)g-rock.net> wrote:
> Hi there,
>
> Just doing a quick test and this doesn’t appear to be working. Kamailio
> 1.5.5-notls. Snippet of code:
>
> modparam("auth_db", "load_credentials", "username")
> .
> .
> .
> xlog("username is $avp(s:username)\n");
>
>
> The result is '<null>'. Is this not available in the route{} ?
>
> Thanks,
>
> -graham
>
>
>
>
>
> _______________________________________________
> 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
Hi there,
Just doing a quick test and this doesn¹t appear to be working. Kamailio
1.5.5-notls. Snippet of code:
modparam("auth_db", "load_credentials", "username")
.
.
.
xlog("username is $avp(s:username)\n");
The result is '<null>'. Is this not available in the route{} ?
Thanks,
-graham
Hi there,
What is pv for the equivalent of $rU for outbound? My inbound use of $rU has
the correct username. All my subscribers are multi-number trunks, so on the
outbound I need to associate the subscriber. This is kamailio 1.5.
Thanks,
-graham
Hi there,
Finally getting around to introducing some call limits and starting with the
inbound calls. However, I ran into an issue about how to get the "in use"
count to be updated in my quota table.
What is the best way to get s:in_use to update so it can be calculated?
Here is my snippet of code:
if (is_method("INVITE")) {
avp_db_query("select quota, in_use from quota where
username='$rU'","$avp(s:quota);$avp(s:in_use)");
if ($avp(s:in_use) >= $avp(s:quota)){
xlog ("DEBUG: Trunk $rU is over quota");
sl_send_reply("503","User over quota");
}
.
.
}
This opens up two more questions: How to decrease the call count when a BYE
is received - maybe do a subtraction and the do a avp_db_query to update the
table?
And of course there is the BYE that won't be present (ie. When a call just
rings and hangs up before it gets answered). Maybe ACC's missed_calls can
somewhat be used to help determine?
Thanks for any pointers and guidance. I am running Kamailio 1.5.
Thanks,
-graham