Re: [SR-Users] DMQ broadcasting crashes kamailio

2020-04-27 Thread SamyGo
Update:I've applied the code changes on 5.3 and 5.2 version and I can now
see that once DMQ peer gets added the 202 Accepted DMQ started showing up
and now cluster pair seems to be stable. No more core dumps or
notification_peer deletion messages.
So quick thought, what if I broadcast message to > 2 Kamailio boxes and all
recipients send back 202 Accepted DMQ back to the sender. wouldn't it cause
some trouble to the sender ?

BR,
Sammy



On Mon, Apr 27, 2020 at 4:53 PM SamyGo  wrote:

> Hi,
> I've applied the changes to the two files and taken some captures. I'm
> trying to find out if the 202 Accepted part is engaged or not, so far
> doesn't seem to show up in the pcaps.
> However if I put dmq_handle_msg() it goes and send back a 404 User Not
> Found from the message.c file.
>
> peer = find_peer(msg->parsed_uri.user);
> if(!peer) {
> LM_DBG("no peer found for %.*s\n",
> msg->parsed_uri.user.len,
> msg->parsed_uri.user.s);
> if(slb.freply(msg, 404, _404_rpl) < 0) {
> LM_ERR("sending reply\n");
> goto error;
> }
> return returnval;
> }
>
> Not crashing now atleast. I'm going to keep on trying script combinations
> and see how to get the *202 Accepted DMQ.*
>
> Thanks,
> Sammy
>
> On Sat, Apr 25, 2020 at 7:55 AM kachi communication 
> wrote:
>
>> Am sorry! Thanks for the information.
>>
>> On Fri, Apr 24, 2020, 11:13 PM Alex Balashov 
>> wrote:
>>
>>> On Fri, Apr 24, 2020 at 08:25:15PM -0400, kachi communication wrote:
>>>
>>> > I need someone to build a calling card switch for my company for a
>>> > fee.
>>>
>>> 1. This has nothing to do with the mailing list thread to which you are
>>> replying, and as such is quite a rude and inconsiderate intrusion;
>>>
>>> 2. There is a business mailing list specifically for commercial
>>> solicitations of this nature:
>>>
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/business
>>>
>>> 3. You can find a list of providers of commercial Kamailio consulting
>>> and support here:
>>>
>>> https://www.kamailio.org/w/business-directory/
>>>
>>> -- Alex
>>>
>>> --
>>> Alex Balashov | Principal | Evariste Systems LLC
>>>
>>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ broadcasting crashes kamailio

2020-04-27 Thread SamyGo
Hi,
I've applied the changes to the two files and taken some captures. I'm
trying to find out if the 202 Accepted part is engaged or not, so far
doesn't seem to show up in the pcaps.
However if I put dmq_handle_msg() it goes and send back a 404 User Not
Found from the message.c file.

peer = find_peer(msg->parsed_uri.user);
if(!peer) {
LM_DBG("no peer found for %.*s\n", msg->parsed_uri.user.len,
msg->parsed_uri.user.s);
if(slb.freply(msg, 404, _404_rpl) < 0) {
LM_ERR("sending reply\n");
goto error;
}
return returnval;
}

Not crashing now atleast. I'm going to keep on trying script combinations
and see how to get the *202 Accepted DMQ.*

Thanks,
Sammy

On Sat, Apr 25, 2020 at 7:55 AM kachi communication 
wrote:

> Am sorry! Thanks for the information.
>
> On Fri, Apr 24, 2020, 11:13 PM Alex Balashov 
> wrote:
>
>> On Fri, Apr 24, 2020 at 08:25:15PM -0400, kachi communication wrote:
>>
>> > I need someone to build a calling card switch for my company for a
>> > fee.
>>
>> 1. This has nothing to do with the mailing list thread to which you are
>> replying, and as such is quite a rude and inconsiderate intrusion;
>>
>> 2. There is a business mailing list specifically for commercial
>> solicitations of this nature:
>>
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/business
>>
>> 3. You can find a list of providers of commercial Kamailio consulting
>> and support here:
>>
>> https://www.kamailio.org/w/business-directory/
>>
>> -- Alex
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>>
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Dialog module problem.

2020-04-24 Thread SamyGo
Hi,

The stuck BYE, as you described is not relayed to the other end, could it
be possible that Kamailio is unable to match the RURI of the BYE with the
Contact header of the initial INVITE !
something that has to do with the contact handling in Kamailio script. This
sounds like some NATd contact fix/handling situation.

If you've the pcaps of the good and bad calls, then see if the headers
mismatch !

Regards,
Sammy

On Fri, Apr 24, 2020 at 5:20 PM Voip support  wrote:

> Hello,
> i am using dialog module in-memory to get all dialogs and show in a
> website.
> I use for this kamctl dialog show which is run quite often for autorefresh.
>
> I noticed that some calls get hung on kamailio while on caller side and
> callee side calls are disconnected.
>
> I captured a wireshark trace and for same caller IP i get many good calls
> as well some bad calls (not disconnected properly). When comparing the BYE
> packets i could not notice any difference.
>
> However in the "BAD" calls it looks like the BYE from caller get stuck on
> kamailio and is not sent/forwarded to callee side. I get BYE
> retransmissions from caller and all BYE requests got stuck on kamailio.
>
> After few seconds Callee side sends BYE and that BYE also get stuck.
>
> I am wondering how to trace this issue (differently than taking a
> wireshark trace) as i dont see any difference in the good BYE and the bad
> BYE.
>
> It looks like for any reason from time to time BYE is not forwarded to the
> other side and when the other side sents BYE its also not forwarded to call
> initiator.
>
> Please give me a clue how to continue on this.
>
> I am using dispatcher module to send the calls.
>
> Best regards
> Tom
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ broadcasting crashes kamailio

2020-04-24 Thread SamyGo
Hey,
Charles I'm so sorry, only after Daniel's reply I could read your reply and
later found your replies were marked spam ! probably didnt need to read all
your years old replies to other posts :)

Yeah that's how I understood it as well that I didn't need to handle it,
and when I first completed this code some 6months ago it used to look
pretty much like how you showed.
Here is exact route from config:

# DMQ  processing
route[DMQ_HANDLE] {
if(!(is_method("KDMQ") || $rm == "KDMQ"))
return;

if(is_method("KDMQ") || $rm == "KDMQ"){// I had v5.0.8
and read that sometimes is_method() isn't enough so just in case add extra
protection
if($rU =~ "userOnline"){
$avp(remoteUser) = $rb;
route(CHECK_WAITING_TRANSACTIONS);  //removing this
route doesn't help to resolve the crash
#sl_send_reply("200","OK")  //big NO NO,
never do this. Crash imminent
t_release();//IDK why, but
I got it from older mailing list snippet...removing it still doesn't help

exit;   // exit or not
crash is still here.
}
dmq_handle_message();
}
t_release();
exit;
}

Btw, I had a version where I broadcast using existing peer name like this:

dmq_bcast_message("peer_name", "$fu", "usrloc/online");  & handled the $cT
instead of $rU.

Is that a better way so I don't create a new peer/handler ?

So it had been working but randomly the cluster pair went into a restart
cycle and ever since then they just crash each other. As in, if A is dead I
start it up, it sends this custom KDMQ to B and B is dead.
Since past few days I've tried few different variations in the config
script and kamailio versions and all of them lead to pretty much same crash
unless I just stop sending the broadcast message to cluster.

@Daniel, I'm about to test your patches to see if that makes a difference.
Will get on this with results soon.

Thank you so much.
Best Regards,
Sammy



