Greetings,
I'm having some trouble with the syntax used in the {re.subst,expression}
method. What i want to do is add a prefix to a capture group.
I can make it work like that /^[0-9]+/prefix$tU/ but this solution is far
from perfect since i may not need the entire $tU.
I would like to use it like this /^[0-9]+/prefix\1/ in order to not limit
my regex to Kamailio only. When i do it like this the regex result is only
"prefix".
What's the correct syntax to add a prefix using the capture group ?
Thanks in advance
I was testing topos with a mysql backend and all was fine. But since the
purpose of this machine doesn't require a complete mysqlserver I tried
the redis backend. With redis the calls will drop after some timeout
(somewhere < 450 seconds (session timer set to 900)).
Config:
# topos
modparam("ndb_redis", "server", "name=srv2;addr=127.0.0.1;port=6379;db=2")
modparam("topos", "storage", "redis")
modparam("topos_redis", "serverid", "srv2")
#modparam("topos", "storage", "db")
#modparam("topos", "db_url", DBURL)
modparam("topos", "mask_callid", 0)
modparam("topos", "sanity_checks", 0)
modparam("topos", "branch_expire", 180)
modparam("topos", "dialog_expire", 10800)
modparam("topos", "clean_interval", 60)
The call will end on the first session-time firing with a "404 Not here"
Debug contains:
Mar 27 12:20:56 kam kamailio[11649]: DEBUG: topos_redis [topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for [d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:20:56 kam kamailio[11649]: DEBUG: ndb_redis [redis_client.c:878]: redisc_exec_argv(): rsrv->ctxRedis = 0x55a7c8da8500
Mar 27 12:20:56 kam kamailio[11649]: DEBUG: topos_redis [topos_redis_storage.c:980]: tps_redis_load_dialog(): hmap with key [d:z:atpsh-5aba19b2-2d7f-2] not found
This records was inserted/updated:
Mar 27 12:17:10 kam kamailio[11647]: DEBUG: topos_redis [topos_redis_storage.c:253]: tps_redis_insert_dialog(): inserted dialog record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 26
Mar 27 12:17:10 kam kamailio[11647]: DEBUG: topos_redis [topos_redis_storage.c:282]: tps_redis_insert_dialog(): expire set on dialog record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 3
Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis [topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for [d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis [topos_redis_storage.c:1293]: tps_redis_update_dialog(): updated dialog record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 6
Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis [topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for [d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis [topos_redis_storage.c:1293]: tps_redis_update_dialog(): updated dialog record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 6
Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis [topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for [d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis [topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for [d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis [topos_redis_storage.c:1381]: tps_redis_end_dialog(): updated on end the dialog record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 6
Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis [topos_redis_storage.c:1412]: tps_redis_end_dialog(): expire set on branch record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 3
It looks like the last update/expire sets the timeout to 180s, so the
not found is reasonably expected. But why is it that these records
aren't deleted in the mysql backend?
0000 00 00 03 04 00 06 00 00 00 00 00 00 00 00 08 00 ................
0010 45 00 00 6d 0a 52 40 00 40 06 32 37 7f 00 00 01 E..m.R@.@.27....
0020 7f 00 00 01 b1 0c 18 eb c4 68 f0 3b 93 17 20 b0 .........h.;.. .
0030 80 18 03 d6 fe 61 00 00 01 01 08 0a 00 08 50 67 .....a........Pg
0040 00 08 50 67 2a 33 0d 0a 24 36 0d 0a 45 58 50 49 ..Pg*3..$6..EXPI
0050 52 45 0d 0a 24 32 35 0d 0a 64 3a 7a 3a 61 74 70 RE..$25..d:z:atp
0060 73 68 2d 35 61 62 61 31 39 62 32 2d 32 64 37 66 sh-5aba19b2-2d7f
0070 2d 32 0d 0a 24 33 0d 0a 31 38 30 0d 0a -2..$3..180..
Hi you all,
I have set up Kamailio and RTPProxy in front of Asterisk.
Currently successfully able to route calls from two differrent SIP-Trunk providers terminated to Kamailio and RTPProxy.
I would like to get a view of calls currently running through Kamailio?
I should be able to see some details about the call like the calling called numbers and the time call has been active.
I’m not sure if Siremis would provide such view. Also looked Homer and also not sure it has something like that. Still those provide much more like for troubleshooting.
If anyone has idea how that would be possible to accomplish or know that there already is such implementation I would be interested.
Tomi
Hi All,
Kamailio send 2 Invite request for Client behind NAT. due to this reason
for one request,Client respond with 486 Busy here. we only want to send 1
INVITE request.
Following are the AOR for client at kamailio.if field(ip port) in CONTACT
and RECEIVED differ then kamailio send 2 INVITE request. Please advice if
there is any way to send only ONE INVITE*.*
AOR:: 123
Contact:: sip:123@*192.168.230.124:45672
<http://192.168.230.124:45672>* Q=1
Expires:: 894
Callid:: 003A8EC4-12351(a)192.168.230.124
Cseq:: 2
User-agent:: SIPPER for 3CX Phone
Received:: sip:*204.192.206.208
<http://204.192.206.208>: 45672 *
State:: CS_NEW
Flags:: 0
Cflag:: 192
Socket:: udp:172.12.120.88:5060
Methods:: 4294967295
Ruid:: uloc-5aba112d-7fce-5
Reg-Id:: 0
Last-Keepalive:: 1522144583
Last-Modified:: 1522144583
thanks,
amit
Hello,
I use kamailio 5.1.1 with default configuration for PRESENCE:
Route:
#!ifdef WITH_PRESENCE
if (!t_newtran()) {
sl_reply_error();
exit;
}
if(is_method("PUBLISH")) {
handle_publish();
t_release();
} else if(is_method("SUBSCRIBE")) {
handle_subscribe();
t_release();
}
exit;
#!endif
and modparams:
#!ifdef WITH_PRESENCE
# ----- presence params -----
modparam("presence", "db_url", DBURL)
# ----- presence_xml params -----
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
#!endif
I use and GRANSTREAM phones.
When I make subscribe from soft sip client (Micro sip) to the
grandstreams, all NOTIFY messages are without XML.
Subscriptions between two soft sip clients like Zoiper and Micro SIP works
perfectly. Is this related to GRANDSTREAM phones - configuration or so...
or is necessary to modify kamailio configuration and if Yes, please
provide some hitns how to change kamailio config?
Thanks in advance.
Best regards.
Denislav Raychev Tsonev | Integration and Infrastructure Engineer |
Musala Soft JSC
www.musala.com | t: +359 2 969 58 21 | m: +359 878 270 965 | f:
+359 2 969 58 22
World Trade Center, 36 Dragan Tsankov blvd., Sofia 1057, Bulgaria
Hi
I'm using version: kamailio 5.1.2
I have strange issue with auth_challenge
kamialio works as NAT handler. When Register comes kamailio handles nat and
save original ip:port at the received field in location table
I found that when local port in contact is different than external port
reply 407 on INVITE comes to externalip (from received) : internalport(from
contact)
And never reaches destination
for exmaple
Register comes from
192.168.1.10:50555
Kamailio saves at the Received
12.1.1.12:1030
but when invite comes form 12.1.1.12:1030 kamailio sends reply to
12.1.1.12:50555
i don't think that this is an issue in kamailio source code but i can find
where i can configure it
hello all:
I install kamailio 5.1 and siremis 5.1, I want to configure kamailio connection freepbx, how should i configure kamailio vai siremis GUI?
Thanks.
------------------
Best regards!
alex
Hiastar 深圳星昊通科技
Sangoma in APAC, 潮流网络IP话机,IPPBX
Asterisk cards, SBC, NetBorder VOIP Gateway, Transcoding, 潮流网络IP话机
QQ:2933996052
website:www.hiastar.com|www.freepbx.cn, contact number: 13574109204
关注微信公众帐号:Asterisk-CN
HI,
Myself Ayub from Phonology, Bangalore, India.
We are trying to set up an SIP proxy server using Kamailio with Siremis as
web interface.
Have installed and configured kamailio and siremis but need help in config
if sip domain , users and etc...
Please revert.
Regards
Ayub
Greetings list.
I can see that I was able to bypass the default route[AUTH] if I send an
invite containing from_uri which is not local but requested line containing
a local user.
llisten=udp:172.16.40.10:5060
route[AUTH] {
#!ifdef WITH_AUTH
#!ifdef WITH_IPAUTH
if((!is_method("REGISTER")) && allow_source_address()) {
# source IP allowed
return;
}
#!endif
if (is_method("REGISTER") || from_uri==myself) {
# authenticate requests
if (!auth_check("$fd", "subscriber", "1")) {
auth_challenge("$fd", "0");
exit;
}
# user authenticated - remove auth header
if(!is_method("REGISTER|PUBLISH"))
consume_credentials();
}
# if caller is not local subscriber, then check if it calls
# a local destination, otherwise deny, not an open relay here
if (from_uri!=myself && uri!=myself) {
sl_send_reply("403","Not relaying");
exit;
}
#!else
# authentication not enabled - do not relay at all to foreign networks
if(uri!=myself) {
sl_send_reply("403","Not relaying");
exit;
}
#!endif
return;
}
Below INVITE get passed above auth route.
INVITE sip:60129879190@172.16.40.10 SIP/2.0
Via: SIP/2.0/UDP 139.5.177.91:5060;branch=z9hG4bK31edc7f4;rport
Max-Forwards: 70
From: <sip:0128888877@139.5.177.99>;tag=as2274e806
To: <sip:60129879190@172.16.40.10>
Contact: <sip:0128888877@139.5.177.91:5060>
Call-ID: 7b6d32bc6c679bb23eb248b955c0ac8b@139.5.177.91:5060
CSeq: 102 INVITE
User-Agent: FPBX-13.0.194.2(13.17.0)
Date: Fri, 23 Mar 2018 09:33:01 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 321
v=0
o=root 237494576 237494576 IN IP4 139.5.177.99
s=Asterisk PBX 13.17.0
c=IN IP4 139.5.177.99
t=0 0
m=audio 15332 RTP/AVP 0 18 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
>From INVITE and route[AUTH] I can see why it is being passed.
But should not it by default authenticate every request if IP address is
not allowed in permission module.
Br, Aqs.