Hi Guys,
Hope all are well?
sorry to post but Im just trying to get something working where Im trying to convert a php function script into the kamailio.cfg.
Im getting there but wonder how I can group results of sets of avps with another avp.
Say I have these variables;
$(avp(NTgrp)) = 'SB100_000361@1.2.3.4|SB100_000213@1.2.3.5|SB100_000225@1.2.3.6|SB100_000361@1.2.3.7|SB100_000213@1.2.3.8';$(avp(Prio)) = '1|1|1|2|2';$(avp(Wgt)) = '10000|10000|80000|30000|70000';$(avp(CInc)) = '0|0|1|0|1';$(avp(WTot))= '100000|100000|100000|100000|100000'; I then run a while script to split up their variables via the delimiter | in user;
$var(j)=0;while($var(j)<$var(count)) {$(avp(NTgrpP))=$(avp(NTgrp){s.select,$var(j),|});$(avp(PrioP))=$(avp(Prio){s.select,$var(j),|});$(avp(WgtP))=$(avp(Wgt){s.select,$var(j),|});$(avp(CIncP))=$(avp(CInc){s.select,$var(j),|});$(avp(WTotP))=$(avp(WTot){s.select,$var(j),|});xlog("L_INFO"," Now Each time we have $(avp(NTgrpP)) $(avp(PrioP)) $(avp(WgtP)) $(avp(CIncP)) $(avp(WTotP))\n");$var(j)=$var(j)+1;}
This then results in;INFO: <script>: Now Each time we have SB100_000223(a)1.2.3.4 1 10000 0 100000INFO: <script>: Now Each time we have SB100_000225(a)1.2.3.5 1 10000 0 100000INFO: <script>: Now Each time we have SB100_000386(a)1.2.3.6 1 80000 0 100000INFO: <script>: Now Each time we have SB100_000213(a)1.2.3.7 2 30000 0 100000INFO: <script>: Now Each time we have SB100_000361(a)1.2.3.8 2 70000 0 100000
Now what Id like to do is group them via priorities so I can do some further functional checks on them when in same priority group, as you can see there are 3 results at priority 1 and 2 at priority 2.
Is there away I can create something of a multi-array using the AVP $(avp(PrioP)) I just created so I can group by priority?
As in php I would do something like;
$multi_arr[$prio_arr[$p]][] = array( "ntgrp" => $ntgrp_arr[$p], "prio" => $prio_arr[$p], "wght" => $wght_arr[$p], "cinc" => $cinc_arr[$p], "wtot" => $wtot_arr[$p], ); }
Any help would be great.
Many thanks
Jon
hello all.
we compiled kamailio with TLS Support. but have next problem when using CRL Lits.
Our Certificate issuing scheme is follow:
Offline Root CA -> Enterprise SubCA -> Server and Phone Certificate
CRL list is signed by SubCA.
option "require client certificate is enables (1) "
When we enable CRL list, phones are not registered.
CA file is offline RootCA certificate in pem format.
We think that the reason is that СRL was signed by Subca or incorrect CRL format.
CRL is converted from MS CRL to PEM. (What is the format for the CRL)
maybe someone have experiance with similar scenarios?
thanks in advance!!
________________________________
[gh.ge]
ვლადიმერ გაბუნია
IT სამსახურის უფროსი
ტელ: (+995) 32 2505222 +8183
მობ: (995) 577 095333
შპს "ჯეო ჰოსპიტალს"
სათავო ოფისი
თბილისი 0160, ვაჟა-ფშაველას გამზ. № 16;
http://www.gh.ge <http://gh.ge>
Hello!
We noticed today an issue with the kamailio loadbalancing.
Basically kamailio is not considering if an host is up or not, backends are
set always as "FLAGS: AP" even if the host is down.
I see this when the proxy starts :
ERROR: dispatcher [dispatcher.c:768]: ds_warn_fixup(): failover functions
used, but required AVP parameters are NULL -- feature disabled
These the parameters I have set:
# ----- dispatcher params -----
modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.list")
modparam("dispatcher", "dst_avp", "$avp(dsdst)")
modparam("dispatcher", "grp_avp", "$avp(dsgrp)")
modparam("dispatcher", "cnt_avp", "$avp(dscnt)")
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_reply_codes", "class=2;class=3;code=404")
modparam("dispatcher", "ds_ping_from", "sip:proxy@sip.nexmo.com")
modparam("dispatcher", "ds_ping_interval", 20)
modparam("dispatcher", "ds_probing_threshold", 1)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_hash_size", 10)
modparam("dispatcher", "ds_hash_expire", 3600)
modparam("dispatcher", "ds_hash_initexpire", 60)
modparam("dispatcher", "ds_hash_check_interval", 10)
modparam("dispatcher", "use_default", 0)
modparam("dispatcher", "attrs_pvname", "$avp(carrierattr)")
modparam("dispatcher", "setid_pvname", "$avp(carriergroup)")
modparam("dispatcher", "flags", 2)
I use 4.3.3, I think this issue started after upgrading from 4.3.1 but I
can't say for sure.
Can someone please give us some advices on this?
Thanks
Alessio
Hello!
I use kamailio 1.5.4-tls (i386/linux).
I configured the tls options:
disable_tls = 0
listen=tls:192.168.50.60:5061
tls_certificate="/etc/kamailio/tls/crt.pem"
tls_private_key="/etc/kamailio/tls/key.pem"
tls_ca_list="/etc/kamailio/tls/ca.pem"
tls_verify_client=on
tls_require_client_certificate=on
I need to check certificate revocation, but the option tls_crl does not
work. Which option uses for check certificate revocation in kamailio 1.5.x ?
Hello,
i've DID provider that require to register to it's server. I've been able
to configure this provider using kamailio and uac and to route all inbound
calls from DID provider to internal asterisk media server. All is working
great.
Now i need help to configure call routing from internal asterisk to the
external DID provider.
I've done something like:
route[LOCATION] {
if(is_method("INVITE")) {
route(FROMASTERISK);
route(TOASTERISK);
exit;
}
[...]
}
route[FROMASTERISK] {
if (ds_is_from_list()) {
xlog("L_INFO","[$fU@$si:$sp]{$rm} {$ru} Call from Media-Server Cluster\n");
rtpengine_manage("direction=internal direction=external replace-origin
replace-session-connection trust-address");
$ru = "sip:TESTING_NUMBER@EXTERNAL_PROVIDER_IP";
route(RELAY);
exit;
}
}
It seems that when i route the call outbound, i get a 407. So i would like
to react to this using uac_auth() as described here:
http://kamailio.org/docs/modules/4.3.x/modules/uac.html#uac.f.uac_auth()
Is this the right way? Can someone help me, giving hints and some working
example?
Using kamailio 4.3.3 with rtpengine 4.1.0
Best regards,
Bruno
--
The life is short.. live at your best!
Hello community,
I work with Kamailio 4.2.0 which is placed between two networks (with two interfaces) and RTPproxy in bridge mode.
The task from Kamailio is to handle the calls from internal networks to internal networks only on the internal Interface without bridging. For external networks vice versa. If the call comes from external to internal, then the RTPproxy should work in bridge mode and vice versa. I adapt the example with IPv4 and IPv6 routing, but this is not working for internal to external calls and vice versa (http://kb.asipto.com/kamailio:kamailio-mixed-ipv4-ipv6). Only external calls and only internal calls works. I think the cause of this behavior is the routing which I implemented to the RTPmanage part in the Kamailio config.
The error message is given by the internal device. (call from external to internal)
If I make a call from internal to external, the RTP stream is only in one direction.
Internal Interface IP: 203.207.111.58
External Interface IP: 193.16.163.58
The RTPproxy config is:
CONTROL_SOCK=udp:127.0.0.1:9000
EXTRA_OPTS="-l 203.207.111.58/193.16.163.58 -d WARN:LOG_LOCAL1"
Kamailio.cfg:
#!define INT_IP 10.96.0.0/14
#!define EXT_IP 193.0.0.0/8
# RTPProxy control and singaling updates for NAT traversal
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
return;
# rtpproxy_manage("co");
# Start Test routing
if((src_ip==INT_IP && dst_ip==EXT_IP)){
rtpproxy_manage("cowie");
}
if((src_ip==EXT_IP && dst_ip==INT_IP)){
rtpproxy_manage("cowei");
}
if (is_request()) {
if (!has_totag()) {
if(t_is_branch_route()) {
add_rr_param(";nat=yes");
}
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
if(is_first_hop())
set_contact_alias();
}
}
#!endif
return;
}
Can someone help me with the right routing? Do you need some more debugging information?
Cheers,
Kai
Hi,
I have been trying to setup Kamailio v4.3.3 rev. e275bc on RHEL 7.1 64bit.
It has been very difficult to resolve all dependencies initially due to
RHEL's extremely limited repositories and libraries support, but
nevertheless I am finally able to successfully compile kamailio with all
essential modules on it.
However, now kamailio fails to start up and gives this strange error,
--
36(3335) CRITICAL: <core> [io_wait.c:526]: init_io_wait(): could not alloc
epoll array
36(3335) CRITICAL: <core> [tcp_main.c:4523]: tcp_main_loop(): exiting...
0(3250) ALERT: <core> [main.c:725]: handle_sigs(): child process 3335
exited normally, status=255
0(3250) INFO: <core> [main.c:743]: handle_sigs(): terminating due to
SIGCHLD
--
I have never seem this error before nor i can find any info related to it
anywhere on internet. So, i doubt it is due to any missing dependency.
Any idea what may be the cause of this?
Thank you.