On Fri, Apr 24, 2020 at 3:24 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> I pushed two patches to prevent the crash, even the modules is not used as
> expected in the config.
>
> Charles: can you check and see if both makes sense? The one in
> worker_loop() function is to prevent the crash:
>
>   *
> https://github.com/kamailio/kamailio/commit/a675ab88fefac75145a7d563fee0431458630529
>
> This should be backported if all goes fine with it.
>
> The second one in empty_peer_callback() is to generated a 202-Accepted
> response, otherwise in such cases the sender will do retransmissions:
>
>   *
> https://github.com/kamailio/kamailio/commit/7f618c2d855ac268df905eb3d6e18733c8773047
>
> But maybe it was on purpose not to send a response (i.e., to allow sending
> the response from config), in such case it can be reverted.
>
> Cheers,
> Daniel
> On 24.04.20 20:57, Charles Chance wrote:
>
> Hi,
>
> Did you try the config snippet I provided?
>
> Basically dmq_handle_message() must be called if the message is not your
> own, otherwise the node discovery/health check will not work and you will
> see nodes disappearing as you described.
>
> Here it is again:
>
> if(is_method("KDMQ")){
>
> if($rU =~ "userOnline"){
> //user came online in cluster, resume transactions if-any
> suspended
> $avp(remoteUser) = $rb;
> } else {
> dmq_handle_message();
> }
> }
>
> Notice that we check for your own/custom message first, then call handle
> message if not matched.
>
> Let me know if it works.
>
> Cheers,
>
> Charles
>
>
> On Fri, 24 Apr 2020 at 19:52, SamyGo  wrote:
>
>> Yes,
>> I did read all(past 3+ years) his replies specific to DMQ and DMQ USRLOC
>> and only one matched exact description and there has no resolution to it.
>> Github open+closed issues for DMQ didn't have anything similar either.
>> Could it be something I'm doing wrong !?
>>
>> Additional info:  One of the server is direct on Public IP and Other one
>> is behind NAT. Another test setup where it consistently reproducible is two
>> server behind NAT(AWS)
>> Here are the mod params.  Only usrloc sync is done via DMQ and no other
>> module is using DMQ.
>>
>> listen=udp:LocalIP:5060 advertise PublicIP:5060
>>
>> modparam("dmq","server_address", DMQ_LOCAL_SERVER)
>> modparam("dmq", "notification_address", DMQ_REMOTE_SERVER)
>> modparam("dmq", "multi_notify", 0) //1 for DNS SRV

Re: [SR-Users] DMQ broadcasting crashes kamailio

2020-04-24 Thread SamyGo
Yes,
I did read all(past 3+ years) his replies specific to DMQ and DMQ USRLOC
and only one matched exact description and there has no resolution to it.
Github open+closed issues for DMQ didn't have anything similar either.
Could it be something I'm doing wrong !?

Additional info:  One of the server is direct on Public IP and Other one is
behind NAT. Another test setup where it consistently reproducible is two
server behind NAT(AWS)
Here are the mod params.  Only usrloc sync is done via DMQ and no other
module is using DMQ.

listen=udp:LocalIP:5060 advertise PublicIP:5060

modparam("dmq","server_address", DMQ_LOCAL_SERVER)
modparam("dmq", "notification_address", DMQ_REMOTE_SERVER)
modparam("dmq", "multi_notify", 0) //1 for DNS SRV
modparam("dmq", "num_workers", 10)
modparam("dmq", "ping_interval", 60)

modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "batch_size", 4000)
modparam("dmq_usrloc", "batch_usleep", 1000)
modparam("dmq_usrloc", "usrloc_domain", "location")

Where:  DMQ_REMOTE_SERVER  = sip:PublicIP2:5060

GDB info as requested:

