Hello I have a query regarding the record-route field update in DB for SCA
SUBSCRIBE. Here are my test cases *Initial SCA subscription,* We got the
below SUBSCRIBE packet in kamailio SUBSCRIBE sip:1234.xyz.com:5060 SIP/2.0
Via: SIP/2.0/UDP kam-ip:5060;branch=z9hG4bK2sansay1081381rdb66
*Record-Route*
: <sip:sansay1081381rdb66spid17urcvjtr139807186744464nat0@kam-ip:5060;lr;transport=udp>
To: <sip:372427@1234.xyz.com:6060> From: "708"
<sip:372427@1234.xyz.com:6060>;tag=CFFBAF19-19A68CBC
Call-ID: bd4b50d9384523c14ea05c532d895bf2 CSeq: 2 SUBSCRIBE Contact: <
sip:372427@192.168.1.3> Expires: 3600 Allow:
INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
Event: call-info User-Agent: PolycomVVX Accept-Language: en Max-Forwards:
69 Content-Length: 0 also in the sca_subscriptions table record-route
header is updated as per Initial SUBSCRIBE record-route. *record_route:
<sip:sansay1081381rdb66spid17urcvjtr139807186744464nat0@kam-ip:5060;lr;transport=udp>
* But After rebooting the device, we got a new record-route in SUBSCRIBE
Packet but in DB Record-route Field not updated after getting an updated
record-route in Trace. *Kamailio Trace *SUBSCRIBE sip:1234.xyz.com:5060 SIP/2.0
Via: SIP/2.0/UDP kam-ip:5060;branch=z9hG4bK2sansay1081415rdb48
*Record-Route*:
<sip:sansay1081415rdb48spid17urcvjtr139807186744464nat0@kam-ip:5060;lr;transport=udp>
To: <sip:372427@1234.xyz.com:6060> From: "708"
<sip:372427@1234.xyz.com:6060>;tag=35852031-CF749E20
Call-ID: 41fa031d79e35fae4a61c61984895bf2 CSeq: 2 SUBSCRIBE Contact: <
sip:372427@192.168.1.3> Expires: 3600 Allow:
INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
Event: call-info User-Agent: PolycomVVX Accept-Language: en Max-Forwards:
69 Content-Length: 0 as per logic it should update the record-route field
in sca_subscriptions table . but it didn't update it : record_route:
<sip:sansay1081381rdb66spid17urcvjtr139807186744464nat0@kam-ip:5060;lr;transport=udp>
So can you suggest to us how we can update the record-route field as per
SUBSCRIBE's packet new record-route ?
I am having an issue matching toll-free. I tested my regex on regex101.com,
and it looks good, but it does not match my if statement. Am I doing
something wrong?
if (method=="INVITE") {
xlog("L_INFO", "Checking Routes $rU");
if ($rU=~"^(\+?1)?(8(00|44|55|66|77|88)[2-9]\d{6})$") {
xlog("L_INFO", "Tollfree call");
};
};
Logs show "<script>: Checking Routes +18002211212" so I don't get why it
does not match.
><>
Nathan Stratton
Founder, CTO
Vocinity, Inc.
<https://www.vocinity.com/gabbi>
Hi
I have an existing kamailio config and I want to migrate to kemi. I want to
know what is the equivalent of this code in kemi javascript ?
$avp(s:contact) = $hdr(Contact);
$avp(s:contact_fix) = $hdr(Contact);
avp_subst("$avp(s:contact_fix)",
"/@([0-9]+).([0-9]+).([0-9]+).([0-9]+)/@$sel(cfg_get.kamailio.ss_ip)/gi");
remove_hf("Contact");
append_hf("Contact: $avp(s:contact_fix)\r\n");
t_on_reply("REG_FIX");
thanks for your attention.
What is the simplest way to return values from external application into
Kamailio config and assign it to a variable?
I'm looking for the most light weight mechanism to do it and to offload
some logic to external app. Something like this would be ideal:
$var(myVar), $var(err) = lua_run("lua_func1", "$rU");
OR
$var(encString) = exec_cmd("echo 'abc $rU' | base64");
There is this method:
http_client_query("http://...", "", "", "$var(result)");
but there is an overhead of networking and HTTP protocol.
Please advise.
Thanks, Dmytro
All,
I've been trying to chase down an issue with db_cluster and permissions in combination with something else, where with my full configuration using the same cluster in multiple modules has failures. I've been trying to create a simplified configuration to consistently reproduce the problem without much success, however I did stumble upon THIS particular problem. The configuration here works fine as is - avpops uses the cluster URL, and carrierroute uses the direct SQLite URL. If I define WITH_DBCLUSTER, then carrierroute fails fetching rows using the cluster connection. Note that AVPOPS is only used as a general test to see if the cluster config works. If I remove references to avpops , carrierroute still fails loading from the cluster URL. Thoughts?
#!KAMAILIO
loadmodule "db_sqlite"
loadmodule "pv"
loadmodule "db_cluster"
loadmodule "carrierroute"
loadmodule "avpops"
modparam("db_cluster", "connection", "db1=>sqlite:////etc/db.sqlite")
modparam("db_cluster", "cluster", "cl1=>db1=9s9s")
modparam("db_cluster", "inactive_interval", 30)
#!ifdef WITH_DBCLUSTER
modparam("carrierroute", "db_url", "cluster://cl1")
#!else
modparam("carrierroute", "db_url", "sqlite:////etc/db.sqlite")
#!endif
modparam("carrierroute", "config_source", "db")
modparam("avpops", "db_url", "cluster://cl1")
modparam("avpops", "avp_table", "usr_preferences")
request_route {
exit;
}
Failure log:
0(1) ERROR: carrierroute [cr_db.c:345]: load_route_data_db(): Fetching rows failed
0(1) ERROR: carrierroute [cr_data.c:179]: reload_route_data(): could not load routing data
0(1) ERROR: carrierroute [carrierroute.c:240]: mod_init(): could not prepare route data
0(1) ERROR: <core> [core/sr_module.c:942]: init_mod(): Error while initializing module carrierroute (/usr/lib/kamailio/modules/carrierroute.so)
Kaufman
Hi,
Some percentage of requests processed with async_route("REQ_PROCESS", "5") seem to end up with a resumed transaction, though most do. Not sure what the exact percentage is. The ones that don't
Is this due to excessive requests? Is there a limit on internal IPC queue depth? Is it conceptually similar to a generic shared blocking queue internally, along the lines of 'mqueue'? Is there any reasonable way to troubleshoot this?
Thanks!
-- Alex
--
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800
Hi,
Can DISPATCHER be used in conjunction with ENUM?
E.g., to avoid sending requests to SIP destinations that are returned by ENUM, but, which DISPATCHER knows are down?
Thanks,
Jawaid
I have a multi-homed kam with a uas behind one private interface and a
public interface for the uac+sip provider.
When the uac initiates a call, kam sends the invite to the private uas
which sets up a b-leg call back to kam with a Contact header that has the
uas' private ip address. I want to change that private ip address to be
Kamailio's advertised/public ip address before it gets forwarded to the sip
provider.
I am rewriting Contact in a route from request_route like this:
> if ($rP != $null) {
> $var(ct) = ";transport=" + $rP;
> }else{
> $var(ct) = "";
> }
> $var(cr) = "<sip:" + $fU + "@" + $RAi + ":" + $RAp + $var(ct) + ">";
>
> remove_hf("Contact");
> append_hf("Contact: $var(cr)\r\n");
This seems to work fine for the INVITE going to the provider.
There's also the 200 OK that the uas sends for the uac (a-leg) with a
private ip address in Contact -- I want to rewrite that before sending it
to the UAC, too.
Using the same method as above (but inside onreply_route), what happens is
the UAC receives the modified OK and sends back an ACK with the modified
Contact (kam's public ip addr) in the ACK r-uri, and kam gets in a loop of
sending an ACK from its private ip address to its public ip address and
replying to itself.
call flows: https://imgur.com/a/Yj2DJpn
Is there a right way to do this?