Core was generated by `/usr/local/sbin/kamailio -w /tmp/kamailio -P
/var/run/kamailio/kamailio.pid -f'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7f248c4cef15 in send_reply (msg=0x7f2469f88d40, code=0,
reason=0x7ffd775e3ab8) at sl.c:276
276 if(reason->s[reason->len-1]=='\0') {
(gdb)
(gdb)
(gdb) frame 0
#0  0x7f248c4cef15 in send_reply (msg=0x7f2469f88d40, code=0,
reason=0x7ffd775e3ab8) at sl.c:276
276 if(reason->s[reason->len-1]=='\0') {
(gdb) p *reason
$1 = {s = 0x0, len = 0}
(gdb)
(gdb) frame 1
#1  0x7f24656c6549 in worker_loop (id=2) at worker.c:129
129 if(slb.freply(current_job->msg,
peer_response.resp_code,
(gdb) p *worker
$3 = {queue = 0x7f2469f240a8, jobs_processed = 5, lock = {val = 2}, pid =
935}
(gdb)
(gdb)
(gdb) p *current_job
$6 = {f = 0x7f24656d6d8d , msg = 0x7f2469f88d40,
orig_peer = 0x7f2469f6ed50, next = 0x0, prev = 0x0}
(gdb)


On Fri, Apr 24, 2020 at 1:30 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> have you tried the suggestion from Charles in the other response? It can
> help figuring out where the problem resides.
>
> Now, from C point of view, I would need the following output from gdb of
> the core file:
>
> frame 0
> p *reason
>
> frame 1
> p *worker
> p *current_job
>
> I would also need to know the modparams for dmq and other dmq_* module,
> plus the list if modules for which you enabled dmq (eg, htable, dialog,
> presence, ...).
>
> Cheers,
> Daniel
> On 24.04.20 18:10, SamyGo wrote:
>
> Oops,apologize, missed that:
>
> version: kamailio 5.3.3 (x86_64/linux) 44ccb9-dirty
> flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
> F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,
> USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,
> HAVE_RESOLV_RES
> ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024,
> BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> id: 44ccb9 -dirty
> compiled on 17:04:55 Apr 17 2020 with gcc 4.9.2
>
> Tried this with version 5.0, 5.2, and now 5.3 same situation..
>
> Thankyou for looking into this,
> Sammy
>
> On Fri, Apr 24, 2020 at 2:33 AM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> you have to provide the version of kamailio for each reported kamailio
>> issue, otherwise is hard to match with the source code. Use 'kamailio -v'
>> to get version details.
>>
>> Cheers,
>> Daniel
>> On 23.04.20 23:36, SamyGo wrote:
>>
>> Hi,
>>
>> Is there a way to broadcast KDMQ to the cluster but not expect a reply
>> back !?as far as I've read the source code dmq_bcast_message is exactly
>> like dmq_send_message in a way that it expects a callback to be executed on
>> response i.e expects a reply.
>>
>> So, the situation I'm facing is I'm broadcasting message to cluster and I
>> do not want a reply back. The following two options result in crash & core
>> dump.
>>
>> 1 - If my script doesn't respond back, by use of dmq_handle_message, it
>> marks the destined servers as "inactive" and stops usrloc sync process
>> which isn't desirable.
>> 2 - If I respond back with the dmq_handle_message it crashes the Kamailio
>> which just rece

Re: [SR-Users] DMQ broadcasting crashes kamailio

2020-04-24 Thread SamyGo
Oops,apologize, missed that:

version: kamailio 5.3.3 (x86_64/linux) 44ccb9-dirty
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC,
TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,
HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 44ccb9 -dirty
compiled on 17:04:55 Apr 17 2020 with gcc 4.9.2

Tried this with version 5.0, 5.2, and now 5.3 same situation..

Thankyou for looking into this,
Sammy

On Fri, Apr 24, 2020 at 2:33 AM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> you have to provide the version of kamailio for each reported kamailio
> issue, otherwise is hard to match with the source code. Use 'kamailio -v'
> to get version details.
>
> Cheers,
> Daniel
> On 23.04.20 23:36, SamyGo wrote:
>
> Hi,
>
> Is there a way to broadcast KDMQ to the cluster but not expect a reply
> back !?as far as I've read the source code dmq_bcast_message is exactly
> like dmq_send_message in a way that it expects a callback to be executed on
> response i.e expects a reply.
>
> So, the situation I'm facing is I'm broadcasting message to cluster and I
> do not want a reply back. The following two options result in crash & core
> dump.
>
> 1 - If my script doesn't respond back, by use of dmq_handle_message, it
> marks the destined servers as "inactive" and stops usrloc sync process
> which isn't desirable.
> 2 - If I respond back with the dmq_handle_message it crashes the Kamailio
> which just received this broadcasted message.
>
> Here is how its done in script:
>
> *broadcasting message to cluster:*
> dmq_bcast_message("userOnline", "$fu", "text/plain");
>
> *Receiving and handling a broadcast message:*
> route[DMQ_HANDLE] {
> if(!(is_method("KDMQ") || $rm == "KDMQ")) return;
>
> if(is_method("KDMQ") || $rm == "KDMQ"){
> if($rU =~ "userOnline"){
> //user came online in cluster, resume transactions
> if-any suspended
> $avp(remoteUser) = $rb;
> }
> dmq_handle_message();
> exit;
> }
> }
>
> *Related log lines:*
> Apr 23 21:15:48  kamailio[916]: ALERT: 

[SR-Users] DMQ broadcasting crashes kamailio

2020-04-23 Thread SamyGo
Hi,

Is there a way to broadcast KDMQ to the cluster but not expect a reply back
!?as far as I've read the source code dmq_bcast_message is exactly like
dmq_send_message in a way that it expects a callback to be executed on
response i.e expects a reply.

So, the situation I'm facing is I'm broadcasting message to cluster and I
do not want a reply back. The following two options result in crash & core
dump.

1 - If my script doesn't respond back, by use of dmq_handle_message, it
marks the destined servers as "inactive" and stops usrloc sync process
which isn't desirable.
2 - If I respond back with the dmq_handle_message it crashes the Kamailio
which just received this broadcasted message.

Here is how its done in script:

*broadcasting message to cluster:*
dmq_bcast_message("userOnline", "$fu", "text/plain");

*Receiving and handling a broadcast message:*
route[DMQ_HANDLE] {
if(!(is_method("KDMQ") || $rm == "KDMQ")) return;

if(is_method("KDMQ") || $rm == "KDMQ"){
if($rU =~ "userOnline"){
//user came online in cluster, resume transactions
if-any suspended
$avp(remoteUser) = $rb;
}
dmq_handle_message();
exit;
}
}

*Related log lines:*
Apr 23 21:15:48  kamailio[916]: ALERT: 

[SR-Users] Dialog: dlg_var and multi-branch call

2020-03-31 Thread SamyGo
Hi All,

Just curious to ask as how to save $dlg_var for a multi-leg/branched call.
When I call a subscriber with multiple Contacts, and one branch answer
while rest are CANCEL'd from that point onward I've seen that the dialog
and its variables disappear from Kamailio memory and DB.Is this how its
intended to be ?

Here are the relevant debug line:

DEBUG: dialog [dlg_hash.c:1266]: next_state_dlg(): dialog 0x7f7c1461e2e8
changed from state 2 to state 5, due event 4 (ref 2)
DEBUG: dialog [dlg_handlers.c:574]: dlg_onreply(): dialog 0x7f7c1461e2e8
failed (negative reply)
DEBUG: dialog [dlg_cb.c:271]: run_dlg_callbacks(): dialog=0x7f7c1461e2e8,
type=4
DEBUG: dialog [dlg_handlers.c:1050]: dlg_set_tm_waitack(): registering TMCB
to wait for negative ACK

Best Regard,
Sammy
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] R: Kamailio connection issue

2020-03-04 Thread SamyGo
Hi,
In my experience I've seen this happen on an System that was getting bogged
down by low performing API connecting to Database. I'd suggest examine all
the external components that may be adding delay to the Kamailio TLS/TCP
process waiting for a response. i.e user REGISTRATION depending on DB reply
and the DB is just too busy to respond in time.

Check the Load-Average of all the systems/servers involved. Also keep in
mind that beyond a particular (udp/tcp)children threshold, depending on
your server specs, the CPU may get overloaded just to distribute its
compute cycles across all processes. The more children you create the more
load it creates for the CPU.

Best Regards,
Sammy


On Wed, Mar 4, 2020 at 11:29 AM Tomas Zanet  wrote:

> As you suggested I increased the debug level from -1 to 3 and I got this
> Kamailio log:
>
> Mar  4 15:40:21 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [io_wait.h:602]: io_watch_del(): DBG: io_watch_del (0xa20dc0, 3433,
> -1, 0x0) fd_no=2922 called
>
> Mar  4 15:40:21 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:4139]: handle_tcpconn_ev(): sending to child, events 1
>
> *Mar  4 15:40:21 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (30)*
>
> Mar  4 15:40:21 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3821]: send2child(): selected tcp worker 8 36(29409) for
> activity on [tls:X.X.X.X:5061], 0x7f482c2c2bc0
>
> Mar  4 15:40:21 server-xip-01 /usr/local/sbin/kamailio[29409]: DEBUG:
>  [tcp_read.c:1576]: handle_io(): received n=8 con=0x7f482c2c2bc0,
> fd=13
>
> Mar  4 15:40:21 server-xip-01 /usr/local/sbin/kamailio[29409]: DEBUG: tls
> [tls_server.c:197]: tls_complete_init(): completing tls connection
> initialization
>
> Mar  4 15:40:21 server-xip-01 /usr/local/sbin/kamailio[29409]: DEBUG: tls
> [tls_server.c:226]: tls_complete_init(): Using initial TLS domain
> TLSs (dom 0x7f481b22ba50 ctx 0x7f481b6fbf20 sn [])
>
> Mar  4 15:40:21 server-xip-01 /usr/local/sbin/kamailio[29409]: DEBUG: tls
> [tls_domain.c:715]: sr_ssl_ctx_info_callback(): SSL handshake started
>
>
>
> Looking for this warning into the log, I realized that there are a lot of
> these messages:
>
>
>
> sudo tail -f /var/log/kamailio.log | grep "no free tcp receiver"
>
> Mar  4 15:40:23 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (20)
>
> Mar  4 15:40:23 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (20)
>
> Mar  4 15:40:23 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (21)
>
> Mar  4 15:40:23 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (20)
>
> Mar  4 15:40:23 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (21)
>
> Mar  4 15:40:24 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (14)
>
> Mar  4 15:40:24 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (15)
>
> Mar  4 15:40:24 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (16)
>
> Mar  4 15:40:24 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (16)
>
> Mar  4 15:40:24 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (16)
>
> Mar  4 15:40:24 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (17)
>
> Mar  4 15:40:24 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (17)
>
> Mar  4 15:40:24 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least busy one (17)
>
> Mar  4 15:40:24 server-xip-01 /usr/local/sbin/kamailio[29417]: DEBUG:
>  [tcp_main.c:3816]: send2child(): WARNING: no free tcp receiver,
> connection passed to the least 

[SR-Users] Possible bug in Presence module !?

2020-01-18 Thread SamyGo
Hi,
I'm experiencing a strange behavior with the Kamailio presence module. I've
a Polycom phone which takes the the XML tag "version" very seriously and so
as soon it SUBSCRIBEs to a parking lot a NOTIFY is sent from server with
"version=1" - When the Parking lot/extension gets busy it receives the
second NOTIFY with "version=1" whereas it should've been 2. So it fails to
light up the BLF icons.

Now, any further notify correctly increments the version tag and Polycom
blf works fine until its SUBSCRIBE expires and the first cycle of NOTIFY is
exchanged.

I can tell its a bug because for each NOTIFY the
*event_route[tm:local-request]* prints the attribute $subs(version) and it
correctly shows the sequence 1,2,3...onwards, However the sngrep/network
trace tells it differently, the version shows up as 1,1,2,3...onwards

*version:* kamailio 5.2.3 (x86_64/linux) c36229
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: c36229
compiled on 22:20:40 Jan 18 2020 with gcc 4.9.2



*MODULES:*#!ifdef WITH_PRESENCE
loadmodule "presence.so"
loadmodule "presence_mwi.so"
loadmodule "presence_xml.so"
loadmodule "presence_dialoginfo.so"
loadmodule "presence_reginfo.so"
loadmodule "pua.so"
loadmodule "pua_rpc.so"
loadmodule "pua_dialoginfo.so"
modparam("pua", "db_url", DBURL)
modparam("pua", "db_mode", 2)
modparam("pua", "update_period", 60)
modparam("pua", "dlginfo_increase_version", 0)
modparam("pua", "reginfo_increase_version", 0)
modparam("pua", "check_remote_contact", 1)
modparam("pua", "fetch_rows", 1000)
modparam("pua", "outbound_proxy", "sip:MY_HOST_IP:MY_HOST_PORT")

modparam("pua_dialoginfo", "include_callid", 1)
modparam("pua_dialoginfo", "send_publish_flag", FLT_DLGINFO)
modparam("pua_dialoginfo", "caller_confirmed", 1)
modparam("pua_dialoginfo", "include_tags", 1)
modparam("pua_dialoginfo", "override_lifetime", 124)

modparam("presence", "presentity_table", "presentity")
modparam("presence", "active_watchers_table", "active_watchers")
modparam("presence", "watchers_table", "watchers")
modparam("presence", "db_update_period", 60)
modparam("presence", "db_table_lock_type", 0)
modparam("presence", "local_log_level", 3)
modparam("presence", "notifier_processes", 10)
modparam("presence", "force_delete", 0)
modparam("presence", "subs_db_mode", 2)
modparam("presence", "db_table_lock_type", 0)
modparam("presence", "expires_offset", 60)
modparam("presence", "send_fast_notify", 1)
modparam("presence", "clean_period", 30)
modparam("presence", "publ_cache", 0)
modparam("presence", "min_expires_action", PRESENCE_MIN_EXPIRES_ACTION)
modparam("presence", "min_expires", PRESENCE_MIN_EXPIRES)
modparam("presence", "max_expires", PRESENCE_MAX_EXPIRES)
modparam("presence", "sip_uri_match", 1)
modparam("presence", "waitn_time", 1)
modparam("presence", "db_url", DBURL)
modparam("presence", "server_address", "sip:MY_HOST_IP:MY_HOST_PORT")

modparam("presence_xml", "force_dummy_presence", 1)
modparam("presence_xml", "force_active", 1)
modparam("presence_xml", "db_url", DBURL)

modparam("presence_dialoginfo", "force_single_dialog", 1)
modparam("presence_dialoginfo", "force_dummy_dialog", 1)
#!endif


Looking to find some answers,
Thanks,
Sammy
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] WebRTC ACK Protocol [solved]

2020-01-07 Thread SamyGo
Hi,
Just a suggestion to put the contact alias function under the
"is_first_hop()" condition. That'll help you in case multiple Kamailios are
in the call path.

if(is_first_hop()){
   add_contact_alias();
}

Regards,
Sammy


On Thu, Apr 4, 2019 at 6:07 AM Ilie Soltanici  wrote:

> Adding Contact alias in 200 OK, fixed the issue:
>
> if (nat_uac_test(64)) {
> add_contact_alias();
> }
>
> Thank You.
>
> În mie., 3 apr. 2019 la 23:58, Ilie Soltanici  a
> scris:
>
>> Hello,
>>
>> Config is more or less like the standard one:
>>
>> route[WITHINDLG] {
>>   if (!has_totag()) return;
>> if (loose_route()) {
>> route(RURIALIAS);
>> if ( is_method("ACK") ) {
>>   xlogl("L_INFO", "[$cfg(route)] ACK is forwarded statelessy\n");
>>   route(NATMANAGE);
>> } else if (is_method("NOTIFY") ) {
>> # Add Record-Route for in-dialog NOTIFY as per RFC 6665.
>> route(RECORD_ROUTE);
>> }
>> xlogl("L_INFO", "[$cfg(route)] In Dialog loose_route, Relaying\n");
>> route(RELAY);
>>   exit;
>> };
>>
>> if (is_method("SUBSCRIBE") && uri == myself) {
>>   xlogl("L_INFO", "[$cfg(route)] in-dialog subscribe requests,
>> Checking Dialog.\n");
>>   route(PRESENCE);
>>   exit;
>> }
>>
>> if ( is_method("ACK") ) {
>>   if ( t_check_trans() ) {
>> xlogl("L_INFO", "[$cfg(route)] ACK in transaction. Relaying\n");
>> route(RELAY);
>> exit;
>> } else {
>>   xlogl("L_WARN", "[$cfg(route)] ACK without matching transaction
>> ... ignore and discard\n");
>>   sl_send_reply("606", "Not Acceptable");
>>   exit;
>> }
>>   }
>>
>>   xlogl("L_WARN", "[$cfg(route)] Unknown Dialog\n");
>>   sl_send_reply("404","Not Found");
>>   exit;
>> }
>>
>> route[RURIALIAS] {
>> if(isdsturiset() || ($du != "")) {
>> xlogl("L_INFO", "[$cfg(route)]: Destination URI is set, no
>> un-aliasing is needed\n");
>> return;
>> }
>>
>> xlogl("L_INFO", "[$cfg(route)] --Start Route--\n");
>> xlogl("L_INFO", "[$cfg(route)]: Route using R-URI, any alias on R-URI
>> ('$ru')?\n");
>>
>> handle_ruri_alias();
>> switch ($rc) {
>> case -1:
>> xlogl("L_WARN", "[$cfg(route)]: Failed to handle alias of R-URI
>> $ru\n");
>> send_reply("400","Bad Request");
>> exit;
>> case 1:
>> xlogl("L_INFO", "[$cfg(route)]: Alias parsed, routing $rm from
>> $fu to $du\n");
>> break;
>> case 2:
>> xlogl("L_INFO", "[$cfg(route)]: Alias not found, routing $rm from
>> $fu to $ru\n");
>> break;
>> };
>>
>> return;
>> }
>>
>> route[NATMANAGE] {
>> if(has_body("application/sdp")) {
>>   route(RTPMANAGE);
>> }
>>
>> # Set FLB_NATB? Only in within-dialog request with nat=yes on Route
>> header initiated by AS
>> if (is_request() && has_totag() && check_route_param("nat=yes") &&
>> isflagset(FLS_FROM_ASTERISK)) {
>>setbflag(FLB_NATB);
>> }
>>
>> # Return unless FLT_NATS or FLB_NATB are set
>> if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) {
>> xlogl("L_INFO", "[$cfg(route)] No endpoint is behind NAT,
>> return\n");
>> if(nat_uac_test("1")) {
>>   xlogl("L_INFO", "[$cfg(route)] Contact is behind NAT,
>> Fixing\n");
>>   fix_nated_contact();
>> }
>> return;
>> } else {
>> xlogl("L_INFO", "[$cfg(route)] One or both endpoints are behind
>> NAT, continue!\n");
>> }
>>
>> # Add nat=yes in record-route? Only in initial requests when called
>> from branch_route
>> if (is_request() && !has_totag() && t_is_branch_route()) {
>> xlogl("L_INFO", "[$cfg(route)] Add nat=yes to record-route
>> (reason: initial request called from branch route)\n");
>> add_rr_param(";nat=yes");
>> }
>>
>>   if (is_reply()) {
>>   if(isbflagset(FLB_NATB)) {
>>   fix_nated_contact();
>>   }
>> }
>> }
>>
>> route[RELAY] {
>> route(SETUP_BY_TRANSPORT);
>>
>> if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
>> if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
>> }
>> if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
>> if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
>> }
>> if (is_method("INVITE")) {
>> if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
>> }
>>
>> if (!t_relay()) {
>> sl_reply_error();
>> }
>> exit;
>> }
>>
>> }
>>
>> route[SETUP_BY_TRANSPORT] {
>>
>>  if ($ru =~ "transport=ws") {
>>   xlogl("L_INFO","[$cfg(route)] Request going to WS");
>> if(sdp_with_transport("RTP/SAVPF")) {
>>   xlogl("L_INFO","[$cfg(route)] Request going from WS to WS");
>>   rtpengine_manage("force trust-address replace-origin
>> replace-session-connection ICE=force");
>>   t_on_reply("REPLY_WS_TO_WS");
>>   return;
>> }
>>   xlogl("L_INFO","[$cfg(route)] Request going to WS from AS");
>> rtpengine_manage("rtcp-mux-offer generate-mid DTLS=passive SDES-off
>> ICE=force RTP/SAVPF");
>>   

Re: [SR-Users] Kamailio Lord Balance

2019-05-29 Thread SamyGo
May Lord balance your packets. Amen

On Wed., May 29, 2019, 1:43 p.m. Charles Sharp, 
wrote:

> ...and also with you. Let us pray to Alice and Bob.
> On 5/29/19 12:11 PM, Sergiu Pojoga wrote:
>
> Lord is upon you, lol
>
> On Wed, May 29, 2019, 11:52 AM Gaurav Bmotra, 
> wrote:
>
>> hi
>> i m using kamailio 5.1 with Ubuntu 18.04.2 LTS
>> and freeswitch as Media server
>>
>>
>> --
>>
>>
>>
>>
>>
>>
>>
>>
>> *Regards:*
>> Gaurav Kumar
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] drop before exit and send ok reply first can be done?

2019-03-31 Thread SamyGo
Hi,
Can you please elaborate about the part where you said "drop rest of the
packets".

If an OPTIONs is incoming you can send reply and then exit; a drop is like
silently discarding a packet as far as I know.

Do you meant to discard any further packets in same dialog or transaction
to be matched and discarded/dropped ?

Regards,
Sammy

On Sun, Mar 31, 2019, 5:54 AM PICCORO McKAY Lenz, 
wrote:

> h have this for a custom rule agains spoecific messages:
>
> sl_send_reply("200", "OK");
>drop();
> exit;
>
> my question are if that rules are correct:
>
> i want to drop but send firts to client a ok response..
> i mean client receive "all are ok dont worry" and then drop the rest
> packets..
>
> that's correct?
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Can't get route[AUTH] working as expected.

2018-03-24 Thread SamyGo
Yeah, so thats a sample script and definitely needs add-on functions to
enable what you're expecting it to do.
I believe in the past(*or maybe in opensips, Im not certain) it used to
have the function db_check_from() / check_from()  to validate user in DB if
so then engage in AUTH. Check URI_DB module.
You can also use this function is_subscriber("$fU","subscriber",3)
<http://www.kamailio.org/docs/modules/5.0.x/modules/auth_db.html#idp44935044>
to
ensure authentication is engaged for everyone.



On Fri, Mar 23, 2018 at 3:54 PM, Aqs Younas <aqsyou...@gmail.com> wrote:

> Thanks Samy for replying.
>
> I wanted if Caller IP was not allowed it should be asked for digest
> authentication. But above default AUTH route only do that if from_uri is
> local. If someone set a different URI in from header he will be able to
> bypass the security check. Correct me if I am wrong somewhere.
>
> I know I can modify the route to get the expected request.
>
> But just wanted to ask if setting #!define WITH_AUTH and #!define
> WITH_IPAUTH was not enough in default configuration just to make sure
> caller is legitimate.
>
> Br. Aqs.
>
> On 23 March 2018 at 23:54, SamyGo <govoi...@gmail.com> wrote:
>
>> Hi Aqs,
>> What seems to be the problem ! do you want this caller to be IP
>> Authenticated or Digest Authenticated or denied !?
>>
>>
>> On Fri, Mar 23, 2018 at 6:16 AM, Aqs Younas <aqsyou...@gmail.com> wrote:
>>
>>> 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:012877@139.5.177.99>;tag=as2274e806
>>> To: <sip:60129879190@172.16.40.10>
>>> Contact: <sip:012877@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.
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Can't get route[AUTH] working as expected.

2018-03-23 Thread SamyGo
Hi Aqs,
What seems to be the problem ! do you want this caller to be IP
Authenticated or Digest Authenticated or denied !?


On Fri, Mar 23, 2018 at 6:16 AM, Aqs Younas  wrote:

> 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: ;tag=as2274e806
> To: 
> Contact: 
> 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.
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio iOS Push Notifications

2018-03-04 Thread SamyGo
Hi,
It doesn't care whether its GCM or APNS, all it really does is provides
mechanism to let the writer asynchronously "park"/"sleep"/"suspend"
(whatever you call it) the call and resume/continue based on some condition
etc.
There is a Presentation from couple years back on this which details
everything required for APNS google it and reuse the routes mentioned in
it.
https://www.voztovoice.org/sites/default/files/KamilioWorld2015%20-Federico.Cabiddu-TSILO.pdf

Regards,
Sammy




On Sun, Mar 4, 2018 at 9:40 AM, Amar Tinawi  wrote:

> Did it work on Android ?
>
> On Mar 1, 2018 1:21 PM, "Amine Mensori"  wrote:
>
>> Hello,
>>
>> We need help implementing push notifications within Kamailio. I have
>> found a module relating to this: https://github.com/tvntsr/push
>> However, the developer did not provide any examples of the cfg file, only
>> parts of certain functions. We need some help implementing the functions in
>> our config file or a full example of another method to get push
>> notifications to work when the application is closed on the device. Please
>> note we are not very proficient in C programming so a clear example would
>> help a lot.
>>
>> Many Thanks,
>> Amine
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Distributed Presence between Multiple Kamailios

2018-02-01 Thread SamyGo
That is fantastic news, let me have it tested out and share feedback.

Thanks again for the directions.

Regards,
Sammy

On Thu, Feb 1, 2018 at 5:00 AM, Charles Chance <
charles.cha...@sipcentric.com> wrote:

> Also, you'll need to update the presentity DB table to include the
> new ruid column: https://www.kamailio.org/wiki/install/upgrade/
> stable-to-devel
>
> Cheers,
>
> Charles
>
>
> On 1 February 2018 at 07:47, Charles Chance <charles.cha...@sipcentric.com
> > wrote:
>
>> Hello,
>>
>> Presence module has a new integration with DMQ in master branch which
>> does exactly what you’re looking for. It’s enabled by setting modparam
>> “enable_dmq” and the rest takes care of itself:
>>
>> https://github.com/kamailio/kamailio/commit/3fc1da644a6b375f
>> c45ea17cbcf81643f70db545
>>
>> You’ll need to load the dmq module first and add the dmq_handle block to
>> the start of your default route (see docs for more info).
>>
>> Cheers,
>>
>> Charles
>>
>>
>> On Thu, 1 Feb 2018 at 02:27, SamyGo <govoi...@gmail.com> wrote:
>>
>>> Hi,
>>> I'm working on multiple Kamailios that have users distributed evenly
>>> among them, I now need to enable presence in those Kamailio boxes. The
>>> scenario is a mesh where any user may have subscribed to BLF of other user
>>> registered & calling on any other proxy.
>>>
>>> What modules can help me achieve this? can this be done without creating
>>> a new Presence-Node for the whole environment?
>>>
>>> Hope to get some suggestions on how experts here have done this.
>>>
>>> Looking forward to positive response.
>>>
>>> Regards,
>>> Sammy
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> --
>>
>>
> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
> Birmingham Science Park, Birmingham B7 4BB.
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Distributed Presence between Multiple Kamailios

2018-01-31 Thread SamyGo
Hi,
I'm working on multiple Kamailios that have users distributed evenly among
them, I now need to enable presence in those Kamailio boxes. The scenario
is a mesh where any user may have subscribed to BLF of other user
registered & calling on any other proxy.

What modules can help me achieve this? can this be done without creating a
new Presence-Node for the whole environment?

Hope to get some suggestions on how experts here have done this.

Looking forward to positive response.

Regards,
Sammy
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio with asterisk on private lan

2018-01-26 Thread SamyGo
Thanks Tomi,

Hope that helps OP as well. Regarding your question: "*when one should use
rtpengine over rtpproxy ?*" I believe its a matter of choice when it comes
to simpler RTP relaying, but once I started working with WebRTC clients
trying to reach Asterisks or FreeSWITCH behind the Kamailio node RTPEngine
played well since it has the capability. I'd recommend comparing the
functions of both on their respective github pages. Mediaproxy on the other
hand doesn't support this Inter-AF bridging at all.

In one particular deployment just like the one discussed over here I tried
RTPengine and it worked but client reported distortion and breaks in voice.
I tried few things but then reverted to rtpproxy and everything went
normal. I switched between the two few times to observe the same
issue.  I'm sure I didn't tweak RTPengine, iptables, and OS properly for
RTPengine in that case but, just for sake of comparison, replacing with
rtpproxy brought things to expected behavior. Similarly a different
deployment using RTPengine with WebRTC clients connecting with Asterisks
worked 100% perfectly w/o a hiccup.

Regards,
Sammy




On Fri, Jan 26, 2018 at 12:50 PM, Tomi Hakkarainen 
wrote:

> Hi,
>
> I have similar setup working.
> I followed these guides :
> https://saevolgo.blogspot.fi/2013/08/rtpproxy-revisited-kamailio-40.html
>
> Maybe you can find those also useful, and if you need more help just let
> us know…
>
> I also wonder when one should use rtpengine over rtpproxy ?
>
> BR,
> Tomi
>
> On 26 Jan 2018, at 12.47, Daniel-Constantin Mierla 
> wrote:
>
> To clarify and avoid misleading, rtpproxy should be able to do the same as
> rtpengine for this case
> Both modules allow to set the public IP address, by providing it as the
> second parameter to rtp relay manage function. Also, the applications
> themselves have parameters to specify the address to advertise.
>
> Cheers,
> Daniel
>
> On 25.01.18 11:00, Mark Boyce wrote:
>
> Morning Arsen
>
> Thanks I’ll take a look at that.  Was using RTPProxy just through force of
> habit :-)
>
> Mark
>
> On 25 Jan 2018, at 09:53, Arsen  wrote:
>
> Hi Mark,
>
> You can solve this by using rtpengine module, it can rewrite SDP offer /
> answer and replace media addresses with correct IPs.
>
>  https://kamailio.org/docs/modules/5.0.x/modules/
> rtpengine.html#rtpengine.f.rtpengine_offer
>
>
>
>
> Arsen Semionov
> www.eurolan.info
> cell: +442035198881 <+44%2020%203519%208881>
>
> On Thu, Jan 25, 2018 at 11:40 AM, Mark Boyce  wrote:
>
>> Hi all
>>
>> I’m trying to create a relatively simple setup with Kamailio dual homed
>> on public/private ip and asterisk on private ip only.  The idea is load
>> balance / fail over asterisk boxes.
>>
>> Following the real-time tutorial I have clients registering with
>> Kamailio, Kamailio registering on clients behalf with asterisk as well as
>> invites going through.
>>
>> However what I’m seeing is that when an invite occurs asterisk offers
>> media on its private ip, as it would. However this is making its way
>> through Kamailio all the way to the client.
>>
>> After a bit of searching all I can find is people trying to get it
>> working and failing, or putting asterisk on public IP.
>>
>> So questions - am I doing this completely the wrong way? Should Kamailio
>> alter the media ip of asterisk on the way through or do I need to do that
>> by hand?  Surely someone somewhere has a write up on this already :-)
>>
>> Thanks
>> Mark
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> Mark
> --
> Mark Boyce
> Dark Origins Ltd
> e: m...@darkorigins.com
> t: 0845 0043 043
> f: 0845 0043 044
>
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Transcoding

2018-01-26 Thread SamyGo
Hi Steve,
In the past I've used WebRTC2SIP gateway project from doubango :
https://www.doubango.org/webrtc2sip/
I was able to do transcoding for video calls as well. As far as I recall it
was CPU intensive and may require some WebRTC(HTTP/HTTPS) loadbalancing to
be able to handle an satisfactory amount of calls.
In my scenario I had to transcode VP8/VP9<==>H264 streams.

I hope we get better( & efficient) video-transcoding projects soon.

Regards,
Sammy


On Fri, Jan 26, 2018 at 10:48 AM, Alex Balashov 
wrote:

> Richard,
>
> That's very exciting news!
>
> On January 26, 2018 10:44:51 AM EST, Richard Fuchs 
> wrote:
> >On 2018-01-26 08:57 AM, Wilkins, Steve wrote:
> >>
> >> Hello All,
> >>
> >> I am currently using Kamailio and Asterisk on Centos 7 servers and
> >> trying to enable WebRTC jsSIP clients to be able to do Audio/Video
> >> calls with Provider Phones (Purple, Z, Sorenson, etc.…), however, the
> >
> >> providers do not have vp8 codecs (which is what the WebRTC clients
> >use
> >> for Audio) so I believe I will need a media proxy server to resolve
> >> the video issues.  My question is, can rtpproxy or rtpengine perform
> >> this transcoding? If so, and if rtpengine is the way to go, should I
> >> use Ubuntu for the rtpengine since it is the only one that seems to
> >> have a working installation?
> >>
> >
> >Work on transcoding support for rtpengine is currently underway.
> >However, the initial focus will be on audio codecs only. Video support
> >might be added in the future.
> >
> >Cheers
>
>
> -- Alex
>
> --
> Sent via mobile, please forgive typos and brevity.
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Allow Methods and Allow events SIP Headers are missing on SIP Registrtaion

2018-01-23 Thread SamyGo
Hi,
Can you share your modules loaded and their params section from your
kamailio.cfg !
Also, can you explain why the headers are important for you in 401 and 200
OK ? What is the exact issue caused by this i.e Presence not working OR
UPDATE causing call hangup etc ?

Regards,
Sammy



On Tue, Jan 23, 2018 at 3:34 AM, Suresh Talasaniya <
suresh.talasan...@gmail.com> wrote:

> Hi All,
>
> I am facing issue while SIP REGISTER. Allow methods and Allow Event SIP
> Headers are the mission of 401  Unauthorized and 200 OK on Successful SIP
> Registered.
>
> Please find the attached document in which I mention both working and
> nonworking SIP Message.
>
>
> It would be appreciable if anyone help figures out this issue on Kamailio
> server.
>
>
> Thank you.
>
>
> --
> Regards,
> Suresh Talasaniya.
> Contact : +91-9724264776 <+91%2097242%2064776>
> Skype : suresh.talsaniya
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to change R-URI Username

2017-12-14 Thread SamyGo
Hi,
I think you can modify $rU anytime in the configuration , that error is
possibly from uac_replace_to() (or uac_replcae_from()) function after the
record_route().  Try commenting them out and see if the error goes away.

Regards,
Sammy


On Thu, Dec 14, 2017 at 1:09 PM, Duarte Rocha 
wrote:

> Hey everyone.
>
> I'm doing some Calling Number and Called Number normalization at the
> beggining and end of the Kamailio. At the end, i'm doing it in the Dispatch
> Route.
>
> In order to change the numbers, i use uac_replace_to() and
> uac_replace_from(). However, i don't have a function like this for the
> R-URI username. I'm trying to change the $rU variable, but i can't apply
> changes since i get this error from msg_apply_changes() :  "cannot apply
> msg changes after adding record-route header - it breaks conditional 2nd
> header"
>
> Is there any other way to do this operation?
>
> Thanks in advance.
>
> Cheers
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] can kamailio send 183 to caller

2017-12-10 Thread SamyGo
Hi,
I'm not sure if I understood correctly, however, it seems like if UserB is
dialed then send call to FreeSWITCH in parallel to doing an
http_async_query ; once the http query returns a response then send call to
that response.

If I'm correct then you need to make use of branch_route.

route{
...

append_branch("sip:prompt-tone@freeswitch");
t_on_branch("api_query");
route(RELAY);
}

Then create the branch route "api_query" and in there execute your HTTP
async query.
branch_route[api_query]{
 if($rU != "freeswitch")
 route(http_aysnc_things);
}

route[http_async_things]{
   Code example from here:
https://www.kamailio.org/docs/modules/5.1.x/modules/http_async_client.html#http_async_client.f.http_async_query
}

route[HTTP_REPLY] {
if ($http_ok) {
xlog("L_INFO", "route[HTTP_REPLY]: status $http_rs body:
$http_rb\n");
# Assuming the HTTP server replies with a SIP URI
$ru = $http_rb;
route(RELAY);
} else {
xlog("L_INFO", "route[HTTP_REPLY]: error  $http_err)\n");
}
}

Thats just my idea , the code might have syntax issues so correct
accordingly. If above works then it should do both ringing and the API
query in parallel. As I see it you're trying to append_branch and then
doing a t_newtran->HTTP ASYNC query, causing the whole blockage and that
explains if you remove the last 4 line it works.

Regards,
Sammy




On Fri, Dec 1, 2017 at 3:14 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

> Hello,
>   I forgot to add route(RELAY) after the append_branch(). This brings
> another problem. Say the original INVITE is from A to B, what I want is:
>   1. fork 1 more INVITE to freeswitch
>   2. discard the original A to B INVITE and wait for the
> http_async_query returns. When returns, the final destiation is determined,
> say C. Then send the INVITE to C.
>
>  However, after append_branch(), then original INVITE is sent to B
> anyway. How do I block the A to B INVITE?
>
> Thanks
>
> At 2017-12-01 15:13:10, "赵国杰" <zhaoguojie2...@163.com> wrote:
>
> Hello Sammy,
>  Yes, I want the kamailio to play ring-back music immediately after it
> receive the INVITE.  My plan is to append a branch to freeswitch and let
> freeswitch to play the music. The problem is append_branch() does not work
> in the following context:
>
> if(is_method("INVITE")) {
> append_branch("sip:prompt-tone@freeswitch");
> xlog("append branch");
> t_newtran();
> $http_req(hdr) = "Content-Type: application/json";
> $http_req(body) = $_s({"cmuid": "$var(cmuid)"});
> http_async_query("http://127.0.0.1:8080;, "HTTP_REPLY");
> }
>
> if I remove the last 4 lines everything works fine. Otherwise, no forked
> INVITE will be sent to freeswitch. Unfortunately, I need the
> http_async_query to find the proper callee. Any suggestions?
>
> Thanks
>
> At 2017-11-30 23:49:59, "SamyGo" <govoi...@gmail.com> wrote:
>
> Hi,
> While Brandon is right, you can do absolutely do that but w/o any SDP or
> progress media in there. I'd ask why you want to do that! If you want to
> feed some ring-back music I'd advise you to append a branch to a
> media-server like asterisk and then let that do it for you.
>
> So here's one way of doing that.
>
> if(is_method("INVITE")){
>  append_branch("sip:183@192.168.1.5:5060");
> ...
> }
>
> where IP is of asterisk and dialplan is configured to provider Progress()
> with media.
>
> Again, it depends on why you want it?
>
> Regards,
> Sammy
>
> On Wed, Nov 29, 2017 at 11:13 PM, Brandon Armstead <bran...@cryy.com>
> wrote:
>
>> if(is_method(“INVITE”)){ .
>>
>> sl_send_reply(“183”, “Ringing”); 
>>
>> }
>>
>> On Wed, Nov 29, 2017 at 6:44 PM 赵国杰 <zhaoguojie2...@163.com> wrote:
>>
>>> Hello guys,
>>>  Is it possible for kamailio to initiate a 183 to caller?
>>>
>>> Thanks
>>>
>>>
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> --
>> Sent from Gmail Mobile
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
>
>
>
>
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] can kamailio send 183 to caller

2017-11-30 Thread SamyGo
Hi,
While Brandon is right, you can do absolutely do that but w/o any SDP or
progress media in there. I'd ask why you want to do that! If you want to
feed some ring-back music I'd advise you to append a branch to a
media-server like asterisk and then let that do it for you.

So here's one way of doing that.

if(is_method("INVITE")){
 append_branch("sip:183@192.168.1.5:5060");
...
}

where IP is of asterisk and dialplan is configured to provider Progress()
with media.

Again, it depends on why you want it?

Regards,
Sammy

On Wed, Nov 29, 2017 at 11:13 PM, Brandon Armstead  wrote:

> if(is_method(“INVITE”)){ .
>
> sl_send_reply(“183”, “Ringing”); 
>
> }
>
> On Wed, Nov 29, 2017 at 6:44 PM 赵国杰  wrote:
>
>> Hello guys,
>>  Is it possible for kamailio to initiate a 183 to caller?
>>
>> Thanks
>>
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> --
> Sent from Gmail Mobile
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] OpenSIPS-devel not starting (TCP Error)

2017-11-29 Thread SamyGo
Opps ! wrong window :)


On Wed, Nov 29, 2017 at 2:17 AM, Sebastian Damm <d...@sipgate.de> wrote:

> Hi,
>
> I think you ended up on the wrong mailing list. This list is for
> Kamailio, not OpenSIPS. You might want to ask your question again
> somewhere here:
> https://www.opensips.org/Support/MailingLists
>
> Regards,
> Sebastian
>
> On Tue, Nov 28, 2017 at 8:33 PM, SamyGo <govoi...@gmail.com> wrote:
> > P.S:
> > Unchecking the EXTRA_DEBUG and DBG_TCPCON flags at compile time makes
> > OpenSIPS work normally.
> >
> > On Tue, Nov 28, 2017 at 2:10 PM, SamyGo <govoi...@gmail.com> wrote:
> >>
> >> Hi,
> >> I just installed the head version from git.
> >>
> >> version: opensips 2.4.0-dev (x86_64/linux)
> >> flags: STATS: On, SHM_EXTRA_STATS, EXTRA_DEBUG, DISABLE_NAGLE,
> USE_MCAST,
> >> SHM_MMAP, PKG_MALLOC, QM_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> >> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> >> MAX_URI_SIZE 1024, BUF_SIZE 65535
> >> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> >> git revision: d1a4419
> >> main.c compiled on 19:53:20 Nov 28 2017 with gcc 4.8
> >>
> >> It was compiled with EXTRA_DEBUG and DBG_TCPCON flags;
> >> While starting opensips with the residential vanilla script it gives
> >> following error:
> >>
> >> Nov 28 20:05:52 [30899] ERROR:core:tcp_init: oom con hist
> >> Nov 28 20:05:52 [30899] CRITICAL:core:main: could not initialize tcp
> >> Nov 28 20:05:52 [30899] INFO:core:cleanup: cleanup
> >> Nov 28 20:05:52 [30899] DBG:core:shm_mem_destroy: destroying the shared
> >> memory lock
> >> Nov 28 20:05:52 [30899] NOTICE:core:main: Exiting
> >>  already running
> >>
> >> Even if I remove the proto_tcp, and tcp related things this still gives
> >> error and doesn't start.
> >>
> >> Kindly help.
> >>
> >> Regards,
> >> Sammy
> >
> >
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] OpenSIPS-devel not starting (TCP Error)

2017-11-28 Thread SamyGo
P.S:
Unchecking the EXTRA_DEBUG and DBG_TCPCON flags at compile time makes
OpenSIPS work normally.

On Tue, Nov 28, 2017 at 2:10 PM, SamyGo <govoi...@gmail.com> wrote:

> Hi,
> I just installed the head version from git.
>
> version: opensips 2.4.0-dev (x86_64/linux)
> flags: STATS: On, SHM_EXTRA_STATS, EXTRA_DEBUG, DISABLE_NAGLE, USE_MCAST,
> SHM_MMAP, PKG_MALLOC, QM_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> git revision: d1a4419
> main.c compiled on 19:53:20 Nov 28 2017 with gcc 4.8
>
> It was compiled with EXTRA_DEBUG and DBG_TCPCON flags;
> While starting opensips with the residential vanilla script it gives
> following error:
>
> Nov 28 20:05:52 [30899] ERROR:core:tcp_init: oom con hist
> Nov 28 20:05:52 [30899] CRITICAL:core:main: could not initialize tcp
> Nov 28 20:05:52 [30899] INFO:core:cleanup: cleanup
> Nov 28 20:05:52 [30899] DBG:core:shm_mem_destroy: destroying the shared
> memory lock
> Nov 28 20:05:52 [30899] NOTICE:core:main: Exiting
>  already running
>
>
> Even if I remove the proto_tcp, and tcp related things this still gives
> error and doesn't start.
>
> Kindly help.
>
> Regards,
> Sammy
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] OpenSIPS-devel not starting (TCP Error)

2017-11-28 Thread SamyGo
Hi,
I just installed the head version from git.

version: opensips 2.4.0-dev (x86_64/linux)
flags: STATS: On, SHM_EXTRA_STATS, EXTRA_DEBUG, DISABLE_NAGLE, USE_MCAST,
SHM_MMAP, PKG_MALLOC, QM_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
git revision: d1a4419
main.c compiled on 19:53:20 Nov 28 2017 with gcc 4.8

It was compiled with EXTRA_DEBUG and DBG_TCPCON flags;
While starting opensips with the residential vanilla script it gives
following error:

Nov 28 20:05:52 [30899] ERROR:core:tcp_init: oom con hist
Nov 28 20:05:52 [30899] CRITICAL:core:main: could not initialize tcp
Nov 28 20:05:52 [30899] INFO:core:cleanup: cleanup
Nov 28 20:05:52 [30899] DBG:core:shm_mem_destroy: destroying the shared
memory lock
Nov 28 20:05:52 [30899] NOTICE:core:main: Exiting
 already running


Even if I remove the proto_tcp, and tcp related things this still gives
error and doesn't start.

Kindly help.

Regards,
Sammy
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] sipML5 through kamailio

2017-11-23 Thread SamyGo
Can you clarify the IP addressing scheme as you've mentioned. There is no
TLS interface?
Advertised address for 5060 but not for WSS interface. Both listen and
advertise are public IPs ?
Also,you're handling WSS requests. Do you've xlog ines in the
route[xhttp:request] to view when a request lands.!

My config has this:

#!substdef "!MY_IP_ADDR!123.134.156.167!g"
#!substdef "!MY_WS_PORT!6010!g"
#!substdef "!MY_WSS_PORT!6011!g"

listen=tcp:MY_IP_ADDR:MY_WS_PORT
listen=*tls:*MY_IP_ADDR:MY_WSS_PORT

Then the xhttp event route:

```
event_route[xhttp:request] {
set_reply_close();
set_reply_no_connect();

#Deny any HTTP requests on any port other than WS/WSS ports.
if ($Rp != MY_WS_PORT && $Rp != MY_WSS_PORT ) {
xlog("L_WARN", "HTTP request received on $Rp\n");
xhttp_reply("403", "Forbidden", "", "");
exit;
}

#Handle HTTP(s) onwards.
xlog("L_INFO", "HTTP Request Received\n");
```


On Thu, Nov 23, 2017 at 12:18 PM, Wilkins, Steve <swwilk...@mitre.org>
wrote:

> Hi Sammy,
>
>
>
> First of all, thank you for taking the time to respond.
>
>
>
> Yes, port 10443 is opened.  I have used this port before as asterisk’s
> WebRTC port and iptables shows it as open.  No, I can’t even get a
> registration using the configuration I listed.  I have an xdbg log
> statement right after the request_route, and I see nothing.  I do know that
> my xdbg logs are working though because, if I register or make a call using
> any sip tool, I see all my logging and everything works correctly.
>
>
>
> -Steve
>
>
>
> *From:* sr-users [mailto:sr-users-boun...@lists.kamailio.org] *On Behalf
> Of *SamyGo
> *Sent:* Thursday, November 23, 2017 12:00 PM
> *To:* Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
> *Subject:* Re: [SR-Users] sipML5 through kamailio
>
>
>
> Hi Steve,
>
> Can you confirm that port 10443 is reachable behind the NAT to Kamailio
> server, validate iptables too Does your SIPml5 demo client register
> successfully to Kamailio? are there enough xlog lines to print out if
> anything lands in Kamailio.
>
>
>
> Regards,
>
> Sammy
>
>
>
>
>
>
>
> On Thu, Nov 23, 2017 at 11:34 AM, Wilkins, Steve <swwilk...@mitre.org>
> wrote:
>
> Hello,
>
>
>
> I am attempting to use sipML5 to test WebRTC.  I have not been successful
> in getting messages through to Kamailio though. I am running Kamailio 5.0.3
> on Cento 7.
>
>
>
> *My listen’s in the kamailio configuration file are => *
>
> listen=tcp:112.22.3.108:5060 advertise 34.226.187.61:5060
>
> listen=udp:112.22.3.108:5060 advertise 34.226.187.61:5060
>
> listen=tcp:112.22.3.108:10443 (which I will use in the sipML5 Expert mode)
>
>
>
> *My sipML5 settings are => *
>
> Public Identity - sip:user1@112.22.3.108
>
> Realm - *112.22.3.108*
>
>
>
> *Export mode setting are => *
>
> WebSocket Server URL - *wss://112.22.3.108:10443
> <http://112.22.3.108:10443> *(I have also tried *wss://112.22.3.108:10443/ws
> <http://112.22.3.108:10443/ws>)*
>
> SIP outbound Proxy URL - *udp://112.22.3.108:5060
> <http://112.22.3.108:5060> *(I have also left this blank)
>
>
>
> When I make a call I see no Kamailio activity (I have logging at the start
> of request_route) so I am not sure where the configuration error is.  If I
> change the sipML5 configuration IP Address to use the asterisk IP Address,
> sipML5 works.  My goal is to go WebRTC Client => Kamailio => Asterisk and
> eventually through some sort of media proxy.
>
>
>
> Thank you,
>
> -Steve
>
>
>
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] sipML5 through kamailio

2017-11-23 Thread SamyGo
Hi Steve,
Can you confirm that port 10443 is reachable behind the NAT to Kamailio
server, validate iptables too Does your SIPml5 demo client register
successfully to Kamailio? are there enough xlog lines to print out if
anything lands in Kamailio.

Regards,
Sammy



On Thu, Nov 23, 2017 at 11:34 AM, Wilkins, Steve 
wrote:

> Hello,
>
>
>
> I am attempting to use sipML5 to test WebRTC.  I have not been successful
> in getting messages through to Kamailio though. I am running Kamailio 5.0.3
> on Cento 7.
>
>
>
> *My listen’s in the kamailio configuration file are => *
>
> listen=tcp:112.22.3.108:5060 advertise 34.226.187.61:5060
>
> listen=udp:112.22.3.108:5060 advertise 34.226.187.61:5060
>
> listen=tcp:112.22.3.108:10443 (which I will use in the sipML5 Expert mode)
>
>
>
> *My sipML5 settings are => *
>
> Public Identity - sip:user1@112.22.3.108
>
> Realm - *112.22.3.108*
>
>
>
> *Export mode setting are => *
>
> WebSocket Server URL - *wss://112.22.3.108:10443
>  *(I have also tried *wss://112.22.3.108:10443/ws
> )*
>
> SIP outbound Proxy URL - *udp://112.22.3.108:5060
>  *(I have also left this blank)
>
>
>
> When I make a call I see no Kamailio activity (I have logging at the start
> of request_route) so I am not sure where the configuration error is.  If I
> change the sipML5 configuration IP Address to use the asterisk IP Address,
> sipML5 works.  My goal is to go WebRTC Client => Kamailio => Asterisk and
> eventually through some sort of media proxy.
>
>
>
> Thank you,
>
> -Steve
>
>
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Loadbalancing authenticated agetways

2017-11-23 Thread SamyGo
Hi.
So thats what I've done already before posting this question; even if I've
to do loadbalancing I can use the "fetch_registered_contacts" function,
loop over the online gateways on that 1 RURI and "append_branches()" with
sorted "q" values...

That all depends on the accurate measurement of the number of active calls,
since requirement is to perform load-balancing based on call loads. Simple
load-balancing can be achieved already by manipulating "q" valuesagain
too complicated to work accurately 100% of the time.

I'm trying to figure out way to totally avoid this use-case at all.

Regards,
Sammy


On Thu, Nov 23, 2017 at 11:36 AM, Daniel Tryba <d.tr...@pocos.nl> wrote:

> On Thu, Nov 23, 2017 at 12:14:36AM -0500, SamyGo wrote:
> > I've a scenario where multiple mediaservers will be registered to
> Kamailio
> > and for any incoming call from Upstream provider I've to perform
> > load-balancing to the actively registered media-servers.
> >
> > dispatcher module does load-balancing for IP endpoints, is there any
> other
> > module where I can perform load-balancing on registered
> > clients(media-servers)?
>
> If you have those mediaserver register with the same username you could
> simply use lookup and  serial forking to loadbalance. No idea how to
> randomize the results from lookup though.
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] MSILO with encryption/decryption

2017-11-23 Thread SamyGo
Hi,
Is there any internal mechanism for msilo to store messages encrypted and
retrieve them decrypted before sending?

Thanks,
Sammy
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Config Kamailio with SEMS

2017-05-11 Thread SamyGo
Hi Annus,
Yeah I'd like to put in some effort for sake of learning this, and also I
can publish it to my blog ; http://saevolgo.blogspot.ca

Thanks,
Sammy

On Thu, May 11, 2017 at 9:17 AM, Annus Fictus  wrote:

> Hello,
>
> I have this document only in Spanish... so if someone want translate and
> publish, is welcome.
>
> Regards
>
> El 11/05/2017 a las 06:35, Nguyen Tran Nhan escribió:
>
> Thanks for you reply. I follow document that Annus sent and success setup
> system.
>
> Have a good day!
>
> On Wed, May 10, 2017 at 6:54 PM, Fred Posner  wrote:
>
>> In regards to using SEMS as media server, there are some old
>> configuration examples listed:
>>
>> https://github.com/kamailio/kamailio/tree/master/misc/examples/pcscf/sems
>>
>> Keyword here: old
>>
>> Most documentation for sems is on their github:
>>
>> https://github.com/sems-server/sems
>>
>> --fred
>>
>>
>> On 5/10/17 7:52 AM, Nguyen Tran Nhan wrote:
>>
>>>
>>>
>>> Dear Daniel,
>>>
>>> I am working on Push To Talk PoC. I intent to use Kamailio as SIP
>>> signaling to work with SEMS for handling mixer conference audio (media
>>> server). The reason to use SEMS is performance is better in comparing with
>>> FreeSwitch or Asterisk. There are some guide to config Kamailio with
>>> Freeswitch or Asterisk but no for SEMS.
>>>
>>> If you have any information or guide line, please help!
>>>
>>>
>>>
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Issue with INVITE to NATed client

2017-05-05 Thread SamyGo
Hi,
Can you share the config file. Seems you've made changes to configuration
file. Using save("location") w/o any authentication above it will result in
anyone getting 200OK for a REGISTER.

Looking at the config will help point you to the right way.

Regards,
Sammy


On Fri, May 5, 2017 at 10:56 AM, Iskren Hadzhinedev <
iskren.hadzhine...@ikiji.com> wrote:

> Hi list!
>
> I'm using kamailio 4.2 for load-balancing and failover via dispatcher, but
> I'm having some NAT related issues and I was hoping that someone might
> point me in the right direction.
> My setup is the following:
>
> PSTN - PBX - kamailio - NAT - client
>
> Calls from the NATed client to PSTN and/or PBX features (e.g. voicemail)
> work just fine.
> However, when a call comes from PSTN to the client, kamailio sends the
> INVITE to the client's RFC1918 IP and I can't figure out how to send it to
> the correct destination. I tried loading the registrar and usrloc modules
> and used save("location") during REGISTER and lookup("location") just
> before loose_route(), but the end result was that kamailio replied to
> REGISTERs with any username/password with a 200 OK and the endpoints never
> registered with the PBX.
> I can attach the config file if that will help.
>
> Thanks for all input in advance!
>
> Regards,
> Iskren
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users