[SR-Users] Re: low performance with no apparent reason

2024-03-23 Thread Sergiu Pojoga via sr-users
>  if most of the time the udp queue is empty and dropped packets are
observed, then the size of the udp queue is too small.

Hmm.. why would you need to increase the queue size if nothing gets queued
up?

On Sat, Mar 23, 2024 at 6:38 PM Alex Balashov via sr-users <
sr-users@lists.kamailio.org> wrote:

>
> > On Mar 23, 2024, at 6:05 PM, Ovidiu Sas  wrote:
> >
> > if most of the time the udp queue is empty and dropped packets are
> observed, then the size of the udp queue is too small.
>
> But would that happen with a sipp load test, once the threshold of dropped
> requests is observed?
>
> --
> Alex Balashov
> Principal Consultant
> Evariste Systems LLC
> Web: https://evaristesys.com
> Tel: +1-706-510-6800
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: low performance with no apparent reason

2024-03-22 Thread Sergiu Pojoga via sr-users
What do you have as a UAS?

The UDP receive buffer increase that Ovidiu suggested would be necessary if
you see traffic piling up/getting dropped, e.g. look at `netstat -s | grep
"receive buffer errors"` or watch for 2nd column Recv-Q of netstat.

Cheers,

On Fri, Mar 22, 2024 at 1:31 PM Ovidiu Sas via sr-users <
sr-users@lists.kamailio.org> wrote:

> I assume that you are using udp.
> Please increase the length of the udp queue:
>
> https://medium.com/@CameronSparr/increase-os-udp-buffers-to-improve-performance-51d167bb1360
>
> Regards.
> Ovidiu Sas
>
>
> On Fri, Mar 22, 2024 at 12:56 Sergio Charrua via sr-users <
> sr-users@lists.kamailio.org> wrote:
>
>> Hi all!
>>
>> I have been doing some performance tests with Kamailio 5.7.4 and SIPp.
>> The infrastructure is as follows:3 VMs running on VMWare ESXi running:
>> UAC on 10.20.0.1 with SIPP-> Kamailio on 10.20.0.5 -> UAS on 10.20.0.3
>>
>> The Kamailio VM has 6 dedicated vCPU of type Intel(R) Xeon(R) Silver 4216
>> CPU @ 2.10GHz and, 2 NICs and 4Gb RAM and MariaDB 10.6 as DB Backend., all
>> running on a HP G380 host with a gazillion CPUs and a googol disk space!
>>
>> I currently have 3 scripts:
>> - script #1 stateful with RTJson and simulating requests to routing
>> engine and accounting
>> - script #2 stateful but with just a simple routing to UAS, no rules, no
>> DB,
>> - script #3 stateless with a forward to UAS
>>
>> With script #3 I can go up to 2000CPS without issues with CPU at 37%!
>> Above that value, I get retransmissions everywhere.
>> On both scripts #1 and #2, the limit is 330CPS max after which I get a
>> lot of retransmissions, while CPU/Core usage on Kamailio server stays below
>> 10%.
>> So I do not expect this to be a CPU issue.
>>
>> I could not understand why such (low) results, so I followed this article
>> found at
>>  https://www.kamailio.org/docs/openser-performance-tests/#tm-tests-c
>> 
>> and created exact same scenarios, with kamailio script and SIPP templates
>> available on the article, hoping for better results.
>> But I get the same results: between 300 and 330CPS which is far, very far
>> from the 7000CPS found in the article!
>>
>> I understand that I'm using VMs and probably the tests made for the
>> article, which is pretty old already, were made on physical servers. Still,
>> I would not expect 95% of lower performance!
>>
>> Any clue what could be the issue? I suspect NICs, but
>> Any tips anyone could share?
>>
>> Thanks in advance!
>>
>> *Sérgio Charrua*
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: from TCP to UDP and Kamailio doing it wrong

2024-03-07 Thread Sergiu Pojoga via sr-users
You must be doing something essentially wrong if it came down to checking C
functions for something as trivial as transport conversion..

Are you sure you have a UDP listening socket?
kamcmd corex.list_sockets

Result of:
kamcmd dispatcher.list

Have you tried forcing the send socket?
https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#fs_-_forced_send_socket

Cheers

On Thu, Mar 7, 2024 at 11:27 AM Alberto Diez via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hi kamailio community,
>
> I have an issue with a Kamailio 5.7. It's listening both in TCP and
> UDP.  In my scenario requests arrive from devices on TCP, but I want to
> forward to the next hops on UDP.  I am avoiding using any type of DNS
> resolution; since I am always forwarding to predefined next hops I am
> using the dispatcher module (defined with the IP addresses and
> transport=udp) or I wrote config files using t_relay_to_udp or
> t_relay_to with a udp:  followed by IP address. I never set up FQDNS
> only IP addresses and in all of them I explicitly mention UDP.
>
> In all of these scenarios I have tried Kamailio insists in trying to use
> TCP  with the next hop and failing because the next_hop is only UDP. I
> guess because the message arrived using TCP Kamilio does that but I find
> the behavior very confusing.
>
> I nailed down that in my situation its the tm module function
> prepare_new_uac (in  file src/modules/tm/t_fwd.c line 119) being the one
> that missbehaves. The documentation of the function says literraly :
>
> "* t->uac[branch].request.dst will be filled if next_hop !=0 with the
> result
>   * of the DNS resolution (next_hop, fproto and fsocket).
>   * If next_hop is 0 all the dst members except the send_flags are
> read-only
>   * (send_flags it's updated) and are supposed to be pre-filled."
>
> I found out that even when next_hop is 0  the function changes the
> t->uac[branch].request.dst  proto, socket etc.  its there that the
> kamailio takes the wrong decision, until that function is called within
> add_auc,  the destination proto or the fproto etc is always 1 (UDP)
> which is what I am trying to force from the config file or the
> dispatcher definition (I tried both ways).  But after calling that
> function then it comes as a 2 (TCP)
>
> The problematic function is a monster of 500 lines and I would like to
> avoid having to understand it. Since I think the scenario is not so
> unusual I just want to ask if maybe I am missing something that I should
> do to avoid the Kamailio to select TCP and in order to have the tm
> module respecting my preference for UDP (either with dispatcher module
> and the transport param or with t_relay_to or t_relay_to_udp  I don't
> care the way).
>
> Any hints are welcome.
>
> Best regards
>
> alberto
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Answer OPTIONS from an Asterisk

2024-02-28 Thread Sergiu Pojoga via sr-users
Let me ask you this instead: how do you handle INVITEs (calls) originating
from the PBX towards the phone via Kamailio? Or NOTIFY (out of dialog), or
other methods. Because it's essentially the same thing.

P.S. I didn't go thru your config, too lazy

On Wed, Feb 28, 2024 at 6:14 PM Ludovic ELUECQUE via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hello,
>
>  I've been using Kamailio to replace a Telcobridge ProSBC for several days
> now, but I've been stuck for a whole day on a simple concept
> My Kamaillio is connected to an Asterisk to which it redirects requests.
> However, this Asterisk sends OPTIONS requests in order to ping the phone.
> On the Kamailio side, I don't know how to respond to these requests.
> I've done tons of research but I can't find anything similar, maybe
> there's something very obvious I'm missing
>
> If I t_relay the message it never receives a reply via the phone's public
> ip/port.
>
> Thanks in advance if anyone could help me with this. Please apologize if
> it's a dumb thing.
>
> SIP OPTIONS:
>
> 2024/02/28 23:28:25.181663 100.66.138.5:5060 -> 100.66.138.7:5060
> OPTIONS sip:110@100.66.138.7:5060 SIP/2.0
> Via: SIP/2.0/UDP 100.66.138.5:5060
> ;rport;branch=z9hG4bKPje213d53f-fd1d-47f2-b0f8-fd3a8bf5188c
> From: ;tag=46e51407-77b0-47f1-af73-cd8bec95b179
> To: 
> Contact: 
> Call-ID: 74401738-d874-4c5c-a4b5-b74514361043
> CSeq: 50224 OPTIONS
> Max-Forwards: 70
> User-Agent: Asterisk
> Content-Length:  0
>
>
> =
> kamailio.cfg
>
> #!KAMAILIO
> #!define WITH_MYSQL
> #!define WITH_AUTH
> #!define WITH_USRLOCDB
> #!define WITH_RTPENGINE
> # define WITH_ANTIFLOOD
> #!define WITH_WEBSOCKETS
> #!define WITH_TLS
> #!define WITH_NAT
> ...
>
>
> #!ifdef ACCDB_COMMENT
>   ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
>   ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
>   ALTER TABLE acc ADD COLUMN src_ip varchar(64) NOT NULL default '';
>   ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
>   ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
>   ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
>   ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL
> DEFAULT '';
>   ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT NULL
> DEFAULT '';
>   ALTER TABLE missed_calls ADD COLUMN src_ip varchar(64) NOT NULL default
> '';
>   ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL
> DEFAULT '';
>   ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT NULL
> DEFAULT '';
>   ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL
> DEFAULT '';
> #!endif
>
>
> ### DEFINE VARIABLE 
> #!substdef "!MY_IP_ADDR!X.X.X.X!g"
>
> #!substdef "!MY_WS_PORT!8080!g"
> #!substdef "!MY_WSS_PORT!4443!g"
>
> #!substdef "!MY_WS_ADDR!tcp:MY_IP_ADDR:MY_WS_PORT!g"
> #!substdef "!MY_WSS_ADDR!tls:MY_IP_ADDR:MY_WSS_PORT!g"
>
> #!substdef "!MY_MSRP_PORT!!g"
> #!substdef "!MY_WSS_ADDR!tls:MY_IP_ADDR:MY_WSS_PORT!g"
> #!substdef "!MY_MSRP_ADDR!tls:MY_IP_ADDR:MY_MSRP_PORT!g"
> #!substdef "!MSRP_MIN_EXPIRES!1800!g"
> #!substdef "!MSRP_MAX_EXPIRES!3600!g"
>
> ### Include Local Config If Exists #
> import_file "kamailio-local.cfg"
>
> ### Defined Values #
>
> # *** Value defines - IDs used later in config
> #!ifdef WITH_DEBUG
> #!define DBGLEVEL 3
> #!else
> #!define DBGLEVEL 2
> #!endif
>
> #!ifdef WITH_MYSQL
> # - database URL - used to connect to database server by modules such
> #   as: auth_db, acc, usrloc, a.s.o.
> #!trydef DBURL "mysql://kamailio:kamailiorw@localhost/kamailio"
> #!endif
>
> #!ifdef WITH_MULTIDOMAIN
> # - the value for 'use_domain' parameters
> #!define MULTIDOMAIN 1
> #!else
> #!define MULTIDOMAIN 0
> #!endif
>
> # - flags
> #   FLT_ - per transaction (message) flags
> #!define FLT_ACC 1
> #!define FLT_ACCMISSED 2
> #!define FLT_ACCFAILED 3
> #!define FLT_NATS 5
>
> # FLB_ - per branch flags
> #!define FLB_NATB 6
> #!define FLB_NATSIPPING 7
>
> ### Global Parameters #
>
> /* LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR, ... */
> debug=DBGLEVEL
>
> /* set to 'yes' to print log messages to terminal or use '-E' cli option */
> log_stderror=no
>
> memdbg=5
> memlog=5
>
> log_facility=LOG_LOCAL0
> log_prefix="{$mt $hdr(CSeq) $ci} "
>
> /* number of SIP routing processes for each UDP socket
>  * - value inherited by tcp_children and sctp_children when not set
> explicitely */
> children=8
>
> /* uncomment the next line to disable TCP (default on) */
> # disable_tcp=yes
>
> /* number of SIP routing processes for all TCP/TLS sockets */
> # tcp_children=8
>
> /* uncomment the next line to disable the auto discovery of local aliases
>  * based on reverse DNS on IPs (default on) */
> # auto_aliases=no
>
> /* add local domain aliases - it can be set many times */
> # alias="sip.mydomain.com"
>
> /* listen sockets - if none set, Kamailio binds to all local IP addresses
> 

[SR-Users] Re: uac/uacreg - is it possible to force a REGISTER for an existing l_uuid

2024-02-15 Thread Sergiu Pojoga via sr-users
I don't think you can send a REGISTER immediately, like literally the same
moment, with any of the RPC commands.

There's a Kamailio UAC REG timer that processes records at certain
intervals like reg_timer_interval() modparam. It also depends on
reg_random_delay() and/or per uuid reg_delay values.

Regards,
Sergiu
--

*Teams PBX connector with full MS Direct Routing automation for service
providers**Web*: https://teamsphone.net

On Thu, Feb 15, 2024 at 11:27 AM Aymeric Moizard via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hi List,
>
> I would like to know if it's possible in my kamailio script
> to force an immediate REGISTER for an existing entry using l_uuid
>
> If I'm correct, uac_reg_refresh(luuid)is an API to reload into the database
> but doesn't send a REGISTER immediately.
>
> Is there an existing API available from script in uac module to
> achieve this?
>
> Thanks a lot,
> Aymeric
>
>
> Le ven. 19 janv. 2024 à 22:37, Aymeric Moizard  a
> écrit :
>
>> Hi!
>>
>> I would like to add/remove/update entries in uacreg database.
>>
>> The easiest way I found is to add data using mysql and then call
>> kamcmd uac.reg_reload. I end up reloading too often:
>>
>> uac_reg_ht_shift(): shifting in-memory table is not possible in less than
>> 150 secs
>>
>> I would like to optimize it and I tried to use
>>
>> sudo kamcmd uac.reg_add
>>
>> Unfortunately, the data is not persistent and seems to be only in memory.
>>
>> Does it means my only choice is to follow this procedure:
>>
>> Add a user:
>>
>> 1/ sudo kamcmd uac.reg_add
>> 2/ add the equivalent mysql entry
>>
>> Remove a user
>>
>> 1/ sudo kamcmd uac.reg_remove
>> 2/ remove the equivalent mysql entry
>>
>> Let me know if an alternative exists!
>> Regards
>> Aymeric
>>
>> --
>> Antisip - http://www.antisip.com
>>
>
>
> --
> Antisip - http://www.antisip.com
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Internal DNS resolver

2024-01-12 Thread Sergiu Pojoga via sr-users
Just so ppl you're asking don't lose their minds either trying to be
clairvoyants of your particular setup, can you post what records exactly
were added and what makes you think they are not followed by Kam when
selecting a destination?

So you add records with *dns.add* and then lookup them up with *dns.lookup*

Cheers,

On Fri, Jan 12, 2024 at 8:42 AM Igor Potjevlesch via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hello,
>
>
>
> Just to be sure that I'm not losing my time: is there any chance to do a
> load-balancing using add_srv? I just tried with two equal entries but it's
> always the same which is returned.
>
>
>
> Regards,
>
>
>
> Igor.
>
>
>
> *De :* Daniel-Constantin Mierla 
> *Envoyé :* vendredi 12 janvier 2024 11:17
> *À :* Igor Potjevlesch ; 'Kamailio (SER) -
> Users Mailing List' 
> *Objet :* Re: [SR-Users] Internal DNS resolver
>
>
>
> Hello,
>
> the core rpc lack proper documentation, not like the case of modules. In
> this case, the code should be suggestive of what parameters have to be
> provided:
>
>   -
> https://github.com/kamailio/kamailio/blob/master/src/core/dns_cache.c#L4744
>
> For each of those values, the corex docs for dns_cache parameter should
> give details.
>
> Cheers,
> Daniel
>
>
>
> On 12.01.24 11:05, Igor Potjevlesch wrote:
>
> Hello Daniel,
>
>
>
> Thanks! I wll try. I didn't find out how to use dns.add_a. Is someone has
> the exact params lists? Thank you.
>
>
>
> Regards,
>
>
>
> Igor.
>
>
>
> *De :* Daniel-Constantin Mierla  
> *Envoyé :* jeudi 11 janvier 2024 19:36
> *À :* Kamailio (SER) - Users Mailing List 
> 
> *Cc :* Igor Potjevlesch 
> 
> *Objet :* Re: [SR-Users] Internal DNS resolver
>
>
>
> Hello,
>
>
>
> On 11.01.24 19:07, Igor Potjevlesch via sr-users wrote:
>
> Hello!
>
>
>
> I have a quick question about the internal DNS resolver and cache embedded
> in Kamailio.
>
> Is the ability to add an entry with dns.add_a bypass the "real" DNS
> lookup? So, let's say that sip.example.com is publicly resolve
> alternatively with 1.2.3.4 & 5.6.7.8.9, if I do a dns.add_a to add my own
> sip.example.com with, alternatively, 127.0.0.1 and 127.0.0.2, will it
> work?
>
>
>
>
> yes, it should work, the internal cache is checked first and if entry
> found, then it is used.
>
> You can also add entries in the dns cache at startup via dns_cache
> modparam from corex.
>
> Cheers,
> Daniel
>
> --
>
> Daniel-Constantin Mierla (@ asipto.com)
>
> twitter.com/miconda -- linkedin.com/in/miconda
>
> Kamailio Consultancy, Training and Development Services -- asipto.com
>
> Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
>
> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
>
>
>
>
> 
>
> Sans virus.www.avast.com
> 
>
> --
>
> Daniel-Constantin Mierla (@ asipto.com)
>
> twitter.com/miconda -- linkedin.com/in/miconda
>
> Kamailio Consultancy, Training and Development Services -- asipto.com
>
> Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
>
> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: How to know registration status

2024-01-08 Thread Sergiu Pojoga via sr-users
Have you consulted the UAC module documentation? It's all in there. You
won't get faster help than that.

BTW, it won't tell you the latest reply status code per se, usually that's
not a direct indicator of a registration status. If you are looking for
that specifically - then you'll have to build some kind of [in-memory]
[htable] storage to keep track of the latest reply status codes for each
r_uuid, somewhere in the reply route.

RPC
https://kamailio.org/docs/modules/devel/modules/uac.html#uac.r.uac.reg_info

Within script
https://kamailio.org/docs/modules/devel/modules/uac.html#uac.f.uac_reg_status

On Mon, Jan 8, 2024 at 10:26 PM mm e via sr-users <
sr-users@lists.kamailio.org> wrote:

> After using the uac module to initiate registration to the remote end, is
> there a method to call back to notify the registration result? I want to
> get the registration result, such as 200 or 403
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: How to use uac.reg_add command?

2024-01-05 Thread Sergiu Pojoga via sr-users
kamcmd does auto-convert when it detects the parameter is a number. By
prefixing with s: you enforce string param.

Try this instead:
kamcmd uac.reg_add s:789798 s:789798 s:mydomain.com s:789798 s:
myteldomain.com . s:789798 s:123456 . sip:sip6.telco.nl  360 0 10
mydomain.com:5060 udp:mydomain.com:5060

Regards,
Sergiu
--

*Teams PBX connector with full MS Direct Routing automation for service
providers**Web*: https://teamsphone.net

On Fri, Jan 5, 2024 at 10:09 PM mm e via sr-users <
sr-users@lists.kamailio.org> wrote:

> ./kamcmd uac.reg_add 789798 789798 mydomain.com 789798 myteldomain.com .
> 789798 123456 . sip:sip6.telco.nl  360 0 10 mydomain.com:5060 udp:
> mydomain.com:5060
>
>
> error: 400 - Invalid Parameters
>
> Can you provide me with a case, I don't know how to enter the correct
> format.
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: DB invalid connection parameter

2024-01-04 Thread Sergiu Pojoga via sr-users
*Answers to your questions:*

*>  what is the db_mode parameter for usrloc module?*
modparam("usrloc", "db_mode", 2)   # other modules like dialog have same
mode 2


*> Have you set also time_procs param?*
modparam("usrloc", "timer_procs", 2)

Other usrloc params:
modparam("usrloc", "db_load", 1)
modparam("usrloc", "matching_mode", 0)
modparam("usrloc", "handle_lost_tcp", 0)
modparam("usrloc", "use_domain", MULTIDOMAIN)
modparam("usrloc", "nat_bflag", FLB_NATB)
modparam("usrloc", "timer_interval", 60)
modparam("usrloc", "skip_remote_socket", 0)

Thanks.


On Thu, Jan 4, 2024 at 3:38 AM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> a bit strange as I haven't seen a similar report and 5.6.x series is out
> for quite some time.
>
> It seems to be from the timer routine, what is the db_mode parameter for
> usrloc module? Have you set also time_procs param?
>
> Cheers,
> Daniel
> On 03.01.24 21:28, Sergiu Pojoga via sr-users wrote:
>
> Hi,
>
> Facing the following error after bumping Kam from 5.3 => 5.4 => 5.5 =>
> 5.6, following instructions on each step about DB structure and module
> changes.
>
> These errors show up since. Any clue what they mean? A couple other
> modules are using the same DB MySQL connector. The data in the DB also
> seems to get updated properly.
>
> Jan 03 15:08:30 sip kamailio[20881]: ERROR:  [db.c:489]:
> db_use_table(): invalid connection parameter
>
>
> *Jan 03 15:08:30 sip kamailio[20881]: ERROR: usrloc [ucontact.c:1170]:
> db_update_ucontact_ruid(): sql use_table failed Jan 03 15:08:30 sip
> kamailio[20881]: ERROR: usrloc [urecord.c:438]: wb_timer(): updating
> contact in db failed (aor: u...@domain.com ) *
>
> version: kamailio 5.6.5 (x86_64/linux) 48d48f
> compiled on 02:32:48 Jan  2 2024 with gcc 4.9.2
>
> DB structure:
>
> location | CREATE TABLE `location` (
>   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
>   `ruid` varchar(64) NOT NULL DEFAULT '',
>   `username` varchar(64) NOT NULL DEFAULT '',
>   `domain` varchar(64) DEFAULT NULL,
>   `contact` varchar(512) NOT NULL DEFAULT '',
>   `received` varchar(128) DEFAULT NULL,
>   `path` varchar(512) DEFAULT NULL,
>   `expires` datetime NOT NULL DEFAULT '2030-05-28 21:32:15',
>   `q` float(10,2) NOT NULL DEFAULT 1.00,
>   `callid` varchar(255) NOT NULL DEFAULT 'Default-Call-ID',
>   `cseq` int(11) NOT NULL DEFAULT 1,
>   `last_modified` datetime NOT NULL DEFAULT '2000-01-01 00:00:01',
>   `flags` int(11) NOT NULL DEFAULT 0,
>   `cflags` int(11) NOT NULL DEFAULT 0,
>   `user_agent` varchar(255) NOT NULL DEFAULT '',
>   `socket` varchar(64) DEFAULT NULL,
>   `methods` int(11) DEFAULT NULL,
>   `instance` varchar(255) DEFAULT NULL,
>   `reg_id` int(11) NOT NULL DEFAULT 0,
>   `server_id` int(11) NOT NULL DEFAULT 0,
>   `connection_id` int(11) NOT NULL DEFAULT 0,
>   `keepalive` int(11) NOT NULL DEFAULT 0,
>   `partition` int(11) NOT NULL DEFAULT 0,
>   PRIMARY KEY (`id`),
>   UNIQUE KEY `ruid_idx` (`ruid`),
>   KEY `account_contact_idx` (`username`,`domain`,`contact`),
>   KEY `expires_idx` (`expires`),
>   KEY `connection_idx` (`server_id`,`connection_id`),
>   *KEY `tcpcon_idx` (`connection_id`)*
> ) ENGINE=InnoDB AUTO_INCREMENT=287989 DEFAULT CHARSET=latin1
>
> > select * from version where table_name='location';
> table_name: location
> table_version: 9
>
> Thanks.
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>
> --
> Daniel-Constantin Mierla (@ asipto.com)twitter.com/miconda -- 
> linkedin.com/in/miconda
> Kamailio Consultancy and Development Services
> Kamailio Advanced Training -- asipto.com
>
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] DB invalid connection parameter

2024-01-03 Thread Sergiu Pojoga via sr-users
Hi,

Facing the following error after bumping Kam from 5.3 => 5.4 => 5.5 => 5.6,
following instructions on each step about DB structure and module changes.

These errors show up since. Any clue what they mean? A couple other modules
are using the same DB MySQL connector. The data in the DB also seems to get
updated properly.

Jan 03 15:08:30 sip kamailio[20881]: ERROR:  [db.c:489]:
db_use_table(): invalid connection parameter


*Jan 03 15:08:30 sip kamailio[20881]: ERROR: usrloc [ucontact.c:1170]:
db_update_ucontact_ruid(): sql use_table failedJan 03 15:08:30 sip
kamailio[20881]: ERROR: usrloc [urecord.c:438]: wb_timer(): updating
contact in db failed (aor: u...@domain.com )*

version: kamailio 5.6.5 (x86_64/linux) 48d48f
compiled on 02:32:48 Jan  2 2024 with gcc 4.9.2

DB structure:

location | CREATE TABLE `location` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ruid` varchar(64) NOT NULL DEFAULT '',
  `username` varchar(64) NOT NULL DEFAULT '',
  `domain` varchar(64) DEFAULT NULL,
  `contact` varchar(512) NOT NULL DEFAULT '',
  `received` varchar(128) DEFAULT NULL,
  `path` varchar(512) DEFAULT NULL,
  `expires` datetime NOT NULL DEFAULT '2030-05-28 21:32:15',
  `q` float(10,2) NOT NULL DEFAULT 1.00,
  `callid` varchar(255) NOT NULL DEFAULT 'Default-Call-ID',
  `cseq` int(11) NOT NULL DEFAULT 1,
  `last_modified` datetime NOT NULL DEFAULT '2000-01-01 00:00:01',
  `flags` int(11) NOT NULL DEFAULT 0,
  `cflags` int(11) NOT NULL DEFAULT 0,
  `user_agent` varchar(255) NOT NULL DEFAULT '',
  `socket` varchar(64) DEFAULT NULL,
  `methods` int(11) DEFAULT NULL,
  `instance` varchar(255) DEFAULT NULL,
  `reg_id` int(11) NOT NULL DEFAULT 0,
  `server_id` int(11) NOT NULL DEFAULT 0,
  `connection_id` int(11) NOT NULL DEFAULT 0,
  `keepalive` int(11) NOT NULL DEFAULT 0,
  `partition` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ruid_idx` (`ruid`),
  KEY `account_contact_idx` (`username`,`domain`,`contact`),
  KEY `expires_idx` (`expires`),
  KEY `connection_idx` (`server_id`,`connection_id`),
  *KEY `tcpcon_idx` (`connection_id`)*
) ENGINE=InnoDB AUTO_INCREMENT=287989 DEFAULT CHARSET=latin1

> select * from version where table_name='location';
table_name: location
table_version: 9

Thanks.
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: webRTC Test Client?

2024-01-02 Thread Sergiu Pojoga via sr-users
The mother of all webrtc-to-sip gateways for Kamailio is probably this
project: https://github.com/havfo/WEBRTC-to-SIP

It has all the elements to get you started playing in the sandbox very
quickly.

>From there - adopting or developing your own Py/C/whatever client is
another task entirely

Cheers,



On Tue, Jan 2, 2024 at 11:12 AM Andy Newlands via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hi,
>
> I have a Freeswitch installation, fronted by a Kamailio proxy
>
> I would like to configure Kamailio to bridge SIP between webRTC clients
> and Freeswitch.
>
> The first issue I hit is how to set up a test webRTC client to make calls
> into Kamailio/FS.
>
> Can anyone point me to a simple webRTC client I can use to make
> test webRTC/SIP calls into my setup?  Thanks
>
> BTW: I'm not JS experienced (I work with Python, C#, C/C++).
>
> Kind regards,
>
> Andy
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-19 Thread Sergiu Pojoga via sr-users
*> what you suggest now ?*

Start praying? LOL

Do an SSL test, any issues? https://decoder.link/sslchecker/abcsbc.com/5061

Regards,

On Tue, Dec 19, 2023 at 1:46 AM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> Here 's the problem
>
> From the logs of dispatcher, I have pasted below only one log of
> dispatcher failure. it seems to be timeout from microsoft.
>
> Dec 19 06:16:46 curemsteamssbc /usr/sbin/kamailio[30957]: DEBUG:
> dispatcher [dispatch.c:3680]: ds_options_callback(): OPTIONS-Request was
> finished with code 408 (to sip:sip3.pstnhub.microsoft.com;transport=tls,
> group 1)
>
> This dispatcher log clearly showing that Option request was finished with
> 408 from Microsoft. so it means Kamailio is not receiving back anything
> from Microsoft for it's Option request.
>
> what you suggest now ?
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
Two things:

1. You're not paying attention. Previously, I asked if there's
*force_rport()* in your kam config. Looks like you do. Remove it from the
REQINIT route.
2. Are you sure Kamailio can read the cert and key files from
*/etc/letsencrypt/live/**abcsbc.com/ *? By default,
those files may not be readable by kamailio, depending if you run it under
root or kamailio user. Change the folder permissions or better yet copy the
cert and key to some /tmp/ folder and adjust config for testing purpose
sake.
3. You don't need *[server:172.31.19.8:5061 ]
& [client:172.31.19.8:5061 ]* definitions in
tls.cfg, default will suffice.
4. To avoid all this back and forth, enable debugging
 in Kamailio
and see if there's any errors like Kam not being able to load certs and
priv keys e.t.c

Regards,
Sergiu
--

*Teams PBX connector plus full MS Direct Routing automation**Web*:
https://teamsphone.net

On Mon, Dec 18, 2023 at 8:21 PM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> this is my tls config
>
> https://pastebin.com/RWBJcpuS
>
> this is the kamctl file
> https://pastebin.com/Cy4aCtbm
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
There you go, sipexer test passed, which means all good on the MS side.
Alice/Bob uri username doesn't change anything here, ignore it.

Another idea: do you have *force_rport* anywhere in the Kamailio script?
Would be helpful to see the full script as well.

Regards,
Sergiu
--

*Teams PBX connector plus full MS Direct Routing automation**Web*:
https://teamsphone.net



On Mon, Dec 18, 2023 at 5:33 PM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> the Global administrator is fai...@7v840c.onmicrosoft.com and this
> faisal.ah...@abcsbc.com is the user created for the domain abcsbc.com.
>
> The global account is the development test account with the Teams license
> without calling. But with this license you will be able to test the Teams
> trunking.
>
> here you go for the sipexer test below and it's successful but in the
> sngrep I see the options packet for alice without this command on udp when
> executing the default command for sipexer.
>
>
>
>  ./sipexer -options -contact-uri "sip:abcsbc.com:5061;transport=tls" -fd "
> abcsbc.com" -td "sip.pstnhub.microsoft.com;transport=tls" -tls-insecure
> -tls-certificate "/etc/letsencrypt/live/abcsbc.com/fullchain.pem"
> -tls-key "/etc/letsencrypt/live/abcsbc.com/privkey.pem" -xh
> "Max-Forwards: 70" -ua "Kamailio" "sip:sip.pstnhub.microsoft.com:5061
> ;transport=tls"
>
> [info] [sipexer.go:1581] main.SIPExerDialogLoop(): local socket address:
> 172.31.19.8:51882 (tls)
> [info] [sipexer.go:1582] main.SIPExerDialogLoop(): local via address:
> 172.31.19.8:51882
> [info] [sipexer.go:1583] main.SIPExerDialogLoop(): sending to tls
> 52.114.148.0:5061: [[---
> OPTIONS sip:sip.pstnhub.microsoft.com:5061;transport=tls SIP/2.0
> Via: SIP/2.0/TLS 172.31.19.8:51882
> ;rport;branch=z9hG4bKSG.c031ebff-3cd4-4eb3-8c71-f82b3bc41b30
> From: ;tag=5134186d-6804-419e-8abc-99cfe607e3b1
> To: 
> Call-ID: 73f563c9-6647-4402-be59-361e4a1d40c0
> CSeq: 44075 OPTIONS
> Date: Mon, 18 Dec 2023 22:07:12 UTC
> Contact: 
> User-Agent: Kamailio
> Max-Forwards: 10
> Content-Length: 0
> Max-Forwards:  70
>
>
> [info] [sipexer.go:1585] main.SIPExerDialogLoop(): ---]]
>
> [info] [sipexer.go:1636] main.SIPExerDialogLoop(): response-received: from=
> 52.114.148.0:5061 bytes=441 data=[[---
> SIP/2.0 200 OK
> FROM: ;tag=5134186d-6804-419e-8abc-99cfe607e3b1
> TO: 
> CSEQ: 44075 OPTIONS
> CALL-ID: 73f563c9-6647-4402-be59-361e4a1d40c0
> VIA: SIP/2.0/TLS 172.31.19.8:51882
> ;branch=z9hG4bKSG.c031ebff-3cd4-4eb3-8c71-f82b3bc41b30;rport
> CONTENT-LENGTH: 0
> ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
> SERVER: Microsoft.PSTNHub.SIPProxy v.2023.12.11.2 i.USWE2.3
>
>
> [info] [sipexer.go:1638] main.SIPExerDialogLoop(): ---]]
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
*> but I am checking my sngrep and there are no sip traffic coming back
from Microsoft.*

sngrep won't show anything, the traffic to/from MS is encrypted. You'll
need to install and configure something like SIPDUMP or HEP.

I'm afraid this isn't the easiest of tasks for someone who seems to be just
getting started with VoIP. Too many things to consider in this task.

Run the below to check if MS replies back. Besides that, I did what I could
to help over email. Good luck!

*sipexer* -options -contact-uri "sip:abcsbc.com:5061;transport=tls" -fd "
abcsbc.com" -td  "sip.pstnhub.microsoft.com;transport=tls" \
-tls-certificate "/usr/local/etc/kamailio/bundle.crt" -tls-key
"/usr/local/etc/kamailio/privkey.pem" \
-xh "Max-Forwards: 70" -ua "Ribbon-SIPGateway"
"sip:sip.pstnhub.microsoft.com:5061;transport=tls"

Note: adjust certs path and FQDN, if needed.

Regards,
Sergiu
--

*Teams PBX connector plus full MS Direct Routing automation**Web*:
https://teamsphone.net

On Mon, Dec 18, 2023 at 5:01 PM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> but I am checking my sngrep and there are no sip traffic coming back from
> Microsoft.
>
> And if it's the issue on just Kamailio but why MS teams direct routing sbc
> shows any tls or network activity.
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
What's the role of faisal.ah...@abcsbc.com, is it Global Administrator?

On Mon, Dec 18, 2023 at 4:38 PM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> when i tried to login via the user faisal.ah...@abcsbc.com on
> admin.teams.microsoft.com, it gives me the error that you don't have
> access to the Teams admin center.
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
Other ideas would be:
- who signed your cert
- running behind some NAT, AWS or alike?

At that point, some TLS traffic dump would help. You could for example
enable the SIPDUMP module and see what exactly is sent out/received.

Regards,
Sergiu
--
Teams PBX connector plus full MS Direct Routing automation
*Web*: https://teamsphone.net

On Mon, Dec 18, 2023 at 2:53 PM  wrote:

> This is from the section in the link you mentioned (
> https://skalatan.de/en/blog/kamailio-sbc-teams)
>
>
>
> # Add the Microsoft Teams-specific code here
>
> event_route[tm:local-request] {
>
>
>
> if(is_method("OPTIONS") && $ru =~ "pstnhub.microsoft.com") {
>
>append_hf("Contact:  ;transport=tls>\r\n");
>
> }
>
> xlog("L_INFO", "Sent out tm request: $mb\n");
>
> }
>
>
>
> I have added this in my code after the section
>
>
>
> # Wrapper for relaying requests
>
> route[RELAY] {
>
> - Continue scripts -
>
>
>
> Below is my Teams admin Center:
>
>
>
> kamcmd dns.lookup SRV _sips._tcp.sip.pstnhub.microsoft.com
>
> {
>
> name: _sips._tcp.sip.pstnhub.microsoft.com
>
> type: SRV
>
> size_bytes: 360
>
> reference_counter: 2
>
> permanent: no
>
> expires: 3600
>
> last_used: 0
>
> negative_entry: no
>
> records: {
>
> {
>
> rr_idx: 0
>
> rr_name: sip.pstnhub.microsoft.com
>
> rr_port: 5061
>
> rr_priority: 10
>
> rr_weight: 0
>
> rr_permanent: no
>
> rr_expires: 3600
>
> }
>
> {
>
> rr_idx: 1
>
> rr_name: sip2.pstnhub.microsoft.com
>
> rr_port: 5061
>
> rr_priority: 20
>
> rr_weight: 0
>
> rr_permanent: no
>
> rr_expires: 3600
>
> }
>
> {
>
> rr_idx: 2
>
> rr_name: sip3.pstnhub.microsoft.com
>
> rr_port: 5061
>
> rr_priority: 30
>
> rr_weight: 0
>
> rr_permanent: no
>
> rr_expires: 3600
>
> }
>
>     {
>
> rr_idx: 3
>
> rr_name: sip4.pstnhub.microsoft.com
>
> rr_port: 5061
>
> rr_priority: 40
>
> rr_weight: 0
>
> rr_permanent: no
>
> rr_expires: 3600
>
> }
>
> }
>
> }
>
>
>
>
>
>
>
>
>
> *From:* Sergiu Pojoga 
> *Sent:* Tuesday, December 19, 2023 12:18 AM
> *To:* Kamailio (SER) - Users Mailing List 
> *Cc:* faisal.jamil.k...@gmail.com
> *Subject:* Re: [SR-Users] Re: Kamailio - Ms Teams direct Routing -
> dispatcher issues | FLAGS: IP
>
>
>
> You didn't confirm if Contact was added to OPTIONS for local requests.
>
>
>
> In Teams <https://admin.teams.microsoft.com/direct-routing/v2> Admin
> Center <https://admin.teams.microsoft.com/direct-routing/v2>, do you have
> an enrolled SBC? What's the status of TLS, SIP OPTIONS and Enabled status?
>
>
>
> What's the result of: *kamcmd dns.lookup SRV
> _sips._tcp.sip.pstnhub.microsoft.com <http://tcp.sip.pstnhub.microsoft.com>*
>
>
>
> Can you ping sip.pstnhub.microsoft.com?
>
>
>
> On Mon, Dec 18, 2023 at 1:05 PM faisal.jamil.khan--- via sr-users <
> sr-users@lists.kamailio.org> wrote:
>
> kamctl dispatcher dump
> {
>   "jsonrpc":  "2.0",
>   "result": {
> "NRSETS": 1,
> "RECORDS":  [{
> "SET":  {
>   "ID": 1,
>   "TARGETS":  [{
>   "DEST": {
> "URI":  "sip:sip.pstnhub.microsoft.com:5061;transport=tls
> ",
> "FLAGS":  "IP",
> "PRIORITY": 3,
> "ATTRS":  {
>   "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:
> abcsbc.com",
>

[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
Voila, that's likely your problem.

*.onmicrosoft.com * domains are not eligible for
Direct Routing.

When activating the SBC, the UPN's domain part must be the same as the FQDN
of the SBC you're adding.

Essentially, you have to do it all within the *abcsbc.com
* AAD tenant, logged in as a superuser part of the
same *abcsbc.com
* domain, matching the SBC's FQDN.

Regards,
Sergiu
--

*Teams PBX connector with full MS Direct Routing automation for service
providers**Web*: https://teamsphone.net

On Mon, Dec 18, 2023 at 3:47 PM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> Kamailio is installed on AWS obviously behind NAT.
>
> Cert signed: Let's ecncrypt
>
> However, I have a questions here:
>
> I have a registered account at fai...@7v840c.onmicrosoft.com but the
> domain for which we created SBC is abcsbc.com and we have an active user
> faisal.ah...@abcsbc.com under the domain.
>
> We have created the SBC under voice routing on this account
> fai...@7v840c.onmicrosoft.com.
>
> SBC  Network effectiveness
>  TLS connectivity status SIP OPtions status
> abcsbc.com  0%
>  Inactive   Warning
>
> Is this the correct way to setup SBC under the main account or should I
> have to create the sbc by logging in to the account of
> faisal.ah...@abcsbc.com.
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
Ooops, obviously adjust the *-contact-uri* and *-fd* to your FQDN

Regards,
Sergiu
--

*Teams PBX connector with full MS Direct Routing automation for service
providers**Web*: https://teamsphone.net

On Mon, Dec 18, 2023 at 3:35 PM Sergiu Pojoga  wrote:

> Here's my last and best trick, which eliminates Kamailio entirely from
> being the culprit:
>
>
>
> *sipexer -options -contact-uri
> "sip:customers.teamsphone.net:5061;transport=tls" -fd
> "customers.teamsphone.net <http://customers.teamsphone.net>" -td
>  "sip.pstnhub.microsoft.com
> <http://sip.pstnhub.microsoft.com>;transport=tls" \-tls-insecure
> -tls-certificate "/usr/local/etc/kamailio/bundle.crt" -tls-key
> "/usr/local/etc/kamailio/privkey.pem" \-xh "Max-Forwards: 70" -ua
> "Ribbon-SIPGateway" "sip:sip.pstnhub.microsoft.com:5061;transport=tls"*
>
>
> If you don't get a reply from Microsoft.PSTNHub then something is
> awkwardly wrong in your setup, not related to Kamailio, likely Teams
> backend config or networking.
>
>
> Note:
>
> (1) adjust certs path to your case
>
> (2) install sipexer if you don't have it:
> https://github.com/miconda/sipexer
>
>
> Regards,
> Sergiu
> --
>
> *Teams PBX connector with full MS Direct Routing automation for service
> providers**Web*: https://teamsphone.net
>
>
>
> On Mon, Dec 18, 2023 at 3:23 PM faisal.jamil.khan--- via sr-users <
> sr-users@lists.kamailio.org> wrote:
>
>> new updated list according to the SRV records and after removing tls port.
>>
>> 1 sip:sip.pstnhub.microsoft.com;transport=tls 0 10
>> socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
>> 1 sip:sip2.pstnhub.microsoft.com;transport=tls 0 20
>> socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
>> 1 sip:sip3.pstnhub.microsoft.com;transport=tls 0 30
>> socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
>> 1 sip:sip4.pstnhub.microsoft.com;transport=tls 0 40
>> socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
Here's my last and best trick, which eliminates Kamailio entirely from
being the culprit:



*sipexer -options -contact-uri
"sip:customers.teamsphone.net:5061;transport=tls" -fd
"customers.teamsphone.net " -td
 "sip.pstnhub.microsoft.com
;transport=tls" \-tls-insecure
-tls-certificate "/usr/local/etc/kamailio/bundle.crt" -tls-key
"/usr/local/etc/kamailio/privkey.pem" \-xh "Max-Forwards: 70" -ua
"Ribbon-SIPGateway" "sip:sip.pstnhub.microsoft.com:5061;transport=tls"*


If you don't get a reply from Microsoft.PSTNHub then something is
awkwardly wrong in your setup, not related to Kamailio, likely Teams
backend config or networking.


Note:

(1) adjust certs path to your case

(2) install sipexer if you don't have it: https://github.com/miconda/sipexer


Regards,
Sergiu
--

*Teams PBX connector with full MS Direct Routing automation for service
providers**Web*: https://teamsphone.net



On Mon, Dec 18, 2023 at 3:23 PM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> new updated list according to the SRV records and after removing tls port.
>
> 1 sip:sip.pstnhub.microsoft.com;transport=tls 0 10
> socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
> 1 sip:sip2.pstnhub.microsoft.com;transport=tls 0 20
> socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
> 1 sip:sip3.pstnhub.microsoft.com;transport=tls 0 30
> socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
> 1 sip:sip4.pstnhub.microsoft.com;transport=tls 0 40
> socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
Also, try removing the port from dispatcher's destinations, URI like

*sip:sip.pstnhub.microsoft.com
<http://sip.pstnhub.microsoft.com>;transport=tls*
Regards,
Sergiu
--

*Teams PBX connector plus full MS Direct Routing automation**Web*:
https://teamsphone.net

On Mon, Dec 18, 2023 at 2:17 PM Sergiu Pojoga  wrote:

> You didn't confirm if Contact was added to OPTIONS for local requests.
>
> In Teams <https://admin.teams.microsoft.com/direct-routing/v2> Admin
> Center <https://admin.teams.microsoft.com/direct-routing/v2>, do you have
> an enrolled SBC? What's the status of TLS, SIP OPTIONS and Enabled status?
>
> What's the result of: *kamcmd dns.lookup SRV
> _sips._tcp.sip.pstnhub.microsoft.com <http://tcp.sip.pstnhub.microsoft.com>*
>
> Can you ping sip.pstnhub.microsoft.com?
>
> On Mon, Dec 18, 2023 at 1:05 PM faisal.jamil.khan--- via sr-users <
> sr-users@lists.kamailio.org> wrote:
>
>> kamctl dispatcher dump
>> {
>>   "jsonrpc":  "2.0",
>>   "result": {
>> "NRSETS": 1,
>> "RECORDS":  [{
>> "SET":  {
>>   "ID": 1,
>>   "TARGETS":  [{
>>   "DEST": {
>> "URI":  "sip:sip.pstnhub.microsoft.com:5061
>> ;transport=tls",
>> "FLAGS":  "IP",
>> "PRIORITY": 3,
>> "ATTRS":  {
>>   "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:
>> abcsbc.com",
>>   "DUID": null,
>>   "MAXLOAD":  0,
>>   "WEIGHT": 0,
>>   "RWEIGHT":  0,
>>   "SOCKET": "tls:172.31.19.8:5061",
>>   "SOCKNAME": null,
>>   "OBPROXY":  null
>> }
>>   }
>> }, {
>>   "DEST": {
>> "URI":  "sip:sip2.pstnhub.microsoft.com:5061
>> ;transport=tls",
>> "FLAGS":  "IP",
>> "PRIORITY": 2,
>> "ATTRS":  {
>>   "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:
>> abcsbc.com",
>>   "DUID": null,
>>   "MAXLOAD":  0,
>>   "WEIGHT": 0,
>>   "RWEIGHT":  0,
>>   "SOCKET": "tls:172.31.19.8:5061",
>>   "SOCKNAME": null,
>>   "OBPROXY":  null
>> }
>>   }
>> }, {
>>   "DEST": {
>> "URI":  "sip:sip3.pstnhub.microsoft.com:5061
>> ;transport=tls",
>> "FLAGS":  "IP",
>> "PRIORITY": 1,
>> "ATTRS":  {
>>   "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:
>> abcsbc.com",
>>   "DUID": null,
>>   "MAXLOAD":  0,
>>   "WEIGHT": 0,
>>   "RWEIGHT":  0,
>>   "SOCKET": "tls:172.31.19.8:5061",
>>   "SOCKNAME": null,
>>   "OBPROXY":  null
>> }
>>   }
>> }]
>> }
>>   }]
>>   },
>>   "id": 19731
>> }
>>
>>
>> My dispatcher settings.
>>
>> i am unable to get the trunk up with Microsoft . Can someone guide me how
>> to fix this issue?
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-18 Thread Sergiu Pojoga via sr-users
You didn't confirm if Contact was added to OPTIONS for local requests.

In Teams  Admin Center
, do you have an
enrolled SBC? What's the status of TLS, SIP OPTIONS and Enabled status?

What's the result of: *kamcmd dns.lookup SRV
_sips._tcp.sip.pstnhub.microsoft.com *

Can you ping sip.pstnhub.microsoft.com?

On Mon, Dec 18, 2023 at 1:05 PM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> kamctl dispatcher dump
> {
>   "jsonrpc":  "2.0",
>   "result": {
> "NRSETS": 1,
> "RECORDS":  [{
> "SET":  {
>   "ID": 1,
>   "TARGETS":  [{
>   "DEST": {
> "URI":  "sip:sip.pstnhub.microsoft.com:5061
> ;transport=tls",
> "FLAGS":  "IP",
> "PRIORITY": 3,
> "ATTRS":  {
>   "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:
> abcsbc.com",
>   "DUID": null,
>   "MAXLOAD":  0,
>   "WEIGHT": 0,
>   "RWEIGHT":  0,
>   "SOCKET": "tls:172.31.19.8:5061",
>   "SOCKNAME": null,
>   "OBPROXY":  null
> }
>   }
> }, {
>   "DEST": {
> "URI":  "sip:sip2.pstnhub.microsoft.com:5061
> ;transport=tls",
> "FLAGS":  "IP",
> "PRIORITY": 2,
> "ATTRS":  {
>   "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:
> abcsbc.com",
>   "DUID": null,
>   "MAXLOAD":  0,
>   "WEIGHT": 0,
>   "RWEIGHT":  0,
>   "SOCKET": "tls:172.31.19.8:5061",
>   "SOCKNAME": null,
>   "OBPROXY":  null
> }
>   }
> }, {
>   "DEST": {
> "URI":  "sip:sip3.pstnhub.microsoft.com:5061
> ;transport=tls",
> "FLAGS":  "IP",
> "PRIORITY": 1,
> "ATTRS":  {
>   "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:
> abcsbc.com",
>   "DUID": null,
>   "MAXLOAD":  0,
>   "WEIGHT": 0,
>   "RWEIGHT":  0,
>   "SOCKET": "tls:172.31.19.8:5061",
>   "SOCKNAME": null,
>   "OBPROXY":  null
> }
>   }
> }]
> }
>   }]
>   },
>   "id": 19731
> }
>
>
> My dispatcher settings.
>
> i am unable to get the trunk up with Microsoft . Can someone guide me how
> to fix this issue?
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-15 Thread Sergiu Pojoga via sr-users
I assumed you read the famous article on Teams Direct Routing for Kamailio
so I didn't bother mentioning it.

https://skalatan.de/en/blog/kamailio-sbc-teams

Regards,
Sergiu
--

*Teams PBX connector plus full MS Direct Routing automation**Web*:
https://teamsphone.net

On Fri, Dec 15, 2023 at 10:32 AM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> Where I can check that ?
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

2023-12-14 Thread Sergiu Pojoga via sr-users
FLAGS: *IP* - indicates inactive, probing. Can be many reasons.

Are you adding Kamailio's FQDN in the Contact for OPTIONS?

Regards,
Sergiu
--

*Teams PBX connector plus full MS Direct Routing automation**Web*:
https://teamsphone.net

On Thu, Dec 14, 2023 at 5:50 PM faisal.jamil.khan--- via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hi Team,
>
> I am trying to setup Kamailio with MS Teams Direct Routing and after
> resolving TLS issues now I am getting this at my dispatcher flags. Possible
> suggestions required.
>
> kamcmd dispatcher.list | egrep "URI|FLAGS"
> URI: sip:sip.pstnhub.microsoft.com
> :5061;transport=tls
> FLAGS: IP
> URI:
> sip:sip2.pstnhub.microsoft.com:5061;transport=tls
> FLAGS: IP
> URI:
> sip:sip3.pstnhub.microsoft.com:5061;transport=tls
> FLAGS: IP
>
>
> Dec 14 20:23:27 abcsbc.com /usr/sbin/kamailio[9479]: INFO: 

[SR-Users] Re: Standard on RTP ports

2023-12-13 Thread Sergiu Pojoga via sr-users
Aloha,

If we're talking about Rtpengine, it can easily be scaled further by
assigning an extra IP address.

Furthermore, for multi-homed with multiple local network interfaces with
different addresses and rtp port ranges, it can run on multiple daemon
instances, it can if I recall correctly it supports up to 64.

Regards

On Wed, Dec 13, 2023, 4:50 a.m. Richard Edmands via sr-users <
sr-users@lists.kamailio.org> wrote:

> Howdy,
>
> So you’ve got the reserved ports range 0-1023. Then there’s a few other
> brackets.
>
> In Linux there are kernel parameters to adjust these ranges, but it has
> been a few years.
>
> If we’re really at the stage where we are looking at increasing the size
> of the range, then looking into these parameters is also worth looking into
> on these rtp boxes.
>
> Typically a box wouldn’t be processing anywhere near the limits to be
> genuinely worth considering.
>
> But now that RTPEngine has Cuda offloading…
>
> > On 12 Dec 2023, at 2:46 am, Alex Balashov via sr-users <
> sr-users@lists.kamailio.org> wrote:
> >
> > Hello,
> >
> > Ports are allocated dynamically. Even ports are for RTP, odd ports are
> for RTCP. There is no standard that I am aware of, but common practice is
> for the lower bound to be UDP 8000. The upper bound varies, but can be as
> high as the logical maximum of 65535.
> >
> > -- Alex
> >
> >> On 8 Dec 2023, at 05:16, ZZ Wave via sr-users <
> sr-users@lists.kamailio.org> wrote:
> >>
> >> Hello.
> >>
> >> I have some rant with network security dept. Is there some standard,
> RFC, what port range should be used for RTP traffic, how RTP ports are
> selected during SIP call negotiation?
> >>
> >> Thanks.
> >> __
> >> Kamailio - Users Mailing List - Non Commercial Discussions
> >> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> >> Important: keep the mailing list in the recipients, do not reply only
> to the sender!
> >> Edit mailing list options or unsubscribe:
> >
> > --
> > Alex Balashov
> > Principal Consultant
> > Evariste Systems LLC
> > Web: https://evaristesys.com
> > Tel: +1-706-510-6800
> >
> > __
> > Kamailio - Users Mailing List - Non Commercial Discussions
> > To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> > Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> > Edit mailing list options or unsubscribe:
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] UAC DNS SRV timeout

2023-11-17 Thread Sergiu Pojoga via sr-users
Hi,

Setup: kamailio acting as a UAC needs to register with a server whose
outbound proxy is DNS SRV based only, there's no A record on the proxy's
FQDN. The provider advertises two SRV records.

;; ANSWER SECTION:
_sips._tcp.sip.provider.com. 10 IN SRV 10 50 5061 sip11-sip.provider.com.
_sips._tcp.sip.provider.com. 10 IN SRV 15 50 5061 sip10-sip.provider.com.

Everything was working fine, until the provider changed the SRV priority,
putting a lower priority on the host that is actually down at the moment.
In this case, sip11-sip.provider.com is DOWN and sip10-sip.provider.com is
UP.

Now, what's happening is Kamailio tries to REGISTER with the lower priority
host, gets no reply back (TCP connection doesn't get established). It then
takes 30 seconds for Kamailio to try the host with the higher priority,
registering successfully. And so it goes for every re-register: failure =>
30 seconds => register OK.

The same happens for INVITES to the downstream: INVITE => timeout => 30
seconds => INVITE (other host 200 OK).

I've tried to play with TCP and DNS params, but so far no luck: no matter
what I did - it took the same 30 seconds for Kamailio to detect failure and
retry the secondary host.

Any suggestions will be highly appreciated.

Kamailio 5.6.4 (x86_64/linux) 239d0a

tcp_connection_lifetime=3604
tcp_max_connections=60
tcp_connect_timeout=10
tcp_keepalive = yes
tcp_crlf_ping=yes
tcp_keepcnt=3
tcp_keepidle=30
tcp_keepintvl=30
tcp_reuse_port=1
tcp_accept_no_cl=yes
tcp_rd_buf_size=16384

use_dns_cache = on
use_dns_failover = on
dns_srv_loadbalancing = on
dns_try_naptr = on
dns_try_ipv6=no
dns_try_naptr=no
dns_use_search_list=no
dns_retr_time=1
dns_retr_no=3

Thanks
--Sergiu
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: periodic could not resolve hostname

2023-09-28 Thread Sergiu Pojoga via sr-users
Your suggestion led me to review the DNS settings and found
`dns_cache_negative_ttl=600` which kind of matches the occasional dns
outage period. Changes the value to 0 (disabled). Will see how it goes, so
far no more errors of this kind.

Thanks again Daniel.



On Thu, Sep 28, 2023 at 1:02 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> when this happens, can you look at the cache content and see if the
> corresponding record has negative_entry set to yes? If that's the case, the
> record was marked as bad (unresolvable due to a failed dns query or maybe
> blocklisting activated on 503).
>
> Cheers,
> Daniel
> On 28.09.23 14:48, Sergiu Pojoga via sr-users wrote:
>
> Aloha,
>
> I'm experiencing this internal DNS problem with Kamailio, can't seem to
> figure out what's causing it. Maybe someone can help.
>
> Essentially, from time to time (one or two times a day) this situation
> happens, starting with logs:
>
> linux kamailio[773]: ERROR: uac [uac_reg.c:1163]: uac_reg_send(): failed
> to send request for [some-uuid]
> linux kamailio[773]: ERROR:  [core/resolve.c:1730]:
> sip_hostport2su(): could not resolve hostname: "my.domain.net"
> linux kamailio[773]: ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "
> my.domain.net"
> linux kamailio[773]: ERROR: tm [uac.c:480]: t_uac_prepare(): no socket
> found
>
> # Do a Kamailio internal DNS lookup, no results found???
> root@linux:~# kamcmd dns.lookup a my.domain.net
> error: 400 - Not found
>
> # Do a system DNS lookup. All good.
> root@linux:~# dig my.domain.net
> ;; QUESTION SECTION:
> ;my.domain.net. IN A
> ;; ANSWER SECTION:
> my.domain.net. 18000 IN A 192.168.0.1
>
> # Delete internal Kamailio DNS record
> root@linux:~# kamcmd dns.delete_a my.domain.net
>
> # Lookup again right away. It's there, problem fixed. Why??
> root@linux:~# kamcmd dns.lookup a my.domain.net
> {
>   name: my.domain.net
>   type: A
>   size_bytes: 120
>   reference_counter: 2
>   permanent: no
>   expires: 7674
>   last_used: 0
>   negative_entry: no
>   records: {
>   {
>  rr_idx: 0
>  rr_ip: 192.168.0.1
>  rr_permanent: no
>  rr_expires: 7674
>   }
>}
> }
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>
> --
> Daniel-Constantin Mierla (@ asipto.com)twitter.com/miconda -- 
> linkedin.com/in/miconda
> Kamailio Consultancy - Training Services -- asipto.com
> Kamailio World Conference - kamailioworld.com
>
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] periodic could not resolve hostname

2023-09-28 Thread Sergiu Pojoga via sr-users
Aloha,

I'm experiencing this internal DNS problem with Kamailio, can't seem to
figure out what's causing it. Maybe someone can help.

Essentially, from time to time (one or two times a day) this situation
happens, starting with logs:

linux kamailio[773]: ERROR: uac [uac_reg.c:1163]: uac_reg_send(): failed to
send request for [some-uuid]
linux kamailio[773]: ERROR:  [core/resolve.c:1730]:
sip_hostport2su(): could not resolve hostname: "my.domain.net"
linux kamailio[773]: ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "
my.domain.net"
linux kamailio[773]: ERROR: tm [uac.c:480]: t_uac_prepare(): no socket found

# Do a Kamailio internal DNS lookup, no results found???
root@linux:~# kamcmd dns.lookup a my.domain.net
error: 400 - Not found

# Do a system DNS lookup. All good.
root@linux:~# dig my.domain.net
;; QUESTION SECTION:
;my.domain.net. IN A
;; ANSWER SECTION:
my.domain.net. 18000 IN A 192.168.0.1

# Delete internal Kamailio DNS record
root@linux:~# kamcmd dns.delete_a my.domain.net

# Lookup again right away. It's there, problem fixed. Why??
root@linux:~# kamcmd dns.lookup a my.domain.net
{
  name: my.domain.net
  type: A
  size_bytes: 120
  reference_counter: 2
  permanent: no
  expires: 7674
  last_used: 0
  negative_entry: no
  records: {
  {
 rr_idx: 0
 rr_ip: 192.168.0.1
 rr_permanent: no
 rr_expires: 7674
  }
   }
}
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: DISABLE SDP MEDIA STREAMS

2023-05-29 Thread Sergiu Pojoga
Can't you achieve the desired manipulations using the SDPOPS module?


https://www.kamailio.org/docs/modules/devel/modules/sdpops.html


On Mon, May 29, 2023, 5:39 a.m. Patrick Karton 
wrote:

> Hello kamailio community,
>
> i know its an unusual query but i would like to know if there is a
> cleaner/proper.right way to disable some  (or all) media streams in SDP.
>
> i have come with a solution by sdpops module with subst_body function like
> this.
>
> route[SDP_DISABLE_UNAUTHORIZED_MEDIA]{
> # disable text,media and video media streams
> subst_body('#^m=(video|text|audio)[ ]+[0-9/]+(.*)$#m=\1 0 \2#ig');
>
> # update originator ip address
> subst_body('#^o=([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)[ ]+([^
> ]+)$#o=\1 \2 \3 \4 \5 7.7.7.7#ig');
> #  1 2 2   45 6
> # namesid  snumber networknet-type addr
>
> # update connection ip address
> subst_body('#^c=([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)$#c=\1 \2 7.7.7.7#ig');
> #  12 3
> # networknet-type   addr
>
> #remove all media attributes
> sdp_remove_line_by_prefix("a=fmtp");
> sdp_remove_line_by_prefix("a=X-");
> sdp_remove_line_by_prefix("a=rtcp");
> sdp_remove_line_by_prefix("a=ssrc");
> sdp_remove_line_by_prefix("a=sendrecv");
> sdp_remove_line_by_prefix("a=sendonly");
> sdp_remove_line_by_prefix("a=recvonly");
> sdp_remove_line_by_prefix("a=inactive");
> sdp_remove_line_by_prefix("b=");
>
> }
>
>
> is it the right way to do it. if not can someone provide me an alternative
> solution.
>
> Thanks :)
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: TLS1.2 ciphers

2023-04-14 Thread Sergiu Pojoga
> modparam("tls", "renegotiation", 1)
Tried to no positive result. Still getting "*SSL3_GET_CLIENT_HELLO:no
shared cipher*" error and server doesn't list any ECDHE suite ciphers.

*> From the docs [1] "TLSv1.2+" seems to require openssl v1.1.1 at least.*
I don't see it that way. Nmap test shows TLSv1.2 is supported, but missing
the desired ECDHE cipher suite. Also, some less stringent clients in terms
of ciphers do connect fine over TLS1.2

*> Can you try "TLSv1.1+" or "TLSv1.2" instead?*
Tried - didn't make a diff.

I guess the question here boils down to the following: if local OpenSSL
lists the ciphers as supported, why does a locally compiled Kamailio
doesn't support them? Is there a way to compile Kamailio's TLS module
differently to overcome this?

Thanks.

On Fri, Apr 14, 2023 at 2:34 PM Lukas Tribus  wrote:

> Hello,
>
>
> > OS:
> >
> > outdated Debian 8 Jessie
> > OpenSSL 1.0.1t  3 May 2016
> > openssl ciphers -v | grep 'ECDHE-RSA-AES256-GCM-SHA384'
> > ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA  Enc=AESGCM(256)
> Mac=AEAD
> >
> >
> > # kamailio -V
> > version: kamailio 5.5.6 (x86_64/linux) ad1244
> > 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_BLOCKLIST,
> 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.
> > compiled on 21:08:20 Apr 13 2023 with gcc 4.9.2
> >
> > modparam("tls", "cipher_list", "ALL")
> > method = TLSv1.2+
> >
> > Elliptic Curve Diffie-Hellman (EDCH)-Ciphers are only supported in
> OpenSSL 1.0.0e and later.
> >
> > Any suggestions?
>
> From the docs [1] "TLSv1.2+" seems to require openssl v1.1.1 at least.
> Can you try "TLSv1.1+" or "TLSv1.2" instead?
>
>
> Lukas
>
> [1]
> https://kamailio.org/docs/modules/devel/modules/tls.html#tls.p.tls_method
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] TLS1.2 ciphers

2023-04-14 Thread Sergiu Pojoga
Hi gang,

Trying to figure out why Kamailio won't negotiate specific TLS1.2
ciphers, such as for example TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 i.e.
*ECDHE-RSA-AES256-GCM-SHA384*

OpenSSL lists the cipher as supported, however Kamailio won't negotiate it:

# nmap --script ssl-enum-ciphers -p 5061 mysbc.domain.com
PORT STATE SERVICE
5061/tcp open  sip-tls
| ssl-enum-ciphers:
|   TLSv1.2:
| ciphers:
|   TLS_RSA_WITH_AES_256_GCM_SHA384 (rsa 2048) - A
|   TLS_RSA_WITH_AES_256_CBC_SHA256 (rsa 2048) - A
|   TLS_RSA_WITH_AES_256_CBC_SHA (rsa 2048) - A
|   TLS_RSA_WITH_CAMELLIA_256_CBC_SHA (rsa 2048) - A
|   TLS_RSA_WITH_AES_128_GCM_SHA256 (rsa 2048) - A
|   TLS_RSA_WITH_AES_128_CBC_SHA256 (rsa 2048) - A
|   TLS_RSA_WITH_AES_128_CBC_SHA (rsa 2048) - A
|   TLS_RSA_WITH_SEED_CBC_SHA (rsa 2048) - A
|   TLS_RSA_WITH_CAMELLIA_128_CBC_SHA (rsa 2048) - A
|   TLS_RSA_WITH_RC4_128_SHA (rsa 2048) - C
|   TLS_RSA_WITH_RC4_128_MD5 (rsa 2048) - C
|   TLS_RSA_WITH_3DES_EDE_CBC_SHA (rsa 2048) - C
| compressors:
|   NULL
| cipher preference: server
| warnings:
|   64-bit block cipher 3DES vulnerable to SWEET32 attack
|   Broken cipher RC4 is deprecated by RFC 7465
|   Ciphersuite uses MD5 for message integrity
|_  least strength: C

OS:

   - outdated Debian 8 Jessie
   - OpenSSL 1.0.1t  3 May 2016
   - openssl ciphers -v | grep '*ECDHE-RSA-AES256-GCM-SHA384*'
   - ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA
Enc=AESGCM(256) Mac=AEAD


# kamailio -V
version: kamailio 5.5.6 (x86_64/linux) ad1244
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_BLOCKLIST,
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.
compiled on 21:08:20 Apr 13 2023 with gcc 4.9.2

modparam("tls", "cipher_list", "ALL")
method = TLSv1.2+

Elliptic Curve Diffie-Hellman (EDCH)
-Ciphers
are only supported in OpenSSL 1.0.0e and later.

Any suggestions?

Thanks.
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Germany unsure about whether Kamailio will survive next winter

2023-04-01 Thread Sergiu Pojoga
Outrageous and worrisome news on this remarkable date!

On Sat, Apr 1, 2023, 11:07 a.m. Alex Balashov 
wrote:

> For immediate release:
>
> ATLANTA, GA (1 April 2023)--The Federal Ministry for Economic Affairs and
> Energy of Germany was forced to disclose today that it has been tasked with
> assessing whether Germany will be able to operate its Kamailio through the
> next
> winter.
>
> This initiative comes amidst considerable uncertainty, shared in some
> other EU
> member states, about whether the enormous fossil fuel energy footprint of
> Kamailio is sustainable after the Russian invasion of Ukraine in early
> 2022.
>
> Pioneering Atlanta energy market analysts Evariste Systems were tapped to
> assist with forecasting whether German strategic natural gas reserves and
> liquefied natural gas (LNG) imports could keep Kamailio's enormous turbines
> spinning under a variety of stress-test scenarios outlined by regulators,
> including SIPP and SIPVicious.
>
> Alex Balashov, Evariste's principal, said in a news conference earlier this
> week:
>
> "Simply put, the political leadership wanted a dispassionate, technocratic
> kind
> of analysis, data-driven and the rest, free of the inflection of
> ideological
> bias and tendentious policy angles in charged German domestic
> politics. Whether it's the centre-right or the Greens, there are strong
> ideas
> about what to do with energy-greedy megaprojects like Kamailio."
>
> Florida-based energy turnaround vet Fred Posner, parachuted in to assist
> with
> the fast-tracked study, agreed:
>
> "It's well-understood that the German GDP is almost a perfectly linear
> function
> of gross annual SIP packets routed. The Nord Stream 1 shut-off situation in
> September only exposed Germany to further Kamailio-related energy
> vulnerabilities."
>
> At issue are the basic physics of SIP message routing in Kamailio. Due to a
> fixed-size worker process pool, Kamailio routing consumes about 1500 BTUs
> per
> packet-kilometre travelled.  While 1500 BTUs/packet-kilometre is efficient
> in
> distance terms as compared to a typical automobile, which consumes roughly
> 3800
> BTUs of fossil fuel energy per passenger-kilometre travelled (at typical
> load
> factors), the dizzying number of SIP packets routed through German
> territory in
> a typical business day greatly outstrips passenger-kilometres travelled.
>
> Balashov noted that sometimes, the activation energy requirement can be
> higher
> than 1500 BTUs when INVITEs with large SDPs are launched toward the next
> hop,
> though this varies with the altitude of the destination above mean sea
> level,
> wind direction, weather and other factors involved in ballistics.
>
> "It's a bit of a fool's errand to play these guessing games with averages.
> The
> energy budget can vary enormously depending on whether there is DTLS, video
> codecs, PASSporTs and other stuff. I find it helpful to think in
> kilowatt-hour
> terms: sometimes it's less than half a kWh, so like US $0.20 if you're
> counting
> the beans, and sometimes it's more like $0.38, we just don't know. The
> Bundestag always wants these big, round numbers, but if you've ever looked
> at
> the TM module, you know that's not how this works."
>
> A milder-than-expected winter, a 9% year-over-year increase in US LNG
> exports
> (to about 300 million cubic metres per day) in 2022, dependable imports
> from
> Norway and the Netherlands, and other favourable factors gave German SIP
> regulators a reprieve. Despite energy market volatility, premium LNG spot
> prices, and occasional 408 Request Timed Out scenarios, the country dodged
> a
> widely-feared Kamailio energy crisis. However, it is difficult to say
> whether
> energy market conditions will be as propitious next year.
>
> "Then there's the whole climate change goals thing. Nobody even wants to
> talk
> about that, especially for the WebRTC gateway side," says Posner.
>
> "There's a persistent fantasy that we can just power Kamailio with solar or
> wind if we just had enough generating capacity. I think that's really
> missing
> the forest for the trees. The worker processes stay running whether you
> need
> them or not, it all depends on how many listeners you have set and what the
> children config value is. Either way, I've got two words for you: base
> load.
> Even if we completely ignore that the energy density is just not there per
> hectare of solar or wind installation, how do you provide the constant
> power to
> the child processes?"
>
> Past feasibility studies published jointly by Balashov and Posner support
> this
> assessment. One such study, initiated in 2018 and concluded during the
> COVID-19
> global pandemic, found that an area equivalent to the size of the entire
> state
> of North Rhine-Westphalia would need to be devoted to batteries, even
> using the
> latest lithium ferrous phosphate (LFP) technology.
>
> "But wait, there's more!" says Posner: "Show me the amperage."
>
> "The packet forwarding 

[SR-Users] Re: Dispatcher Incoming

2023-03-13 Thread Sergiu Pojoga
When the issue surfaced years ago, Asterisk 18 wasn't even out yet. Must
have been fixed quietly without backport to older versions.

On Mon, Mar 13, 2023, 10:21 p.m. Alex Balashov 
wrote:

> Interesting.
>
> Path is only applicable to registrations.
>
> > On Mar 13, 2023, at 9:30 PM, Jawaid Bazyar  wrote:
> >
> > Hi,
> >
> > For what it's worth, I am successfully using Path with Asterisk+pjsip ..
> >
> > endpoint registers through Kamailio to Asterisk;
> > asterisk remembers path;
> > asterisk uses path when dialing endpoint with Dial(PJSIP/endpointid)
> >
> > You have to enable a setting "support_path" ="yes" in the endpoint
> configuration.
> >
> > Asterisk 18.10.0~dfsg+~cs6.10.40431411-2, Copyright (C) 1999 - 2021,
> Sangoma Technologies Corporation and others.
> >
> > I believe there is a different issue with path support on non-registered
> 'trunks'.
> >
> > Jawaid
> >
> >
> > On 1/4/23, 11:16 AM, "Henning Westerholt"  h...@gilawa.com>> wrote:
> >
> >
> > Hello Alex,
> >
> >
> > I completely agree to your point regarding the product management topic.
> >
> >
> > Some of our customers are also doing upgrades from chan_sip to
> chan_pjsip right now. Let's see if they are affected, then I could have a
> closer look to that code. In case there is a fix, I will let you (and the
> list know), for sure.
> >
> >
> > Cheers,
> >
> >
> > Henning
> >
> >
> > --
> > Henning Westerholt - https://skalatan.de/blog/ <
> https://skalatan.de/blog/>
> > Kamailio services - https://gilawa.com 
> >
> >
> > -Original Message-
> > From: Alex Balashov  abalas...@evaristesys.com>>
> > Sent: Wednesday, January 4, 2023 6:27 PM
> > To: Kamailio (SER) - Users Mailing List  >
> > Subject: [SR-Users] Re: Dispatcher Incoming
> >
> >
> >
> >
> >> On Jan 4, 2023, at 12:17 PM, Henning Westerholt  h...@gilawa.com>> wrote:
> >>
> >> so far, we did not have any customer that need this functionality.
> >
> >
> > I've had numerous customers who have needed the functionality, and ended
> up having to use something like the "imaginative" Contact workaround
> instead.
> >
> >
> > I suppose it's hard to say whether the functionality was strictly
> necessary or born of a more puristic sensibility about how to make the
> proxy trapezoid work. :-)
> >
> >
> > However, a very common scenario for us is a customer from chan_sip to
> chan_pjsip, and having previously relied on Path support because it existed
> in chan_sip for approximately a decade. This means we had to totally
> rearchitect their systems, some of which have been very stable for about
> that long.
> >
> >
> > No, it's not that I'm entitled and think open-source projects owe us
> something for free, of course. But from a product management point of view,
> I think this is quite embarrassing. It's better to never have offered Path
> at all than to implement it (with considerable fanfare at the time!), then
> break it via a mandatory and quite controversial upgrade path (chan_sip ->
> chan_pjsip), then obstinately refuse to fix it.
> >
> >
> > -- Alex
> >
> >
> > --
> > Alex Balashov
> > Principal Consultant
> > Evariste Systems LLC
> > Web: https://evaristesys.com 
> > Tel: +1-706-510-6800
> >
> >
> > __
> > Kamailio - Users Mailing List - Non Commercial Discussions To
> unsubscribe send an email to sr-users-le...@lists.kamailio.org  sr-users-le...@lists.kamailio.org>
> > Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> > Edit mailing list options or unsubscribe:
> > __
> > Kamailio - Users Mailing List - Non Commercial Discussions
> > To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> 
> > Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> > Edit mailing list options or unsubscribe:
> >
> >
> >
> >
> > __
> > Kamailio - Users Mailing List - Non Commercial Discussions
> > To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> > Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> > Edit mailing list options or unsubscribe:
>
> --
> Alex Balashov
> Principal Consultant
> Evariste Systems LLC
> Web: https://evaristesys.com
> Tel: +1-706-510-6800
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org

[SR-Users] Re: OT: path support fix for asterisk

2023-03-02 Thread Sergiu Pojoga
Thanks for the heads up Henning. Finally some good news.

Just posted a comment in the original years-long case
 asking if this fix
can be backported to at least Asterisk 16.

On Thu, Mar 2, 2023 at 2:44 PM Henning Westerholt  wrote:

> Hello,
>
>
>
> It’s off-topic, but it was several times discussed here on the list.
>
>
>
> It seems that the upcoming 18.17 and 20.2 asterisk version seems to
> properly support path headers. From the announcement:
>
>
>
> ·  [ASTERISK-30100
> ] -
>
> res_pjsip: Path is ignored on INVITE to endpoint
> (Reported by Yury Kirsanov)
>
>
>
> This bug has been many years open.  have not tried it yet, but it looks
> promising.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Dispatcher Incoming

2023-01-03 Thread Sergiu Pojoga
Interesting workaround Alex, thanks for sharing.

For those who are looking for a less convoluted solution - may I suggest
setting endpoint's *outbound_proxy* value to Kamailio's address, such
as *sip:proxy.mydomain.com
\;lr*

Clearly, the above suggested solution doesn't do the trick for all possible
scenarios, mainly because it's static thus not suitable for redundancy, but
it may work for many (that's also probably the logic for Digium to ignore
it for so long).

Regards,

On Tue, Jan 3, 2023 at 1:58 PM Alex Balashov 
wrote:

> Path support in upstream PJSIP is broken, from what I'm given to
> understand. This is a regression from a capability that was (finally) added
> to chan_sip in Asterisk 12.
>
> Digium/Sangoma have clearly stated that they have no interest to fix:
>
> https://issues.asterisk.org/jira/browse/ASTERISK-28211
>
> As stated in the comments on that JIRA issue, "There is no timeline." I'm
> not sure what the logic is. I think it's something like, "Nobody uses
> proxies" ?? Not sure.
>
> Our generally accepted "fix" for this is to hack the Path hop into the
> Contact header of the registrant before relaying the REGISTER upstream, so
> that registrations appear to Asterisk to come "from" Kamailio. This
> requires careful management and stateful reversion of the Contact value
> (i.e. in the RURI of incoming requests), making it a brittle and suboptimal
> solution. But when "there is no timeline", what can you do?
>
> 
>
> modparam("htable", "htable", "contacts=>size=18;autoexpire=300;")
>
> request_route {
> ...
>
> if(method == "REGISTER") {
>...
> route(CONTACT_SPOOF_ENCODE);
> t_on_reply("REGISTER_REPLY_FROM_PBX");
> }
>
> else if(src == PBX) {
> # Request destined for registrant, e.g. INVITE.
>
> route(CONTACT_SPOOF_DECODE);
> }
> }
>
> onreply_route[REGISTER_REPLY_FROM_PBX] {
> if(!method == "REGISTER")
> return;
>
> # If we are channeling a 200 OK for a register, it is very important to
> # restore the exact Contact binding registered by the UA, together with
> # all of its parameters, so that the UA comes to believe the binding
> # has been properly established.
>
> if($rs == 200)
> route(CONTACT_SPOOF_DECODE);
> }
>
> # This routine gets around the lack of Path support in upstream registrars
> by
> # encoding the original Contact domain as a supplementary parameter and
> attaching
> # it to the Contact binding. This can then be recovered on inbound
> requests.
>
> route[CONTACT_SPOOF_ENCODE] {
> $var(hash_key) = $(ct{s.sha256});
> $sht(contacts=>$var(hash_key)) = $ct;
> remove_hf("Contact");
> append_hf("Contact: \r\n");
> }
>
> # Use `cthash` parameter to retrieve original contact from `htable` if
> present,
> # and replace. We do this in a contextually sensitive way, extracting
> `cthash`
> # from the Contact header in a reply and from the RURI if it is a request.
>
> route[CONTACT_SPOOF_DECODE] {
> $var(ct) = $null;
>
> if(t_is_request_route())
> $var(ct) = $ru;
> else if(t_is_reply_route())
> $var(ct) = $(ct{nameaddr.uri}); # Unbracket the URI field.
>
> if(strempty($(var(ct){param.value,cthash}))) {
> if(t_is_request_route())
> sl_send_reply("500", "Internal server error - missing ct");
>
> xlog("L_INFO", "[R-CONTACT-SPOOF-DECODE:$ci] !> Unable to extract
> 'cthash' URI parameter\n");
> exit;
> }
>
> $var(ct_key) = $(var(ct){param.value,cthash});
>
> # Likewise error out if we cannot translate to the real contact, since
> there's
> # no point in sending an adulterated contact to the UA.
>
> if($sht(contacts=>$var(ct_key)) eq $null) {
> if(t_is_request_route())
> sl_send_reply("500", "Internal server error - cannot map ct");
>
> xlog("L_INFO", "[R-CONTACT-SPOOF-DECODE:$ci] !> cthash key does
> not map to a contact!\n");
> exit;
> }
>
> if(t_is_request_route())
> $ru = $(sht(contacts=>$var(ct_key)){nameaddr.uri});
> else {
> remove_hf("Contact");
> append_hf("Contact: $sht(contacts=>$var(ct_key))\r\n");
> }
> }
>
> -- Alex
>
> > On Jan 3, 2023, at 1:17 PM, nutxase  wrote:
> >
> > Using chan_pjsip
> >
> >
> >
> >
> > Sent with Proton Mail secure email.
> >
> > --- Original Message ---
> > On Tuesday, January 3rd, 2023 at 5:36 PM, Alex Balashov <
> abalas...@evaristesys.com> wrote:
> >
> >
> >> Are you using chan_pjsip or chan_sip in Asterisk?
> >>
> >>> On Jan 3, 2023, at 12:26 PM, nutxase nutx...@proton.me wrote:
> >>>
> >>> Hi All
> >>>
> >>> I have setup kamailio using dispatcher to proxy registrations from the
> UAC to asterisk
> >>> but when asterisk sends an incoming call it does not seem to keep the
> path header and therefore kamailio sends 404
> >>> is there anyway around this?
> >>>
> >>> Thanks
> >>>
> >>> Sent with Proton Mail secure email.
> >>>
> 

[SR-Users] Re: Dispatcher Incoming

2023-01-03 Thread Sergiu Pojoga
It is my unfortunate duty to tell you that…

https://lists.kamailio.org/pipermail/sr-users/2021-May/112628.html
https://www.mail-archive.com/sr-users@lists.kamailio.org/msg15253.html



On Tue, Jan 3, 2023 at 1:27 PM nutxase  wrote:

> Using chan_pjsip
>
>
>
>
> Sent with Proton Mail secure email.
>
> --- Original Message ---
> On Tuesday, January 3rd, 2023 at 5:36 PM, Alex Balashov <
> abalas...@evaristesys.com> wrote:
>
>
> > Are you using chan_pjsip or chan_sip in Asterisk?
> >
> > > On Jan 3, 2023, at 12:26 PM, nutxase nutx...@proton.me wrote:
> > >
> > > Hi All
> > >
> > > I have setup kamailio using dispatcher to proxy registrations from the
> UAC to asterisk
> > > but when asterisk sends an incoming call it does not seem to keep the
> path header and therefore kamailio sends 404
> > > is there anyway around this?
> > >
> > > Thanks
> > >
> > > Sent with Proton Mail secure email.
> > >
> > > __
> > > Kamailio - Users Mailing List - Non Commercial Discussions
> > > To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> > > Important: keep the mailing list in the recipients, do not reply only
> to the sender!
> > > Edit mailing list options or unsubscribe:
> >
> >
> > --
> > 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 - Users Mailing List - Non Commercial Discussions
> > To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> > Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> > Edit mailing list options or unsubscribe:
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Dispatcher Incoming

2023-01-03 Thread Sergiu Pojoga
https://issues.asterisk.org/jira/browse/ASTERISK-28211

3+ yrs and counting since we are waiting on a fix from Digium...

On Tue, Jan 3, 2023 at 1:01 PM Alex Balashov 
wrote:

> Are you using chan_pjsip or chan_sip in Asterisk?
>
> > On Jan 3, 2023, at 12:26 PM, nutxase  wrote:
> >
> > Hi All
> >
> > I have setup kamailio using dispatcher to proxy registrations from the
> UAC to asterisk
> > but when asterisk sends an incoming call it does not seem to keep the
> path header and therefore kamailio sends 404
> > is there anyway around this?
> >
> > Thanks
> >
> > Sent with Proton Mail secure email.
> > __
> > Kamailio - Users Mailing List - Non Commercial Discussions
> > To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> > Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> > Edit mailing list options or unsubscribe:
>
> --
> 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 - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


Re: [SR-Users] Limit cps per destination gw

2022-07-28 Thread Sergiu Pojoga
Pipelimit module, specifically pl_check function is very much capable of
doing CPS per GW, TAILDROP algorithm.

https://www.kamailio.org/docs/modules/devel/modules/pipelimit.html#pipelimit.f.pl_check

On Thu, Jul 28, 2022 at 2:20 PM Jon Bonilla (Manwe) 
wrote:

> El Thu, 28 Jul 2022 18:08:33 +
> Henning Westerholt  escribió:
>
> > Hi,
> >
> > pipelimit allows dynamic queues from a DB. But if you want to limit
> > concurrent calls, the best option is probably using dialog profiles with
> the
> > dialog modules. For a cps limit you could also just use htable.
> >
> > Cheers,
> >
>
> Hi Henning
>
> No, concurrent calls is not the issue. CAPS is.
>
> pipelimit seems promising. Don't like the db backend requirement. I guess
> I can
> use dbtext, leave it blank and create pipes on demand with pl_check and
> read
> the limit from a custom header. This system doesn't have db backend as
> it's a
> loadbalancer for multiple kamailio servers and needs to be fast as hell.
>
>
> thank you
>
> Jon
>
>
> --
> PekePBX, the multitenant PBX solution
> https://pekepbx.com
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Client behind nat without stun and kamailio behind NAT

2022-07-08 Thread Sergiu Pojoga
Can't tell what exactly is wrong with the whole logic of your script, most
likely a couple of things, without spending an entire day troubleshooting
it. Instead, can highlight a few things that may help:

   1. do yourself a big favor and put Kamailio on a public IP or dst_nat
   SIP to it, unless you plan on running a VoIP business off a home internet
   or something
   2. for REGISTER, if you final Registrar supports *PATH*, you don't need
   to also *set_contact_alias()* on top of *add_path_received()*. You
   either do one approach or the other.
   3. Invites and others originating from the PBX, having the preset *Route*,
   must simply be handled by *loose_route() *in combination with
*modparam("path",
   "use_received", 1)*. All that convoluted *$du* manipulation that you are
   doing trying to compile it from the Route header is totally unnecessary.

Keep trying, you aren't far from figuring it out.

Regards,
--Sergiu

On Fri, Jul 8, 2022 at 10:30 AM Алексей Якимкин  wrote:

> Hello,
>
> I hope somebody could help me.
>
> This is my scheme.
> User-agent is behind NAT1. Kamailio and pbx are behind NAT2
> [Client ip-phone 192.168.89.213 without stun] - LAN1 - NAT1(46.0.0.30) -
> (internet) - (51.0.0.60)NAT2 - Local2 - (10.130.0.23:5060)kamailio(
> 10.130.0.23:5070) - pbx
>
> *Questions*:
> *1*. The VIA header (with 10.130.0.23 and 51.0.0.60) wasn't included in
> SIP packets. Why? For example 200OK reply. It came from pbx through
> kamailio. Which setting could break it?
>
> Session Initiation Protocol (200)
> Status-Line: SIP/2.0 200 OK
> Message Header
> Via: SIP/2.0/UDP 192.168.89.213:5060
> ;rport=9570;received=46.0.0.30;branch=z9hG4bK2480172053
> Record-Route: 
> Record-Route: 
> Record-Route:  ;r2=on;lr;ftag=4268683942;nat=yes>,
> From: "Aleksey"  >;tag=4268683942
> To:  >;tag=A03E2397-404246-FA7543E4_jizmelr-582D
> Call-ID: 6_1903330087@192.168.89.213
> [Generated Call-ID: 6_1903330087@192.168.89.213]
> CSeq: 2 INVITE
> Contact:  ;alias=51.0.0.60~5060~1>
> Supported: 100rel,timer,replaces,histinfo,precondition
> Allow:
> INVITE,BYE,CANCEL,ACK,OPTIONS,INFO,MESSAGE,PRACK,UPDATE,REFER
> Session-Expires: 1800;refresher=uas
> Content-Type: application/sdp
> Content-Length: 1170
> Message Body
>
>
> *2*. About Registrar, Path and $du.
> Phone set Register with headers:
>  Via: SIP/2.0/UDP 192.168.89.213:5060;branch=z9hG4bK2691182696
> From: "Aleksey"  >;tag=3926879477
> To: "Aleksey" 
> Contact: 
> Kamailio respond
> Via: SIP/2.0/UDP 192.168.89.213:5060
> ;rport=9570;received=46.0.0.30;branch=z9hG4bK617463686
> Path:  ;lr;received=46.0.0.30~9570~1;r2=on>,
> From: "Aleksey"  >;tag=3926879477
> To: "Aleksey" ;tag=194ED16D
> Contact: ;expires=360
> Contact: ;expires=247
> Contact: ;expires=2116
>
> I try to make a call from pbx to ip phone.
> pbx inserts in Invite header Route:  ;lr;received=46.0.0.30~9570~1;r2=on>
> But kamailio relayed Invite direct to 192.168.89.213. (There is network
> connectivity  between ip-phone and kamailio  through vpn). The code below
> helps me to solve my issue. I saw mail-list with similar trouble. But no
> setting could get kamailio to relay Invite to "Route-received" ip.
>
>
> $var(the_route) = $hdr(Route);
> $var(route0) = $(var(the_route){s.select,0,,});
> $var(new_host) =
> $(var(route0){param.value,received}{s.select,0,~});
> $var(new_port) =
> $(var(route0){param.value,received}{s.select,1,~});
> if (!strempty($var(new_host)) && !strempty($var(new_port)) ) {
> $du = "sip:" + $var(new_host) + ":" + $var(new_port);
> }
>
> *Kamailio settings:*
> I have such listeners
> listen=udp:10.130.0.23:5070 # to local network
> listen=udp:10.130.0.23:5060 advertise 51.0.0.60:5060 # to internet
>
> #MODULE SETTING
> #---
> # - jsonrpcs params -
> modparam("jsonrpcs", "pretty_format", 1)
> /* set the path to RPC fifo control file */
> # modparam("jsonrpcs", "fifo_name", "/var/run/kamailio/kamailio_rpc.fifo")
> /* set the path to RPC unix socket control file */
> # modparam("jsonrpcs", "dgram_socket",
> "/var/run/kamailio/kamailio_rpc.sock")
>
> modparam("path", "use_received", 1)
> modparam("path", "enable_r2", 1)
> modparam("path", "received_format", 1)
>
> # - ctl params -
> /* set the path to RPC unix socket control file */
> # modparam("ctl", "binrpc", "unix:/var/run/kamailio/kamailio_ctl")
>
> # - tm params -
> # auto-discard branches from previous serial forking leg
> modparam("tm", "failure_reply_mode", 3)
> # default retransmission timeout: 30sec
> modparam("tm", "fr_timer", 3)
> # default invite retransmission timeout after 1xx: 120sec
> modparam("tm", "fr_inv_timer", 12)
> modparam("tm", "auto_inv_100_reason", "Trying")
>
> # - rr params -
> # set next 

Re: [SR-Users] How to call RPC functions from script

2022-07-04 Thread Sergiu Pojoga
https://kamailio.org/docs/modules/devel/modules/jsonrpcs.html#jsonrpcs.f.jsonrpc_exec

Regards,
--Sergiu

On Mon, Jul 4, 2022 at 7:33 AM Marat Gareev  wrote:

> Hello!
>
> Is it possible to call RPC functions from script?
> In particular, I'm interested in the ability to add new groups to the
> dispatcher.
>
> https://kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.r.add
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Record-Route advertised per branch

2022-06-16 Thread Sergiu Pojoga
I just did this quick POC test which worked as expected, it added a single
RR with public advertised and double RR with both public and private
advertise for the branch that routes to a private interface.

Prerequisites:

   - mhomed=1
   - modparam("rr", "enable_double_rr", 1)
   - listen=YOUR_PUB_IP advertise "your_private_fqdn"
   - listen=YOUR_PRIV_IP advertise "your_priv_fqdn"
   - 10.22.0.0/24 is the private net

Script:

request_route {
   record_route();
   seturi("sip:a...@google.com");
   append_branch("sip:b@10.22.0.1", "1.0");
   t_relay();
}

Give it a try.

On Thu, Jun 16, 2022 at 10:36 AM Sergiu Pojoga  wrote:

> Have you tried just *record_route()* with *enable_double_rr* option
> enabled? All things considered, RR should take care of it all by itself,
> per branch.
>
> A script snippet could help.
>
> On Thu, Jun 16, 2022 at 10:05 AM Patrick Karton 
> wrote:
>
>> It only work for request route.
>>
>> Le 16 juin 2022 14:19, Ilie Soltanici  a écrit :
>>
>> Hello,
>>
>> Thank you, added it now - still the same, unfortunately.
>>
>> Regards,
>>
>> On Thu, 16 Jun 2022 at 13:29, Sergiu Pojoga  wrote:
>>
>> Have you tried calling *t_save_lumps()* before relaying, even before RR?
>>
>> On Thu, Jun 16, 2022 at 7:59 AM Ilie Soltanici 
>> wrote:
>>
>> Hello,
>>
>> Is there any way to advertise a different IP Address in the Record-Route
>> header individually per branch?
>>
>> I have a setup here - where Kamailio is listening on 2 different
>> interfaces: Local IP and External IP. At the moment if the packet is coming
>> through the internal interface - I'm checking where is it going to and
>> based on that I'm setting the Record-Route header accordingly - and
>> everything works well, except when I have multiple branches: one going
>> through the internal interface and another one through the external one, so
>> in this case, I have to add a different record-route header per branch, by
>> doing this in the branch_route - it's not working and getting the
>> error: w_record_route_advertised_address(): Double attempt to record-route.
>>
>> What would be another way to accomplish this?
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Record-Route advertised per branch

2022-06-16 Thread Sergiu Pojoga
Have you tried just *record_route()* with *enable_double_rr* option
enabled? All things considered, RR should take care of it all by itself,
per branch.

A script snippet could help.

On Thu, Jun 16, 2022 at 10:05 AM Patrick Karton 
wrote:

> It only work for request route.
>
> Le 16 juin 2022 14:19, Ilie Soltanici  a écrit :
>
> Hello,
>
> Thank you, added it now - still the same, unfortunately.
>
> Regards,
>
> On Thu, 16 Jun 2022 at 13:29, Sergiu Pojoga  wrote:
>
> Have you tried calling *t_save_lumps()* before relaying, even before RR?
>
> On Thu, Jun 16, 2022 at 7:59 AM Ilie Soltanici 
> wrote:
>
> Hello,
>
> Is there any way to advertise a different IP Address in the Record-Route
> header individually per branch?
>
> I have a setup here - where Kamailio is listening on 2 different
> interfaces: Local IP and External IP. At the moment if the packet is coming
> through the internal interface - I'm checking where is it going to and
> based on that I'm setting the Record-Route header accordingly - and
> everything works well, except when I have multiple branches: one going
> through the internal interface and another one through the external one, so
> in this case, I have to add a different record-route header per branch, by
> doing this in the branch_route - it's not working and getting the
> error: w_record_route_advertised_address(): Double attempt to record-route.
>
> What would be another way to accomplish this?
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Record-Route advertised per branch

2022-06-16 Thread Sergiu Pojoga
Have you tried calling *t_save_lumps()* before relaying, even before RR?

On Thu, Jun 16, 2022 at 7:59 AM Ilie Soltanici  wrote:

> Hello,
>
> Is there any way to advertise a different IP Address in the Record-Route
> header individually per branch?
>
> I have a setup here - where Kamailio is listening on 2 different
> interfaces: Local IP and External IP. At the moment if the packet is coming
> through the internal interface - I'm checking where is it going to and
> based on that I'm setting the Record-Route header accordingly - and
> everything works well, except when I have multiple branches: one going
> through the internal interface and another one through the external one, so
> in this case, I have to add a different record-route header per branch, by
> doing this in the branch_route - it's not working and getting the
> error: w_record_route_advertised_address(): Double attempt to record-route.
>
> What would be another way to accomplish this?
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio server behind NAT

2022-02-09 Thread Sergiu Pojoga
*>  you can set only one contact address*

Recent versions of Kamailio support setting Contact address per uac record,
see *contact_addr* field.

Regards,

On Wed, Feb 9, 2022 at 11:15 AM Tihomir Culjaga  wrote:

> Hi all
>
>
> I'm wondering what is best practice to configure kamailio for a setup
> shown below. Carriers only support interconnection over a private network
> so I need to terminate every separate network on kamailio machine (and on
> RTPEngine) . That will turn very quickly into an administration nightmare
> as we add more and more carriers.
> My plan is to terminate carrier private networks on a router and NAT the
> traffic to kamailio where it leads me to a kamailio behind NAT setup. Well,
> in theory set_advertised_address and set_advertised_port per message can do
> the trick... at least I hope.
> Also, some carriers require a SIP registration to activate SIP trunks. I
> do that using UAC module (remote registration) but here again I got a
> problem with contact address as you can set only one contact address
> (modparam("uac", "reg_contact_addr", "10.1.1.11:5060")).
>
> /--RTP 1-1-- RTPEngine1 -RTP--+--
> IPPBX1
> carrier1 --- NAT ---|   | |
> |   | |
> carrier2 --- NAT ---+-SIP 5060-- kamailio SIP Dispatcher
> |   | |
> carrier3 --- NAT ---|   | |
> \--RTP 2-2-- RTPEngine2 -RTP--+--
> IPPBX2
>
>
> So bottom line, I'm wondering what would be the best practice for such a
> scenario ?
> That would spare me from hitting many pitfalls.
>
> Would really appreciate a hint.
>
> Regards,
> Tihomir.
>
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Comunication between devices RTP/SRTP and viceversa

2022-01-27 Thread Sergiu Pojoga
You would achieve this in a failure route, detecting the 488|415 negative
replies then resuming the branch with a different SDP profile.

However, as others have said already, not all UAs will accept this "hack".
Some will consider the new branch with a CSeq NOT incrementing as
retransmission - and reject it with something like "482 Merged Request".

https://tools.ietf.org/html/rfc3261#section-8.2.2.2

8.2.2.2 Merged Requests

If the request has no tag in the To header field, the UAS core MUST
check the request against ongoing transactions. If the From tag,
Call-ID, and CSeq exactly match those associated with an ongoing
transaction, but the request does not match that transaction (based
on the matching rules in Section 17.2.3), the UAS core SHOULD
generate a 482 (Loop Detected) response and pass it to the server
transaction.

Regards,
--Sergiu

On Thu, Jan 27, 2022 at 6:26 PM Marrold  wrote:

> Hi,
>
> Unfortunately in my experience "Opportunistic SRTP" support is broken in
> many UAs. There are (at least) two ways of doing it covered indirectly in
> RFC3264  and the second explicitly
> in RFC8643  and devices seem
> to handle them differently. I've seen end devices that *can *support SRTP
> choose to use standard RTP when offered the wrong type of SDP body.
>
> One thing I considered (but haven't tested so far) is using a late offer
> to discover what format the end device expects before sending an offer, but
> that might cause interop problems of its own.
>
> Cheers
>
> On Thu, Jan 27, 2022 at 10:54 PM Social Boh  wrote:
>
>> I can examine the request but how examine the answer if is a Error?
>> Using a failure route?
>>
>> Regards
>>
>> ---
>> I'm SoCIaL, MayBe
>>
>> El 27/01/2022 a las 5:39 p. m., Alex Balashov escribió:
>> > Does an examination of the SDP offer and answer respectively not divine
>> the issue?
>> >
>> >> On Jan 27, 2022, at 5:35 PM, Social Boh  wrote:
>> >>
>> >> I'm trying to configure Kamailio to permit communication between
>> devices:
>> >>
>> >> some use TLS and SRTP
>> >>
>> >> some UDP and RTP
>> >>
>> >> with RTPEngine in the middle.
>> >>
>> >> A priori I don't know if the device support SRTP or RTP so in the
>> routing I have to detect on the fly how to act. The problem is this:
>> >>
>> >> Call from RTP to SRTP device: 488 Not Acceptable here
>> >>
>> >> Call from SRTP to RTP device: 415 Unsupported Media Type
>> >>
>> >> Any hint?
>> >>
>> >> Thank you
>> >>
>> >>   Regards
>> >>
>> >> --
>> >> ---
>> >> I'm SoCIaL, MayBe
>> >>
>> >>
>> >> __
>> >> Kamailio - Users Mailing List - Non Commercial Discussions
>> >> * sr-users@lists.kamailio.org
>> >> Important: keep the mailing list in the recipients, do not reply only
>> to the sender!
>> >> Edit mailing list options or unsubscribe:
>> >> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Announcing public beta release of TeamsPhone - powered by Kamailio

2021-12-06 Thread Sergiu Pojoga
Hello Kamailio-nians,

Just to bug everyone quickly: today I'm happy to announce the public beta
release of *TeamsPhone <https://teamsphone.net>*, a MS Teams <=> PBX
integration solution for ITSPs, IP-PBX service providers and
integrators, *powered
by Kamailio*.

Unlike other similar services offered as SaaS pay-per-user model, our
product is oriented for ITSPs to be self-hosted and fully integrated into
one's telecom network, providing an add-on service to supplement any Hosted
PBX offering with seamless calling using Microsoft Teams *as-as-softphone*,
or as we like to call it - TeamsPhone.

Some insights about the platform:

   - 100% automation of MS Teams Direct Routing provisioning
   - multi-tenant application
   - API-driven
   - Microservices oriented architecture
   - RabbitMQ-powered Message Broker distribution
   - SIP server (you guessed it - Kamailio, of course!)

Seeing how it works is worth a thousand words. A cloud *demo* instance is
available at https://my.teamsphone.net for anyone to try it out, use it or
abuse it.

If you have questions about the product - feel free to contact me in
private.

Respectfully,

Sergiu Pojoga
Founder, teamsphone.net
ser...@teamsphone.net
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [uac] How to force outbound registration?

2021-11-24 Thread Sergiu Pojoga
If you do unregister (without disable), then you'll need to do reg_refresh
followed by reg_enable to get the registration resumed.

Cheers comrad.

On Wed, Nov 24, 2021 at 9:52 AM Denys Pozniak 
wrote:

> As far as I tested, after unregistering the account, new registration no
> longer occurs regardless of the reg_timer_interval.
> What command should be used to enable it again?
>
>
> ср, 24 нояб. 2021 г. в 15:40, Sergiu Pojoga :
>
>> You can't immediately register back. Registration scheduler runs at
>> certain intervals, defined by reg_timer_interval modparam.
>>
>>
>> https://kamailio.org/docs/modules/stable/modules/uac.html#uac.p.reg_timer_interval
>>
>> Regards,
>> --Sergiu
>>
>> On Wed, Nov 24, 2021 at 7:11 AM Denys Pozniak 
>> wrote:
>>
>>> Hello!
>>>
>>> In some cases, I need to forcibly unregister a remote SIP account
>>> through uac module, and then immediately register.
>>> To unregister I can use the command:
>>> *kamcmd uac.reg_unregister l_uuid *
>>>
>>> But it's not clear how to immediately register back. For example, these
>>> commands do not give the desired effect:
>>> *kamcmd uac.reg_enable l_uuid *
>>> *kamcmd  uac.reg_reload*
>>>
>>> [root@kamailio]# kamailio -V
>>> version: kamailio 5.5.2 (x86_64/linux) 55e232
>>>
>>> --
>>> BR,
>>> Denys Pozniak
>>>
>>>
>>> __
>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>>   * sr-users@lists.kamailio.org
>>> Important: keep the mailing list in the recipients, do not reply only to
>>> the sender!
>>> Edit mailing list options or unsubscribe:
>>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> --
>
> BR,
> Denys Pozniak
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [uac] How to force outbound registration?

2021-11-24 Thread Sergiu Pojoga
You can't immediately register back. Registration scheduler runs at certain
intervals, defined by reg_timer_interval modparam.

https://kamailio.org/docs/modules/stable/modules/uac.html#uac.p.reg_timer_interval

Regards,
--Sergiu

On Wed, Nov 24, 2021 at 7:11 AM Denys Pozniak 
wrote:

> Hello!
>
> In some cases, I need to forcibly unregister a remote SIP account through
> uac module, and then immediately register.
> To unregister I can use the command:
> *kamcmd uac.reg_unregister l_uuid *
>
> But it's not clear how to immediately register back. For example, these
> commands do not give the desired effect:
> *kamcmd uac.reg_enable l_uuid *
> *kamcmd  uac.reg_reload*
>
> [root@kamailio]# kamailio -V
> version: kamailio 5.5.2 (x86_64/linux) 55e232
>
> --
> BR,
> Denys Pozniak
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Custom info in Contact header

2021-11-21 Thread Sergiu Pojoga
Right... as always, the devil's in the details.

Contact: 

On Sun, Nov 21, 2021 at 3:14 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> you are confusing what are Contact header parameters and Contact URI
> parameters.
>
> If you want to be preserved in location and used later in R-URI, you have
> to give it as Contact URI parameter (like transport), but some_id is given
> as Contact header parameter.
>
> Cheers,
> Daniel
> On 21.11.21 20:30, Sergiu Pojoga wrote:
>
> I don't think the specifics matter that much, but the general idea of
> preserving the Contact URI parameter for subsequent messages is reasonable
> and I've seen it work like that with other non-Kamailio registrars.
>
> I wonder if this also happens without fix_nated_register before save().
>
> On Sun., Nov. 21, 2021, 1:49 p.m. David Villasmil, <
> david.villasmil.w...@gmail.com> wrote:
>
>> Any specific reason to insert that parameter in the contact as opposed to
>> just adding a custom header?
>>
>> On Sun, 21 Nov 2021 at 17:53, Igor Olhovskiy 
>> wrote:
>>
>>> Hello!
>>>
>>> On REGISTER I have a Contact header like
>>> Contact:  
>>> ;some_id=90002-21080
>>> But on calling fix_nated_register() -> save(), param some_id is lost
>>> from info, so, on INVITE to this account, some_id not appears in RURI.
>>> Is this a bug or a feature and I do need to find some workaround?
>>>
>>>
>>> --
>>> Best regards,
>>> Igor
>>> __
>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>>   * sr-users@lists.kamailio.org
>>> Important: keep the mailing list in the recipients, do not reply only to
>>> the sender!
>>> Edit mailing list options or unsubscribe:
>>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> --
>> Regards,
>>
>> David Villasmil
>> email: david.villasmil.w...@gmail.com
>> phone: +34669448337
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio Advanced Training - Online
>   Feb 21-24, 2022 (America Timezone)
>   * https://www.asipto.com/sw/kamailio-advanced-training-online/
>
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Custom info in Contact header

2021-11-21 Thread Sergiu Pojoga
I don't think the specifics matter that much, but the general idea of
preserving the Contact URI parameter for subsequent messages is reasonable
and I've seen it work like that with other non-Kamailio registrars.

I wonder if this also happens without fix_nated_register before save().

On Sun., Nov. 21, 2021, 1:49 p.m. David Villasmil, <
david.villasmil.w...@gmail.com> wrote:

> Any specific reason to insert that parameter in the contact as opposed to
> just adding a custom header?
>
> On Sun, 21 Nov 2021 at 17:53, Igor Olhovskiy 
> wrote:
>
>> Hello!
>>
>> On REGISTER I have a Contact header like
>> Contact:  > ;transport=TLS>;some_id=90002-21080
>> But on calling fix_nated_register() -> save(), param some_id is lost
>> from info, so, on INVITE to this account, some_id not appears in RURI.
>> Is this a bug or a feature and I do need to find some workaround?
>>
>>
>> --
>> Best regards,
>> Igor
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC reg_random_delay

2021-11-03 Thread Sergiu Pojoga
Daniel, that was spot on. Randomization is working now!

Thanks!

On Wed, Nov 3, 2021 at 8:52 AM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> if you have:
>
> modparam("uac", "reg_random_delay", 20)
>
> modparam("uac", "reg_timer_interval", 20)
>
> Then all are sent because the next timer callback is executed after
> 20secs, which is later than any delay value.
>
> Try:
>
> modparam("uac", "reg_random_delay", 300)
>
> modparam("uac", "reg_timer_interval", 10)
>
> Cheers,
> Daniel
> On 03.11.21 13:28, Sergiu Pojoga wrote:
>
> Hi Daniel,
>
> True. If I disable/re-enable or add registrations to a running system via
> rpc, then those are not sent simultaneously with the others.
>
> modparam("uac", "reg_timer_interval", 20)
>
> Let me know if you see a problem here or not. I'll log an issue about it
> on the tracker, if true.
>
> Thanks.
>
> On Wed, Nov 3, 2021 at 5:53 AM Daniel-Constantin Mierla 
> wrote:
>
>> Hello,
>>
>> registrations are sent on a timer callback function executed every N
>> secods that is specified via a modparam (check the readme). If the next
>> timer callback is going to be executed after the delay value (or when the
>> registration expires), then the (new) registrations are sent on the current
>> callback execution. Could be this situation.
>>
>> Cheers,
>> Daniel
>> On 03.11.21 08:36, Henning Westerholt wrote:
>>
>> Hello Sergiu,
>>
>>
>>
>> Interesting. I suspected something like this in the past as well but
>> never looked into the randomness features in uac.
>>
>>
>>
>> Let’s wait a bit if somebody else might comment on it, otherwise please
>> open an issue about it on our tracker.
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* Sergiu Pojoga  
>> *Sent:* Wednesday, November 3, 2021 4:41 AM
>> *To:* Henning Westerholt  
>> *Cc:* Kamailio (SER) - Users Mailing List 
>> 
>> *Subject:* Re: [SR-Users] UAC reg_random_delay
>>
>>
>>
>> Hi Henning,
>>
>>
>>
>> That's my understanding as well, but in reality seems like it all happens
>> simultaneously, without some kind of delay.
>>
>>
>>
>> Here's what I have:
>>
>> · *modparam("uac", "reg_random_delay", 20)*
>>
>> · 10 uac records
>>
>> · expires=300
>>
>> · reg_delay=0
>>
>>
>>
>> kamcmd uac.reg_dump | egrep delay
>> reg_delay: 13
>> reg_delay: 7
>> reg_delay: 3
>> reg_delay: 2
>> reg_delay: 8
>> reg_delay: 1
>> reg_delay: 2
>> reg_delay: 14
>> reg_delay: 17
>> reg_delay: 18
>>
>> Following restart of Kamailio:
>>
>> · 1st  x10 REGISTERs are all sent out the same millisecond.
>>
>> · Contacts saved, received 200 OK with Expires: 300
>>
>> · after 280 seconds, another x10 REGISTERs are all sent out the
>> same millisecond
>>
>> ·     and so on
>>
>> Thanks.
>>
>>
>>
>> On Tue, Nov 2, 2021 at 2:59 PM Henning Westerholt  wrote:
>>
>> Hello,
>>
>>
>>
>> this are two different concepts:
>>
>>
>>
>> · reg_random_delay is a global parameter to randomize the registration
>> delay for the records
>>
>> · reg_delay is a parameter for the individual contacts
>>
>>
>>
>> So it seems to randomize the reg_delay value due to the set
>> reg_random_delay for records with reg_delay = 0.
>>
>> Could you maybe also observe a second registration after the initial
>> registration, if it stills send out all requests the same time?
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* sr-users  *On Behalf Of *Sergiu
>> Pojoga
>> *Sent:* Monday, November 1, 2021 4:20 PM
>> *To:* Kamailio (SER) - Users Mailing List 
>> *Subject:* [SR-Users] UAC reg_random_delay
>>
>>
>>
>> Hi there,
>>
>>
>>
>> May I know what exactly is suppose

Re: [SR-Users] UAC reg_random_delay

2021-11-03 Thread Sergiu Pojoga
Thanks for the suggestion Bastian. IMO 20 is already at the low end,
default being at 90. Didn't make a difference still, following a restart -
all registrations are sent out simultaneously.

Regards,

On Wed, Nov 3, 2021 at 8:33 AM Bastian Triller 
wrote:

> Try lowering timer interval. As I checked w/ a handful of registrations,
> on start, Kamailio only sent one registration and on next timer the rest of
> it.
>
> On Wed, Nov 3, 2021, 04:41 Sergiu Pojoga  wrote:
>
>> Hi Henning,
>>
>> That's my understanding as well, but in reality seems like it all happens
>> simultaneously, without some kind of delay.
>>
>> Here's what I have:
>>
>>- *modparam("uac", "reg_random_delay", 20)*
>>- 10 uac records
>>- expires=300
>>- reg_delay=0
>>
>>
>> kamcmd uac.reg_dump | egrep delay
>> reg_delay: 13
>> reg_delay: 7
>> reg_delay: 3
>> reg_delay: 2
>> reg_delay: 8
>> reg_delay: 1
>> reg_delay: 2
>> reg_delay: 14
>> reg_delay: 17
>> reg_delay: 18
>>
>> Following restart of Kamailio:
>>
>>- 1st  x10 REGISTERs are all sent out the same millisecond.
>>- Contacts saved, received 200 OK with Expires: 300
>>- after 280 seconds, another x10 REGISTERs are all sent out the same
>>millisecond
>>- and so on
>>
>> Thanks.
>>
>> On Tue, Nov 2, 2021 at 2:59 PM Henning Westerholt  wrote:
>>
>>> Hello,
>>>
>>>
>>>
>>> this are two different concepts:
>>>
>>>
>>>
>>>- reg_random_delay is a global parameter to randomize the
>>>registration delay for the records
>>>- reg_delay is a parameter for the individual contacts
>>>
>>>
>>>
>>> So it seems to randomize the reg_delay value due to the set
>>> reg_random_delay for records with reg_delay = 0.
>>>
>>> Could you maybe also observe a second registration after the initial
>>> registration, if it stills send out all requests the same time?
>>>
>>>
>>>
>>> Cheers,
>>>
>>>
>>>
>>> Henning
>>>
>>>
>>>
>>> --
>>>
>>> Henning Westerholt – https://skalatan.de/blog/
>>>
>>> Kamailio services – https://gilawa.com
>>>
>>>
>>>
>>> *From:* sr-users  *On Behalf Of *Sergiu
>>> Pojoga
>>> *Sent:* Monday, November 1, 2021 4:20 PM
>>> *To:* Kamailio (SER) - Users Mailing List 
>>> *Subject:* [SR-Users] UAC reg_random_delay
>>>
>>>
>>>
>>> Hi there,
>>>
>>>
>>>
>>> May I know what exactly is supposed to be "delayed" in the UAC
>>> registration?
>>>
>>>
>>>
>>> *modparam("uac", "reg_random_delay", 20)*
>>>
>>>
>>>
>>> I have records stored in DB with * reg_delay=0*. When doing
>>> *uac.reg_dump*, I do see the value of *reg_delay* being random for
>>> various records.
>>>
>>>
>>>
>>> However, after restarting Kamailio, the registrations are all sent out
>>> *simultaneously*, there doesn't seem to be a "delay", whatever the
>>> purpose is supposed to be.
>>>
>>>
>>>
>>> Can someone clarify please?
>>>
>>>
>>>
>>> Kamailio 5.5.0
>>>
>>>
>>>
>>> Thanks. Regards,
>>>
>>> --Sergiu
>>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC reg_random_delay

2021-11-03 Thread Sergiu Pojoga
Hi Daniel,

True. If I disable/re-enable or add registrations to a running system via
rpc, then those are not sent simultaneously with the others.

modparam("uac", "reg_timer_interval", 20)

Let me know if you see a problem here or not. I'll log an issue about it on
the tracker, if true.

Thanks.

On Wed, Nov 3, 2021 at 5:53 AM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> registrations are sent on a timer callback function executed every N
> secods that is specified via a modparam (check the readme). If the next
> timer callback is going to be executed after the delay value (or when the
> registration expires), then the (new) registrations are sent on the current
> callback execution. Could be this situation.
>
> Cheers,
> Daniel
> On 03.11.21 08:36, Henning Westerholt wrote:
>
> Hello Sergiu,
>
>
>
> Interesting. I suspected something like this in the past as well but never
> looked into the randomness features in uac.
>
>
>
> Let’s wait a bit if somebody else might comment on it, otherwise please
> open an issue about it on our tracker.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* Sergiu Pojoga  
> *Sent:* Wednesday, November 3, 2021 4:41 AM
> *To:* Henning Westerholt  
> *Cc:* Kamailio (SER) - Users Mailing List 
> 
> *Subject:* Re: [SR-Users] UAC reg_random_delay
>
>
>
> Hi Henning,
>
>
>
> That's my understanding as well, but in reality seems like it all happens
> simultaneously, without some kind of delay.
>
>
>
> Here's what I have:
>
> · *modparam("uac", "reg_random_delay", 20)*
>
> · 10 uac records
>
> · expires=300
>
> · reg_delay=0
>
>
>
> kamcmd uac.reg_dump | egrep delay
> reg_delay: 13
> reg_delay: 7
> reg_delay: 3
> reg_delay: 2
> reg_delay: 8
> reg_delay: 1
> reg_delay: 2
> reg_delay: 14
> reg_delay: 17
> reg_delay: 18
>
> Following restart of Kamailio:
>
> · 1st  x10 REGISTERs are all sent out the same millisecond.
>
> · Contacts saved, received 200 OK with Expires: 300
>
> · after 280 seconds, another x10 REGISTERs are all sent out the
> same millisecond
>
> · and so on
>
> Thanks.
>
>
>
> On Tue, Nov 2, 2021 at 2:59 PM Henning Westerholt  wrote:
>
> Hello,
>
>
>
> this are two different concepts:
>
>
>
> · reg_random_delay is a global parameter to randomize the registration
> delay for the records
>
> · reg_delay is a parameter for the individual contacts
>
>
>
> So it seems to randomize the reg_delay value due to the set
> reg_random_delay for records with reg_delay = 0.
>
> Could you maybe also observe a second registration after the initial
> registration, if it stills send out all requests the same time?
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *Sergiu
> Pojoga
> *Sent:* Monday, November 1, 2021 4:20 PM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* [SR-Users] UAC reg_random_delay
>
>
>
> Hi there,
>
>
>
> May I know what exactly is supposed to be "delayed" in the UAC
> registration?
>
>
>
> *modparam("uac", "reg_random_delay", 20)*
>
>
>
> I have records stored in DB with *reg_delay=0*. When doing *uac.reg_dump*,
> I do see the value of *reg_delay* being random for various records.
>
>
>
> However, after restarting Kamailio, the registrations are all sent out
> *simultaneously*, there doesn't seem to be a "delay", whatever the
> purpose is supposed to be.
>
>
>
> Can someone clarify please?
>
>
>
> Kamailio 5.5.0
>
>
>
> Thanks. Regards,
>
> --Sergiu
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio Advanced Training - Online
> Nov 08-11, 2021 (Europe Timezone) - Nov 22-25, 2021 (America Timezone)
>   * https://www.asipto.com/sw/kamailio-advanced-training-online/
>
> __

Re: [SR-Users] UAC reg_random_delay

2021-11-02 Thread Sergiu Pojoga
Hi Henning,

That's my understanding as well, but in reality seems like it all happens
simultaneously, without some kind of delay.

Here's what I have:

   - *modparam("uac", "reg_random_delay", 20)*
   - 10 uac records
   - expires=300
   - reg_delay=0


kamcmd uac.reg_dump | egrep delay
reg_delay: 13
reg_delay: 7
reg_delay: 3
reg_delay: 2
reg_delay: 8
reg_delay: 1
reg_delay: 2
reg_delay: 14
reg_delay: 17
reg_delay: 18

Following restart of Kamailio:

   - 1st  x10 REGISTERs are all sent out the same millisecond.
   - Contacts saved, received 200 OK with Expires: 300
   - after 280 seconds, another x10 REGISTERs are all sent out the same
   millisecond
   - and so on

Thanks.

On Tue, Nov 2, 2021 at 2:59 PM Henning Westerholt  wrote:

> Hello,
>
>
>
> this are two different concepts:
>
>
>
>- reg_random_delay is a global parameter to randomize the registration
>delay for the records
>- reg_delay is a parameter for the individual contacts
>
>
>
> So it seems to randomize the reg_delay value due to the set
> reg_random_delay for records with reg_delay = 0.
>
> Could you maybe also observe a second registration after the initial
> registration, if it stills send out all requests the same time?
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *Sergiu
> Pojoga
> *Sent:* Monday, November 1, 2021 4:20 PM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* [SR-Users] UAC reg_random_delay
>
>
>
> Hi there,
>
>
>
> May I know what exactly is supposed to be "delayed" in the UAC
> registration?
>
>
>
> *modparam("uac", "reg_random_delay", 20)*
>
>
>
> I have records stored in DB with * reg_delay=0*. When doing *uac.reg_dump*,
> I do see the value of *reg_delay* being random for various records.
>
>
>
> However, after restarting Kamailio, the registrations are all sent out
> *simultaneously*, there doesn't seem to be a "delay", whatever the
> purpose is supposed to be.
>
>
>
> Can someone clarify please?
>
>
>
> Kamailio 5.5.0
>
>
>
> Thanks. Regards,
>
> --Sergiu
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] UAC reg_random_delay

2021-11-01 Thread Sergiu Pojoga
Hi there,

May I know what exactly is supposed to be "delayed" in the UAC registration?


*modparam("uac", "reg_random_delay", 20)*

I have records stored in DB with *reg_delay=0*. When doing *uac.reg_dump*,
I do see the value of *reg_delay* being random for various records.

However, after restarting Kamailio, the registrations are all sent out
*simultaneously*, there doesn't seem to be a "delay", whatever the purpose
is supposed to be.

Can someone clarify please?

Kamailio 5.5.0

Thanks. Regards,
--Sergiu
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Strip VP8 from SDP in rtpengine

2021-10-29 Thread Sergiu Pojoga
Check out sdpops module.

sdp_remove_media("video")


On Fri., Oct. 29, 2021, 5:42 a.m. Rahul mm, 
wrote:

> Hello,
>
> I'm facing trouble with Android 12 using webview to attempt video call.
> All the media is rotated from rtpengine. To workaround this problem, I wish
> to strip VP8 and have the calls run on VP9.
> For this, I added "codec-strip=VP8" but rtpengine is not able to remove
> it. I've even tried "codec-strip=VP8/9" but to no avail. The video is
> still garbled.
>
> Am I doing anything wrong here?
>
>
> Thanks and Regards
> Rahul
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Let's Encrypt DST Root CA X3 cert CA expiration 30th/Sept - Any issues?

2021-10-08 Thread Sergiu Pojoga
Like our comrades at APIBAN. Had to patch the CA list on older linux
distros to get this restarted.

Oct  8 10:20:21 kamailio[8476]:  WARNING: http_client [functions.c:308]:
curL_request_url(): TLS server certificate validation error (No valid CA
cert) (url: https://apiban.org/api/...)

@Fred, all good out there bud? lol

On Fri, Oct 8, 2021 at 12:30 PM Maxim Sobolev  wrote:

> Some of our internal API have started to fail and most of software update
> routines jammed up as a result until we figured out how to cope with that
> issue.
>
> Not the first one and certainly not the last. In general PKI/TLS is by
> design prone to issues like this and I am sad industry has not come up with
> anything better yet to communicate over insecure channels. :( Noise
> protocol certainly holds lots of potential in my view but mills of IETF
> mill slowly, so we are going to be suffering for many years to come I am
> afraid.
>
> -Max
>
>
> On Fri., Oct. 8, 2021, 8:23 a.m. Henning Westerholt, 
> wrote:
>
>> Hello,
>>
>>
>>
>> in total we had three customer incidents (two server related, one client
>> related) because of this, one of them was a major incident.
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>>
>>
>>
>>
>> *From:* sr-users  *On Behalf Of *Joel
>> Serrano
>> *Sent:* Friday, October 1, 2021 9:05 PM
>> *To:* Kamailio (SER) - Users Mailing List 
>> *Subject:* [SR-Users] Let's Encrypt DST Root CA X3 cert CA expiration
>> 30th/Sept - Any issues?
>>
>>
>>
>> Hello,
>>
>>
>>
>> I'm wondering if anyone had any issues yesterday with the expiration of
>> the DST Root CA X3 cert?
>>
>>
>>
>> Out of all the servers I manage, only a couple were affected (debian 8).
>> They were production servers so we replaced the cert with a different one
>> to solve the issue while we find the root cause.
>>
>>
>>
>> Anyone out there had any issues yesterday because of this? I'm just
>> curious!
>>
>>
>>
>> Joel.
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Let's Encrypt DST Root CA X3 cert CA expiration 30th/Sept - Any issues?

2021-10-01 Thread Sergiu Pojoga
Kamailio related? Some old firmware EOL Yealink phones stopped trusting
Lets Encrypt issued cert. Some old softphones as well.

Otherwise, Postman refusing to connect, they pushed an update earlier today.

Overall, it was "fun".

Cheers,
--Sergiu

On Fri, Oct 1, 2021 at 3:12 PM Jurijs Ivolga 
wrote:

> Hi,
>
> I had some issues with docker containers running debian 9, I was not able
> to connect to services that were using Lets Encrypt certs from those
> containers, strange enough update-ca-certificates --fresh from inside
> container didn't help. Deleting docker images and recreating from scratch
> made everything work again. Host was running Ubuntu 20 and it had no
> problem at all, I was able to connect to the same services from the host
> without any manipulations on the host.
>
> Jurijs
>
>
> On Fri, Oct 1, 2021 at 10:06 PM Joel Serrano  wrote:
>
>> Hello,
>>
>> I'm wondering if anyone had any issues yesterday with the expiration of
>> the DST Root CA X3 cert?
>>
>> Out of all the servers I manage, only a couple were affected (debian 8).
>> They were production servers so we replaced the cert with a different one
>> to solve the issue while we find the root cause.
>>
>> Anyone out there had any issues yesterday because of this? I'm just
>> curious!
>>
>> Joel.
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio/RTPengine as a proxy for FreePBX/Asterisk...

2021-09-28 Thread Sergiu Pojoga
RFC3327

On Wed., Sep. 29, 2021, 12:50 a.m. Micah Quinn, 
wrote:

> Thank you for looking at this Sergiu.
>
> Yes, you are correct that Asterisk's INVITE to the receiving extension is
> bouncing between 10.252.1.14 and 192.168.123.10.
>
> Based on the above, how do you expect this call to reach the softphone at
> 10.0.0.142?
>
> I suppose that is the question at issue. And you'll have to forgive me for
> any ignorance on the details of SIP; I'm still learning.
>
>- Should I be adding a Via header to the message?
>- Should I be modifying the Contact header? (BTW, I'm already
>modifying the contact header to point to 10.252.1.14. If I don't, the
>endpoint shows offline/unavailable. As I understand it, Contact header has
>nothing to do with message routing.)
>- Should I be saving the location of the endpoint in Kamailio and
>doing a lookup on inbound messages?
>
> Given that I've been assured that this is a common use case for Kamailio,
> I have to admit that all of the howto's and example .cfg files I've read
> and tried do not seem to completely address this situation.
> ------
> *From:* sr-users  on behalf of
> Sergiu Pojoga 
> *Sent:* Tuesday, September 28, 2021 9:25 AM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Kamailio/RTPengine as a proxy for
> FreePBX/Asterisk...
>
> This says it all:
>
> 2021/09/28 04:45:07.358826 192.168.123.10:7330 -> 10.252.1.14:5060
> INVITE sip:1093@10.252.1.14 SIP/2.0
>
> Based on the above, how do you expect this call to reach the softphone at
> 10.0.0.142?
>
> Also, it's pretty easy to see from the provided traces that the call is
> bounding back and forth between 10.252.1.14 <=> 192.168.123.10, never
> reaching the softphone.
>
> You have a rather long way to making this scenario work, which is good,
> you'll get to learn a few new things as an ITSP.
>
> Good luck.
>
> On Tue, Sep 28, 2021 at 1:00 AM Micah Quinn  wrote:
>
> OK, then some more details and some questions. My network configuration
> is as follows:
>
> 10.0.0.142 10.0.0.200   10.252.1.14
> 10.252.1.1192.168.123.5192.168.123.10
> [softphone]   <>  [kamailio/rtpengine]  <-VPN->
> [VPN server] <--> [FreePBX}
>
> There is no NAT'ing involved/enabled. I'm running RTPEngine on the same
> machine as Kamailio.
>
> With my current configuration I can call the PBX directly without issue.
> (i.e. access my voicemail, IVRs, conference rooms, etc.). However, I can
> still not make an extension-to-extension call. Asterisk responds to the
> INVITE with a "401 Unauthorized" message.I have two extensions registered
> (1093 and 10931):
>
>  Endpoint:  1093/1093Not in
> use0 of inf
>  InAuth:  1093-auth/1093
> Aor:  1093  10
>   Contact:  1093/sip:1093@10.252.1.14  a49a850887
> Avail85.409
>
>  Endpoint:  10931/10931  Not in
> use0 of inf
>  InAuth:  10931-auth/10931
> Aor:  10931 10
>   Contact:  10931/sip:10931@10.252.1.143690dfd96d
> Avail85.225
>
> Below are two packet captures from the Kamailio machine and the Asterisk
> machine. If more information is needed, I'll be happy to supply the
> specifics. Thanks to anyone that's willing to take the time to look this
> over. (Alternatively, if somebody wants to suggest a kamailio.cfg file for
> my specific use case, I'd be happy to test that on my setup as well.)
>
> On the Kamailio machine:
> ---
>
> 2021/09/28 04:45:07.358826 192.168.123.10:7330 -> 10.252.1.14:5060
> INVITE sip:1093@10.252.1.14 SIP/2.0
> Via: SIP/2.0/UDP 192.168.123.10:5060
> ;rport;branch=z9hG4bKPj68d21815-beeb-4631-b8ba-e2b979331e0e
> From: "10931"  >;tag=a3c6bf40-aa29-4b58-963d-36952a617a54
> To: 
> Contact: 
> Call-ID: 4ec009f0-34c5-4356-bef9-a52b862c7a93
> CSeq: 13326 INVITE
> Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE,
> CANCEL, UPDATE, PRACK, MESSAGE, REFER
> Supported: 100rel, timer, replaces, norefersub, histinfo
> Session-Expires: 1800
> Min-SE: 90
> P-Asserted-Identity: "10931" 
> Max-Forwards: 70
> User-Agent: FPBX-16.0.10.27(17.9.4)
> Content-Type: application/sdp
> Content-Length:   341
>
> v=0
> o=- 585379038 585379038 IN IP4 192.168.123.10
> s=Asterisk
> c=IN IP4 192.168.123.10
> t=0 0
> m=audio 18074 RTP/AVP 0 

Re: [SR-Users] Kamailio/RTPengine as a proxy for FreePBX/Asterisk...

2021-09-28 Thread Sergiu Pojoga
This says it all:

2021/09/28 04:45:07.358826 192.168.123.10:7330 -> 10.252.1.14:5060
INVITE sip:1093@10.252.1.14 SIP/2.0

Based on the above, how do you expect this call to reach the softphone at
10.0.0.142?

Also, it's pretty easy to see from the provided traces that the call is
bounding back and forth between 10.252.1.14 <=> 192.168.123.10, never
reaching the softphone.

You have a rather long way to making this scenario work, which is good,
you'll get to learn a few new things as an ITSP.

Good luck.

On Tue, Sep 28, 2021 at 1:00 AM Micah Quinn  wrote:

> OK, then some more details and some questions. My network configuration
> is as follows:
>
> 10.0.0.142 10.0.0.200   10.252.1.14
> 10.252.1.1192.168.123.5192.168.123.10
> [softphone]   <>  [kamailio/rtpengine]  <-VPN->
> [VPN server] <--> [FreePBX}
>
> There is no NAT'ing involved/enabled. I'm running RTPEngine on the same
> machine as Kamailio.
>
> With my current configuration I can call the PBX directly without issue.
> (i.e. access my voicemail, IVRs, conference rooms, etc.). However, I can
> still not make an extension-to-extension call. Asterisk responds to the
> INVITE with a "401 Unauthorized" message.I have two extensions registered
> (1093 and 10931):
>
>  Endpoint:  1093/1093Not in
> use0 of inf
>  InAuth:  1093-auth/1093
> Aor:  1093  10
>   Contact:  1093/sip:1093@10.252.1.14  a49a850887
> Avail85.409
>
>  Endpoint:  10931/10931  Not in
> use0 of inf
>  InAuth:  10931-auth/10931
> Aor:  10931 10
>   Contact:  10931/sip:10931@10.252.1.143690dfd96d
> Avail85.225
>
> Below are two packet captures from the Kamailio machine and the Asterisk
> machine. If more information is needed, I'll be happy to supply the
> specifics. Thanks to anyone that's willing to take the time to look this
> over. (Alternatively, if somebody wants to suggest a kamailio.cfg file for
> my specific use case, I'd be happy to test that on my setup as well.)
>
> On the Kamailio machine:
> ---
>
> 2021/09/28 04:45:07.358826 192.168.123.10:7330 -> 10.252.1.14:5060
> INVITE sip:1093@10.252.1.14 SIP/2.0
> Via: SIP/2.0/UDP 192.168.123.10:5060
> ;rport;branch=z9hG4bKPj68d21815-beeb-4631-b8ba-e2b979331e0e
> From: "10931"  >;tag=a3c6bf40-aa29-4b58-963d-36952a617a54
> To: 
> Contact: 
> Call-ID: 4ec009f0-34c5-4356-bef9-a52b862c7a93
> CSeq: 13326 INVITE
> Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE,
> CANCEL, UPDATE, PRACK, MESSAGE, REFER
> Supported: 100rel, timer, replaces, norefersub, histinfo
> Session-Expires: 1800
> Min-SE: 90
> P-Asserted-Identity: "10931" 
> Max-Forwards: 70
> User-Agent: FPBX-16.0.10.27(17.9.4)
> Content-Type: application/sdp
> Content-Length:   341
>
> v=0
> o=- 585379038 585379038 IN IP4 192.168.123.10
> s=Asterisk
> c=IN IP4 192.168.123.10
> t=0 0
> m=audio 18074 RTP/AVP 0 8 3 111 9 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:3 GSM/8000
> a=rtpmap:111 G726-32/8000
> a=rtpmap:9 G722/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=ptime:20
> a=maxptime:150
> a=sendrecv
>
>
> 2021/09/28 04:45:07.365188 10.252.1.14:5060 -> 192.168.123.10:7330
> SIP/2.0 100 trying -- your call is important to us
> Via: SIP/2.0/UDP 192.168.123.10:5060
> ;rport=7330;branch=z9hG4bKPj68d21815-beeb-4631-b8ba-e2b979331e0e;received=192.168.123.10
> From: "10931"  >;tag=a3c6bf40-aa29-4b58-963d-36952a617a54
> To: 
> Call-ID: 4ec009f0-34c5-4356-bef9-a52b862c7a93
> CSeq: 13326 INVITE
> Server: kamailio (5.3.2 (x86_64/linux))
> Content-Length: 0
>
>
>
> 2021/09/28 04:45:07.366400 10.252.1.14:5060 -> 192.168.123.10:5060
> INVITE sip:1093@10.252.1.14 SIP/2.0
> Via: SIP/2.0/UDP
> 10.252.1.14;branch=z9hG4bKe019.4be37ea094ac7d8f4c0a037c7887e071.0
> Via: SIP/2.0/UDP 192.168.123.10:5060
> ;received=192.168.123.10;rport=7330;branch=z9hG4bKPj68d21815-beeb-4631-b8ba-e2b979331e0e
> From: "10931"  >;tag=a3c6bf40-aa29-4b58-963d-36952a617a54
> To: 
> Contact: 
> Call-ID: 4ec009f0-34c5-4356-bef9-a52b862c7a93
> CSeq: 13326 INVITE
> Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE,
> CANCEL, UPDATE, PRACK, MESSAGE, REFER
> Supported: 100rel, timer, replaces, norefersub, histinfo
> Session-Expires: 1800
> Min-SE: 90
> P-Asserted-Identity: "10931" 
> Max-Forwards: 69
> User-Agent: FPBX-16.0.10.27(17.9.4)
> Content-Type: application/sdp
> Content-Length:   349
>
> v=0
> o=- 585379038 585379038 IN IP4 10.252.1.14
> s=Asterisk
> c=IN IP4 10.252.1.14
> t=0 0
> m=audio 14618 RTP/AVP 0 8 3 111 9 101
> a=maxptime:150
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:3 GSM/8000
> a=rtpmap:111 G726-32/8000
> a=rtpmap:9 G722/8000
> a=rtpmap:101 

Re: [SR-Users] using path in Subscriber table

2021-06-13 Thread Sergiu Pojoga
Why don't you ask these questions directly with the folks at dSipRouter?
Some are even members of this mailing list. They seem to have their own
free forum as well as paid support, which you may consider.

Cheers,
--Sergiu

On Sat, Jun 12, 2021 at 11:52 PM Thành Trần Duy 
wrote:

> Hi all,
>
> First of all, I would like to present the system model we are applying:
> - dSIPRouter : Sip relay for all users connected from the internet
> (installed with RTPEngine to handle media data).
> - kamailio 5.3.5: core system, registration server.
> - Asterisk 17: SBC.
> Sorry if our model seems a bit backwards but we have so many users (>12k
> configured users, > 3k concurrent registered users, > 500 concurrent users
> at cps 10), I don't know of any solution that can work with such a large
> load.
>
> With call outbound (from user to PSTN via SBC), everything is fine.
> But with internal or inbound calls, it wasn't successful.
> I showed that:
> - After dSIPRouter, the register message has Path parameter in SIP Header,
> - Kamailio store sip:user@domain in column contact at location table.
> - Using modparam registrar with use_path=1,
> path_mode=0, path_use_received=1, I stored this parameter in DB.
> - When calling internal or inbound, for the search destination of a phone,
> I am using sip_trace() function. But the result is always column contact.
> - With this uri, kamailio wasn't known and sent the invite to proxy.
> - Final error message: 404.
>
> I need one of these solutions:
> - get path column when result of sip_trace() like  sip:user@domain (with
> phone in internal network, it like sip:user@ipaddress).
> - write path value to column contact when the register message has it.
> - sip_trace can get a path instead of contact if it has.
>
> Or you can have other solutions, pls help me.
> We can talk and test via my Webex PMR.
>
> Many thanks,
> Thanh Duy Tran
>
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Architecture - your opinion is welcome and your experience too

2021-05-28 Thread Sergiu Pojoga
Yeah, PATH implimentation is broken in PJSIP. There's a ticket with Digium
pending for the last 2+ years, low importance, according to them...

On Fri., May 28, 2021, 12:52 p.m. Alex Balashov, 
wrote:

> On 5/28/21 12:47 PM, Sergiu Pojoga wrote:
>
> > Heads-up though, before you get over excited about the suggested
> > simplicity of using PATH. Don't try it if your asterisk farm runs on
> > PJSIP - it simply won't work.
>
> Why, did they break Path?
>
> --
> 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 - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Architecture - your opinion is welcome and your experience too

2021-05-28 Thread Sergiu Pojoga
Heads-up though, before you get over excited about the suggested simplicity
of using PATH. Don't try it if your asterisk farm runs on PJSIP - it simply
won't work.

On Fri, May 28, 2021 at 11:53 AM Alex Balashov 
wrote:

> Hi Daian,
>
> Rather than reoriginaring registrations with Kamailio’s UAC module, I
> suggest you look into the Path extension and Kamailio’s PATH module as a
> means of relaying registrations inward to Asterisk.
>
> You can still benefit from security features of Kamailio in that case,
> while removing 90% of the complexity in your proposal. :-)
>
> — Alex
>
> —
> Sent from mobile, with due apologies for brevity and errors.
>
> On May 28, 2021, at 10:24 AM, Daian Conrad  wrote:
>
> 
> Hi all,
>
> I am studying and improving my understanding of how kamailio works, I have
> used asterisk for a few years(and starting learning freeswitch too), and I
> use an application to manage extensions, trunks and other media services.
> I'm building a new scenario where kamailio is facing the internet and the
> asterisk(s) are internally on private networks, would like the opinion of
> you who are more experienced with more complex environments than me.
>
>  I cannot change the application that uses asterisk for now, due to the
> effort to develop event monitoring, cdr and other features that I use today.
>
> I imagined and working on making kamailio functional by saving the
> registration of extensions with location on DB, and with the UAC module
> making the registration of extensions on asterisk(s), replacing the
> registration address with the address of kamailio, its functional at this
> point, but data replication with extensions turns things some hard to
> mantain manually.
>
> I think about using the DNS domain for each asterisk and make this
> forwarded, each asterisk response for a fqdn and its extensions, like (
> pbx1.example.com is forwarded to asterisk1, pbx2.example.com to
> asterisk2) and so on.
>
> Read about the dispatcher, rr, htable,carrierroute module to identify the
> domain and forward based on that , none made me sure to be chosen for the
> role, however, everyone has the resources to do it.
>
> I am very wrong to follow this path, which option in your opinion is
> "less" painful for a beginner apprentice like me?
>
> I think about simple proxy based on domain requests(all messages and
> dialogs) to asterisk where is responsible for the domain(realm)
> but, loss the ability to use great security features of kamailio, is what
> I understand now with the knowledge I have.
>
> Sorry and forgive my english, i'm not very good at writing.
>
>
> --
> 
> **Daian Conrad**
>
> E-mail: daian.con...@gmail.com
> OpenS Team (DaCoD)
> Linux user: #248912
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>  * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] loose_route() and FQDN

2021-05-07 Thread Sergiu Pojoga
May be related to a previous topic about is_first_hop() and 'myself'

https://lists.kamailio.org/pipermail/sr-users/2018-October/103261.html

On Fri, May 7, 2021 at 7:22 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

>
> Can you share a trace?
>
> On Fri, 7 May 2021 at 21:12, Igor Olhovskiy 
> wrote:
>
>> Yes. It passes uri == myself condition on auth.
>>
>> Regards,
>> Igor
>>
>> On 07.05.2021 17:32, David Villasmil wrote:
>>
>> Have you tried verifying Kamailio actually believes the FQDN is itself?
>>
>> Regards,
>>
>> David Villasmil
>> email: david.villasmil.w...@gmail.com
>> phone: +34669448337
>>
>>
>> On Fri, May 7, 2021 at 4:18 PM Igor Olhovskiy 
>> wrote:
>>
>>> David,
>>>
>>> Yes, I did added it, means it was there, but is_first_hop() was blocking
>>> adding it. I think it's some leftovers from default config.
>>>
>>> So, my conclusion, that is_first_hop() is ok with IP addresses, but not
>>> ok with FQDN in route. Although FQDN is added as alias
>>>
>>> Regards,
>>> Igor
>>>
>>> On 07.05.2021 16:07, David Villasmil wrote:
>>>
>>> Did you add the handle_ruri_alias() as suggested by Daniel? I had
>>> something like this where I would get “unable to resolve blah blah blah"
>>> and it’s because the RURI is the actual wss “address” which is
>>> unresolvable, so executing the function forces kamailio to take the alias
>>> instead.
>>>
>>>
>>> On Fri, 7 May 2021 at 13:48, Igor Olhovskiy 
>>> wrote:
>>>
 Daniel,

 Seems to be it's really the case, but with other function

 With FQDN in RR
 is_first_hop()

 is not acting correctly for reply.

 For incoming SIP replies, it means that top Record-Route URI is
 'myself' and source address is not matching it

 But in Record-Route we have "myself", but *is_first_hop()* returning
 0.

 Thanks!

 Regards,
 Igor

 On 07.05.2021 14:22, Daniel-Constantin Mierla wrote:

 OK, because looping was something that should not have happened in this
 case.

 Then the problem is that you do not do nat-traversal-like processing
 for websocket/webrtc traffic. You have to use set_contact_alias() +
 handle_ruri_alias() because the webrtc endpoints do not set "valid" contact
 addresses.

 Cheers,
 Daniel
 On 07.05.21 14:13, Igor Olhovskiy wrote:

 Ah, no, sorry, I was wrong at this one,

 This just is not sent with "unable to resolve address
 toleivu2gdbh.invalid".

 Sorry. Looping were something else during my tests, this just with
 *advertise* added

 Regards,
 Igor

 On 07.05.2021 14:02, Daniel-Constantin Mierla wrote:

 This looks like incoming ACK, because there is only one Via header, so
 it is not what proxy forwards -- that one is relevant to see what headers
 were consumed and added.

 Cheers,
 Daniel
 On 07.05.21 13:51, Igor Olhovskiy wrote:

 Sure.

 ACK sip:88290@toleivu2gdbh.invalid;transport=wss SIP/2.0
 Via: SIP/2.0/UDP
 A_IP_ADDRESS:5060;rport;branch=z9hG4bKPj8d05548a-91ef-4332-8617-32f8eeebf8f2
 From: ;tag=0a3e31a6-96ad-42d0-9310-81b35cedbd3d
 To: ;tag=hvra7mj3q0
 Call-ID: 46f44741-d155-4dd5-8fd8-78e540fc1acb
 CSeq: 18326 ACK
 Route:
 
 Route:
 
 Max-Forwards: 70
 User-Agent: Asterisk PBX 13.33.0
 Content-Length:  0


 By loop I meant, Kamailio just relaying it back to self and discard.

 Regards,
 Igor

 On 07.05.2021 13:48, Daniel-Constantin Mierla wrote:

 Can you paste the ACK that loops, after being handled once by Kamailio?

 Cheers,
 Daniel
 On 07.05.21 13:25, Igor Olhovskiy wrote:

 Daniel,

 Yes, it is.

 alias=...

 Also tried with

 listen = IP advertise FQDN

 same behavior, loose_route() stops acting correctly.

 PS: Forgot to add, Kamailio 5.4.3 / 5.4.4

 Regards,
 Igor

 On 07.05.2021 13:21, Daniel-Constantin Mierla wrote:

 Hello,

 is the KAMAILIO_FQDN set as local domain for Kamailio (via alias
 parameter or domain module+register myself)?

 Cheers,
 Daniel
 On 07.05.21 11:17, Igor Olhovskiy wrote:

 Hello,

 I saw there are some topics on this already and carefully walked
 through all of them, but can't solve following issue.

 For a reason I do need that in Record-Route header sent to endpoint
 would present FQDN. If it matters, it's UDP/WSS conversion done on 
 Kamailio.

 So, scheme is quite simple

 Enpoint A  ->UDP-> Kamailio ->WSS-> Endpoint B (NAT)

 Main issue here, that if in Record-Route headers it's FQDN, but not IP
 addresses, on a new transactions with a dialog (ACK on 200, PRACK, BYE),
 Kamailio* loose_route()* function resolves address of destination not
 current dialog, but actual R-URI (or itself, 

Re: [SR-Users] Switch from SRTP to RTP when using Zoiper and Bria

2021-04-19 Thread Sergiu Pojoga
Hi Marcus,

Can't say for Zoiper, but I've worked this case with Counterpath (sadly for
Canada - it is no more, has been acquired by Alianza).

Anyhow, the final conclusion at the time was: *The client is correct to
expect that this is the same INVITE request that took different paths to
the target (as indicated by the different branch IDs) - and thus correct to
reject it with a 482 because the requests are not identical in
content. https://tools.ietf.org/html/rfc3261#section-8.2.2.2
 states what should
occur if there is no To tag*

The suggested solutions were:
a) increment CSeq - impossible to do with a proxy
b) send both SAVP and AVP lines in the SDP of the original INVITE. If media
encryption is set to mandatory and SIP TLS is enabled then the SAVP offer
would be accepted. If media encryption is off in Bria, then the AVP offer
would be accepted

Good luck.

On Mon, Apr 19, 2021 at 3:55 AM Markus Bönke  wrote:

> Hello NG,
>
> I saw the following threads discussing how to switch to RTP when a client
> does not support SRTP.
>
> https://lists.kamailio.org/pipermail/sr-users/2018-May/101341.html
> https://lists.kamailio.org/pipermail/sr-users/2016-September/094457.html
>
> There are some issues with Zoiper and Bria which also persist in the
> latest versions. Has anyone got it work with Zoiper and Bria?
>
> Thanks and regards
>
> Markus
>
> ___
> 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 + Websocket issues

2021-03-26 Thread Sergiu Pojoga
Yes, *add_contact_alias* for register on the way to asterisk followed by
*handle_ruri_alias* for requests from asterisk will do the job.

I assume you followed the famous https://github.com/havfo/WEBRTC-to-SIP

Regards,
--Sergiu


On Fri, Mar 26, 2021 at 11:04 AM Vinicius Kwiecien Ruoso <
vinic...@leads2b.com> wrote:

> Asterisk 13 will be EOL soon, so that would be my last resort.
>
> Do you have any input if the contact alias should be enough to get
> this working in that case?
>
> On Thu, Mar 25, 2021 at 9:47 AM Sergiu Pojoga  wrote:
> >
> > Use asterisk 13 with chan_sip + PATH
> >
> > Regardless, it's becoming off-topic as the quarrel is with Asterisk.
> >
> > On Thu, Mar 25, 2021 at 8:16 AM Vinicius Kwiecien Ruoso <
> vinic...@leads2b.com> wrote:
> >>
> >> Hi David,
> >>
> >> Each Asterisk is independent in my setup. Also, the issue is with
> >> calls from Asterisk with destination to a client connected via
> >> websocket. The browser is not directly connected to Asterisk, but to
> >> Kamailio.
> >>
> >> Thanks,
> >> Vinicius
> >>
> >> On Thu, Mar 25, 2021 at 7:01 AM David Villasmil
> >>  wrote:
> >> >
> >> > Send the invite to all asterisk, whichever has it will respond.
> >> >
> >> > On Thu, 25 Mar 2021 at 01:41, Vinicius Kwiecien Ruoso <
> vinic...@leads2b.com> wrote:
> >> >>
> >> >> Hi Segiu,
> >> >>
> >> >> Yeah, I understand that won't be the way forward, so I need another
> >> >> way for Kamailio to figure out the route to the websocket when
> >> >> Asterisk is making the call.
> >> >>
> >> >> I've shared my config file, also with some attempts commented in the
> >> >> previous emails. The alternatives were to use an alias, or an encoded
> >> >> param. I think the alias would be a better alternative, but could not
> >> >> get it right yet.
> >> >>
> >> >> Greetings,
> >> >> Vinicius
> >> >>
> >> >> On Wed, Mar 24, 2021 at 7:16 PM Sergiu Pojoga 
> wrote:
> >> >> >
> >> >> > Vinicius,
> >> >> >
> >> >> > The obvious is that PATH is broken in Asterisk's PJSIP and they
> won't do anything about it as it's marked "minor". It's been 2 yrs now that
> me and others have reported it.
> >> >> > [3]
> https://community.asterisk.org/t/wrong-d-uri-for-invites-with-pjsip-and-path/74079
> >> >> >
> >> >> > Bottom line: there's nothing wrong with Kamailio. Start looking
> for a workaround, don't bet on Sangoma to fix it any time soon, lol.
> >> >> >
> >> >> > Regards,
> >> >> > --Sergiu
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Wed, Mar 24, 2021 at 4:52 PM Vinicius Kwiecien Ruoso <
> vinic...@leads2b.com> wrote:
> >> >> >>
> >> >> >> Hi!
> >> >> >>
> >> >> >> Thanks for the fast response. Sorry about not replying to the
> correct
> >> >> >> email, I've just entered the list and was not getting its
> individual
> >> >> >> emails.
> >> >> >>
> >> >> >> > So it’s an outbound call to a webrtc registered user? If so,
> kamailio
> >> >> >> > should route it to wherever the called user is registered.
> >> >> >>
> >> >> >> Yes, it is a call from the backend Asterisk to a user registered
> via
> >> >> >> the websocket. The register is not stored in Kamailio, so it
> needs to
> >> >> >> use the information in the INVITE message to be able to route to
> the
> >> >> >> correct connection.
> >> >> >>
> >> >> >> > you'll need to share your config and logs. This should work in
> your scenario.
> >> >> >>
> >> >> >> Turns out looking closer, Asterisk is not respecting the Path
> protocol
> >> >> >> [1] [2]. In the INVITE sent to Kamailio, there is no information
> about
> >> >> >> the path in the message.
> >> >> >>
> >> >> >> To me the best second approach that should work is the "alias="
> >> >> >> information in the contact. That makes sense

Re: [SR-Users] Kamailio + Websocket issues

2021-03-25 Thread Sergiu Pojoga
Use asterisk 13 with chan_sip + PATH

Regardless, it's becoming off-topic as the quarrel is with Asterisk.

On Thu, Mar 25, 2021 at 8:16 AM Vinicius Kwiecien Ruoso <
vinic...@leads2b.com> wrote:

> Hi David,
>
> Each Asterisk is independent in my setup. Also, the issue is with
> calls from Asterisk with destination to a client connected via
> websocket. The browser is not directly connected to Asterisk, but to
> Kamailio.
>
> Thanks,
> Vinicius
>
> On Thu, Mar 25, 2021 at 7:01 AM David Villasmil
>  wrote:
> >
> > Send the invite to all asterisk, whichever has it will respond.
> >
> > On Thu, 25 Mar 2021 at 01:41, Vinicius Kwiecien Ruoso <
> vinic...@leads2b.com> wrote:
> >>
> >> Hi Segiu,
> >>
> >> Yeah, I understand that won't be the way forward, so I need another
> >> way for Kamailio to figure out the route to the websocket when
> >> Asterisk is making the call.
> >>
> >> I've shared my config file, also with some attempts commented in the
> >> previous emails. The alternatives were to use an alias, or an encoded
> >> param. I think the alias would be a better alternative, but could not
> >> get it right yet.
> >>
> >> Greetings,
> >> Vinicius
> >>
> >> On Wed, Mar 24, 2021 at 7:16 PM Sergiu Pojoga 
> wrote:
> >> >
> >> > Vinicius,
> >> >
> >> > The obvious is that PATH is broken in Asterisk's PJSIP and they won't
> do anything about it as it's marked "minor". It's been 2 yrs now that me
> and others have reported it.
> >> > [3]
> https://community.asterisk.org/t/wrong-d-uri-for-invites-with-pjsip-and-path/74079
> >> >
> >> > Bottom line: there's nothing wrong with Kamailio. Start looking for a
> workaround, don't bet on Sangoma to fix it any time soon, lol.
> >> >
> >> > Regards,
> >> > --Sergiu
> >> >
> >> >
> >> >
> >> > On Wed, Mar 24, 2021 at 4:52 PM Vinicius Kwiecien Ruoso <
> vinic...@leads2b.com> wrote:
> >> >>
> >> >> Hi!
> >> >>
> >> >> Thanks for the fast response. Sorry about not replying to the correct
> >> >> email, I've just entered the list and was not getting its individual
> >> >> emails.
> >> >>
> >> >> > So it’s an outbound call to a webrtc registered user? If so,
> kamailio
> >> >> > should route it to wherever the called user is registered.
> >> >>
> >> >> Yes, it is a call from the backend Asterisk to a user registered via
> >> >> the websocket. The register is not stored in Kamailio, so it needs to
> >> >> use the information in the INVITE message to be able to route to the
> >> >> correct connection.
> >> >>
> >> >> > you'll need to share your config and logs. This should work in
> your scenario.
> >> >>
> >> >> Turns out looking closer, Asterisk is not respecting the Path
> protocol
> >> >> [1] [2]. In the INVITE sent to Kamailio, there is no information
> about
> >> >> the path in the message.
> >> >>
> >> >> To me the best second approach that should work is the "alias="
> >> >> information in the contact. That makes sense?
> >> >>
> >> >> I'm sharing my current config as an attachment here. I'm new to
> >> >> Kamailio, so I might be missing something really obvious here.
> >> >>
> >> >> [1] https://issues.asterisk.org/jira/browse/ASTERISK-28211
> >> >> [2]
> https://community.asterisk.org/t/pjsip-path-module-issues/88046/12
> >> >>
> >> >> Thanks,
> >> >> Vinicius
> >> >>
> >> >> On Tue, Mar 23, 2021 at 6:43 PM Vinicius Kwiecien Ruoso
> >> >>  wrote:
> >> >> >
> >> >> > Hi!
> >> >> >
> >> >> > I'm using Kamaio in front of multiple Asterisk instances. At this
> >> >> > moment it works as a SIP over Websocket proxy, with rtpengine, for
> >> >> > browser clients to connect to Asterisk using WebRTC. I do not use
> the
> >> >> > registration module of Kamailio, as each backend Asterisk is
> >> >> > independent and handles its own registrations.
> >> >> >
> >> >> > Everything works great when making calls from the browser, and the
&

Re: [SR-Users] Kamailio + Websocket issues

2021-03-24 Thread Sergiu Pojoga
Vinicius,

The obvious is that PATH is broken in Asterisk's PJSIP and they won't do
anything about it as it's marked "minor". It's been 2 yrs now that me and
others have reported it.
[3]
https://community.asterisk.org/t/wrong-d-uri-for-invites-with-pjsip-and-path/74079

Bottom line: there's nothing wrong with Kamailio. Start looking for a
workaround, don't bet on Sangoma to fix it any time soon, lol.

Regards,
--Sergiu



On Wed, Mar 24, 2021 at 4:52 PM Vinicius Kwiecien Ruoso <
vinic...@leads2b.com> wrote:

> Hi!
>
> Thanks for the fast response. Sorry about not replying to the correct
> email, I've just entered the list and was not getting its individual
> emails.
>
> > So it’s an outbound call to a webrtc registered user? If so, kamailio
> > should route it to wherever the called user is registered.
>
> Yes, it is a call from the backend Asterisk to a user registered via
> the websocket. The register is not stored in Kamailio, so it needs to
> use the information in the INVITE message to be able to route to the
> correct connection.
>
> > you'll need to share your config and logs. This should work in your
> scenario.
>
> Turns out looking closer, Asterisk is not respecting the Path protocol
> [1] [2]. In the INVITE sent to Kamailio, there is no information about
> the path in the message.
>
> To me the best second approach that should work is the "alias="
> information in the contact. That makes sense?
>
> I'm sharing my current config as an attachment here. I'm new to
> Kamailio, so I might be missing something really obvious here.
>
> [1] https://issues.asterisk.org/jira/browse/ASTERISK-28211
> [2] https://community.asterisk.org/t/pjsip-path-module-issues/88046/12
>
> Thanks,
> Vinicius
>
> On Tue, Mar 23, 2021 at 6:43 PM Vinicius Kwiecien Ruoso
>  wrote:
> >
> > Hi!
> >
> > I'm using Kamaio in front of multiple Asterisk instances. At this
> > moment it works as a SIP over Websocket proxy, with rtpengine, for
> > browser clients to connect to Asterisk using WebRTC. I do not use the
> > registration module of Kamailio, as each backend Asterisk is
> > independent and handles its own registrations.
> >
> > Everything works great when making calls from the browser, and the
> > routing is correctly executed by Kamailio based on the request SIP
> > domain. We have an internal routing API that it calls to discover
> > which backend Asterisk to route the calls.
> >
> > The issue I have is when a call initiates from that backend Asterisk,
> > trying to reach a contact that is connected in Kamailio via the
> > websocket. The Asterisk sends the message to the proxy, and Kamailio
> > must route it to the corresponding websocket.
> >
> > I've tried a few approaches:
> > - using add_contact_alias + handle_ruri_alias: I have the alias with
> > alias=~~ws in the contact registration, but for some reason
> > handle_ruri_alias cannot use it
> > - using the Path module on Asterisk, so when registering, the path is
> > recorded and sent back from Asterisk, Kamailio is also not respecting
> > that
> > - Using contact_param_encode and contact_param_encode and
> > contact_param_decode_ruri, but the encoded sip address is always the
> > invalid websocket, like sip:58c0ktrg@5hp0nn5hqqv9.invalid;transport=ws
> >
> > None with success. Any hints on that can be wrong? I can share more
> > detailed information.
> >
> > Greetings,
> > Vinicius
> ___
> 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] Hunt groups with alias_db_lookup

2021-03-02 Thread Sergiu Pojoga
alias_db_lookup will lookup the AoR. In that AoR you can have one or more
Contacts, after  lookup("location").

Or am I missing something?

On Tue, Mar 2, 2021 at 12:53 PM Adam McCarthy 
wrote:

> Hello,
>
> I'm currently using alias_db_lookup to map inbound calls from my SIP
> carrier to internal endpoints e.g.,
> 1nxx...@sip.example.com -> al...@sip.example.com.
>
> This works well, but I would now like to simultaneously call alice@ and
> bob@, e.g.
>
> alias_db_lookup(...)  # somehow return alice@ and bob@
> append_branch("sip:b...@sip.example.com")
>
> as described here:
> http://kamailio.org/docs/modules/devel/modules/tm.html#tm.serial_forking
>
> This is effectively a hunt group, where two users are called and once
> one user picks up the call, the second is sent a CANCEL.
>
> How would I acheive this with Kamailio?
>
> Thanks,
> Adam
>
>
> ___
> 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] Load htable from MongoDB

2021-03-02 Thread Sergiu Pojoga
Hi Henning,

Well, it works fine if the document is a "flat JSON" without arrays and
other sub-objects in it. I tried with and without escaping quotation marks,
but no luck.

ERROR: db_mongodb [mongodb_dbase.c:452]: db_mongodb_get_columns(): field
["Location":"Prefix"] not found in result iterator

ERROR: db_mongodb [mongodb_dbase.c:452]: db_mongodb_get_columns(): field
[Location:Prefix] not found in result iterator

Regards,
--Sergiu

On Tue, Mar 2, 2021 at 12:11 PM Henning Westerholt  wrote:

> Hi Sergiu,
>
>
>
> I did not try it by myself so far, maybe others can comment on it.
> Normally you should be able to use the htable module on all usual database
> modules (that offer the needed capabilities).
>
> What are the error messages that you get, maybe there are some hints in it?
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *Sergiu
> Pojoga
> *Sent:* Tuesday, March 2, 2021 4:39 PM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* [SR-Users] Load htable from MongoDB
>
>
>
> Hi there,
>
>
>
> Question: is it possible to load a htable, defined by columns, from a
> MongoDB collection, when a certain "column" is an object with multiple
> elements?
>
>
>
> For example:
>
> modparam("htable", "htable",
> "users=>size=10;dbtable=users;cols='FirstName,LastName,Location:Prefix';")
>
>
>
> Fails when trying to load the value of Location.Prefix
>
>
>
> {
> "FirstName": "John",
> "LastName": "Doe",
> "Language" : "en",
> "Location" : {
> "Country" : "USA",
> "City" : "New York",
> "Prefix" : "+1"
> }
> }
>
>
>
> Thanks in advance.
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC changing port for same registration

2021-03-02 Thread Sergiu Pojoga
Are you supporting a single Contact per AoR? Otherwise, I don't see how you
can keep track of "changes in location and detect if an agent is online".

If so, just set the *0x04 *registrar flag and you'll always have the latest
registered Contact address in Location.

https://kamailio.org/docs/modules/devel/modules/registrar.html#registrar.f.save

Regards,
--Sergiu

On Tue, Mar 2, 2021 at 8:26 AM Michal Popovic 
wrote:

> Hello everybody,
>
> let's have a situation where UAC is behind the NAT and router suddenly
> change the external port.
>
> Kamailio in this case creates two location entries one with old port and
> one with the new one.
>
> Now UAC unregister from the new one and old location remains active until
> it expires and our support system that is listening to locations changes
> keep the agent online for other services.
>
> Is there any way besides the regular OPTIONS ping from UAS to UAC how to
> solve this issue?
>
> Thanks.
> Michal
> ___
> 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] Load htable from MongoDB

2021-03-02 Thread Sergiu Pojoga
Hi there,

Question: is it possible to load a htable, defined by columns, from a
MongoDB collection, when a certain "column" is an object with multiple
elements?

For example:
modparam("htable", "htable",
"users=>size=10;dbtable=users;cols='FirstName,LastName,Location:Prefix';")

Fails when trying to load the value of Location.Prefix

{
"FirstName": "John",
"LastName": "Doe",
"Language" : "en",
"Location" : {
"Country" : "USA",
"City" : "New York",
"Prefix" : "+1"
}
}

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


Re: [SR-Users] Kamailio Split Variable

2021-02-10 Thread Sergiu Pojoga
Have a look at
https://www.kamailio.org/wiki/cookbooks/devel/transformations#sselect_index_separator

On Wed, Feb 10, 2021 at 8:51 AM Mihai  wrote:

> Hi!
>
> Can I split the variable $fd ?
>
> the $fd has the value: asterisk-wind.voicevw.lan; and i want to take the
> the first part  - asterisk-wind
>
> any hints ?
> ___
> 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] Releasing Kamailio v5.4.4

2021-02-09 Thread Sergiu Pojoga
Well, I'd like to see PR https://github.com/kamailio/kamailio/pull/2470
backported into a stable branch.

Me myself & I have tested quickly this new feature using the master branch
and it's been working fine so far.

So yeah, please, if possible.

On Tue, Feb 9, 2021 at 8:11 PM Anthony Joseph Messina 
wrote:

> I'd like to see the fix for --atexit=yes|no https://github.com/kamailio/
> kamailio/issues/2616 
> implemented in master (https://github.com/kamailio/
> kamailio/issues/2616#issuecomment-772512372
> )
> be backported, perhaps with a
> quick look into https://github.com/kamailio/kamailio/issues/2632
>
> I realize part of --atexit=yes|no is a new feature, but it also enables
> http_async_query to work with TLS in 5.4, so also a bug fix (I'm hoping
> you
> think so too).
>
> Thank you.
>
> On Tuesday, February 9, 2021 7:40:52 AM CST Daniel-Constantin Mierla wrote:
> > Hello,
> >
> > I am considering to release Kamailio v5.4.4 sometime next week, likely
> > on Monday, February 15, 2020. This is the usual heads up notification to
> > see if anyone is aware of issues not yet reported to bug tracker and if
> > yes, do it as soon as possible to give them a chance to be fixed.
> >
> > Cheers,
> > Daniel
> ___
> 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] logging error events to database

2021-01-30 Thread Sergiu Pojoga
Hi Joel,

No. That particular case occurred with a client's Yeastar S100 PBX, where
during a Re-INVITE it would send an empty SDP c= field. Buggy appliance.

On Sat, Jan 30, 2021 at 11:23 AM Joel Serrano  wrote:

> Hey Sergiu,
>
> I’m curious, have you seen that happen by any chance on the kams your have
> taking with MSTeams?
>
> Joel.
>
> On Fri, Jan 29, 2021 at 11:31 Sergiu Pojoga  wrote:
>
>> Thanks Alex & Daniel for suggesting these ingenious potential solutions.
>>
>> On Fri, Jan 29, 2021 at 2:09 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> To add a little bit, look at log_custom, the log message can be
>>> forwarded over udp to another application, which can be developed for
>>> specific purposes, like writing to database, probably easy to do using
>>> golang or python.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 29.01.21 19:32, Alex Balashov wrote:
>>> > Not directly from Kamailio, unless you want to "log" manually using
>>> > sql_query().
>>> >
>>> > Commonplace approaches for this:
>>> >
>>> > 1) Forward Kamailio syslog data to a syslog-ng server - i.e. in your
>>> > local /etc/rsyslog.conf or whatever:
>>> >
>>> > local0.error   @remote.server:514
>>> >
>>> > syslog-ng supports PostgreSQL and other storage destinations:
>>> >
>>> > https://wiki.archlinux.org/index.php/syslog-ng#PostgreSQL_Destination
>>> >
>>> > And it can filter and parse entries based on regular expressions to
>>> > make what you store more selective.
>>> >
>>> > However, beware of the uncertain performance characteristics of this
>>> > setup under heavy loads, and also the poor suitability of RDBMs to
>>> > short-lived data sets that constantly turn over. Lessons learned the
>>> > hard way.
>>> >
>>> > 2) The Elasticsearch way -- which originally required Elasticsearch +
>>> > Logstash, but now apparently can work through syslog-ng directly:
>>> >
>>> >
>>> https://www.syslog-ng.com/community/b/blog/posts/logging-to-elasticsearch-made-simple-with-syslog-ng
>>> >
>>> >
>>> > Of course, you can still go the traditional Logstash route.
>>> >
>>> > I haven't personally used Elasticsearch, but it sounds like the better
>>> > way to go than a traditional RDBM if you're dealing with large volumes
>>> > of syslog data that are rotated out frequently.
>>> >
>>> > On the other hand, if you're only looking to log occasional critical
>>> > errors, not "everything", then just about any approach will work fine.
>>> >
>>> > -- Alex
>>> >
>>> > On 1/29/21 1:16 PM, Sergiu Pojoga wrote:
>>> >
>>> >> Hi there,
>>> >>
>>> >> I was wondering if there's a way to log various core error events in
>>> >> some DB.
>>> >>
>>> >> For example, below error occurred
>>> >>
>>> >> Jan 29 11:43:56 kamailio[11076]: {1 11440 INVITE
>>> >> 28b653bd-8f62-4085-a5ef-f2a4ac0f393d } ERROR: 
>>> >> [core/parser/sdp/sdp_helpr_funcs.c:499]: extract_mediaip(): no
>>> >> `IP[4|6]' address in `c=' field
>>> >>
>>> >> Jan 29 11:43:56 kamailio[11076]: {1 11440 INVITE
>>> >> 28b653bd-8f62-4085-a5ef-f2a4ac0f393d } ERROR: 
>>> >> [core/parser/sdp/sdp.c:430]: parse_sdp_session(): can't extract
>>> >> common media IP from the message
>>> >>
>>> >> Thanks in advance. Regards,
>>> >> --Sergiu
>>> >>
>>> >> ___
>>> >> Kamailio (SER) - Users Mailing List
>>> >> sr-users@lists.kamailio.org
>>> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>> >>
>>> >
>>> >
>>> > --
>>> > 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
>>>
>>> --
>>> Daniel-Constantin Mierla -- www.asipto.com
>>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>>> Funding: https://www.paypal.me/dcmierla
>>>
>>>
>>> ___
>>> 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] logging error events to database

2021-01-29 Thread Sergiu Pojoga
Thanks Alex & Daniel for suggesting these ingenious potential solutions.

On Fri, Jan 29, 2021 at 2:09 PM Daniel-Constantin Mierla 
wrote:

> To add a little bit, look at log_custom, the log message can be
> forwarded over udp to another application, which can be developed for
> specific purposes, like writing to database, probably easy to do using
> golang or python.
>
> Cheers,
> Daniel
>
> On 29.01.21 19:32, Alex Balashov wrote:
> > Not directly from Kamailio, unless you want to "log" manually using
> > sql_query().
> >
> > Commonplace approaches for this:
> >
> > 1) Forward Kamailio syslog data to a syslog-ng server - i.e. in your
> > local /etc/rsyslog.conf or whatever:
> >
> > local0.error   @remote.server:514
> >
> > syslog-ng supports PostgreSQL and other storage destinations:
> >
> > https://wiki.archlinux.org/index.php/syslog-ng#PostgreSQL_Destination
> >
> > And it can filter and parse entries based on regular expressions to
> > make what you store more selective.
> >
> > However, beware of the uncertain performance characteristics of this
> > setup under heavy loads, and also the poor suitability of RDBMs to
> > short-lived data sets that constantly turn over. Lessons learned the
> > hard way.
> >
> > 2) The Elasticsearch way -- which originally required Elasticsearch +
> > Logstash, but now apparently can work through syslog-ng directly:
> >
> >
> https://www.syslog-ng.com/community/b/blog/posts/logging-to-elasticsearch-made-simple-with-syslog-ng
> >
> >
> > Of course, you can still go the traditional Logstash route.
> >
> > I haven't personally used Elasticsearch, but it sounds like the better
> > way to go than a traditional RDBM if you're dealing with large volumes
> > of syslog data that are rotated out frequently.
> >
> > On the other hand, if you're only looking to log occasional critical
> > errors, not "everything", then just about any approach will work fine.
> >
> > -- Alex
> >
> > On 1/29/21 1:16 PM, Sergiu Pojoga wrote:
> >
> >> Hi there,
> >>
> >> I was wondering if there's a way to log various core error events in
> >> some DB.
> >>
> >> For example, below error occurred
> >>
> >> Jan 29 11:43:56 kamailio[11076]: {1 11440 INVITE
> >> 28b653bd-8f62-4085-a5ef-f2a4ac0f393d } ERROR: 
> >> [core/parser/sdp/sdp_helpr_funcs.c:499]: extract_mediaip(): no
> >> `IP[4|6]' address in `c=' field
> >>
> >> Jan 29 11:43:56 kamailio[11076]: {1 11440 INVITE
> >> 28b653bd-8f62-4085-a5ef-f2a4ac0f393d } ERROR: 
> >> [core/parser/sdp/sdp.c:430]: parse_sdp_session(): can't extract
> >> common media IP from the message
> >>
> >> Thanks in advance. Regards,
> >> --Sergiu
> >>
> >> ___
> >> Kamailio (SER) - Users Mailing List
> >> sr-users@lists.kamailio.org
> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >>
> >
> >
> > --
> > 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
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
>
>
> ___
> 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] logging error events to database

2021-01-29 Thread Sergiu Pojoga
Hi there,

I was wondering if there's a way to log various core error events in some
DB.

For example, below error occurred

Jan 29 11:43:56 kamailio[11076]: {1 11440 INVITE
28b653bd-8f62-4085-a5ef-f2a4ac0f393d } ERROR: 
[core/parser/sdp/sdp_helpr_funcs.c:499]: extract_mediaip(): no `IP[4|6]'
address in `c=' field

Jan 29 11:43:56 kamailio[11076]: {1 11440 INVITE
28b653bd-8f62-4085-a5ef-f2a4ac0f393d } ERROR: 
[core/parser/sdp/sdp.c:430]: parse_sdp_session(): can't extract common
media IP from the message

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


Re: [SR-Users] loose_route() - Local Proxy

2021-01-04 Thread Sergiu Pojoga
In domain's modparam, do you have "register_myself" enabled?

What if you define local domains via "alias=my_domain", does it make a
difference?

Regards,

On Mon, Jan 4, 2021 at 9:47 AM Duarte Rocha  wrote:

> Greetings,
>
> I'm using loose_route() from the RR module and i'm having troubles making
> it use the following exception from the code : "There is only one
> exception: If the request is out-of-dialog (no to-tag) and there is only
> one Route: header indicating the local proxy, then the Route: header is
> removed and the function returns FALSE."
>
> My example is a REGISTER without To-TAG which has a Route header with
> kamailio address. If i use proxy IP on Route header , loose_route() returns
> false as it should. However, if i use an hostname belonging to the proxy
>  in the route, loose_route() returns true.
>
> I have hostnames and local ips defined in the "DOMAIN" table but it
> doesn't seem to be working. Which other places can local hostnames and ips
> be configured in order to be seen as local to loose_route() ?
>
> Best Regards
> ___
> 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] X-Forwarded-for IP to asterisk

2020-12-15 Thread Sergiu Pojoga
Although not strictly a Kamailio-related question... and also depending on
how you "forward" registrations to Asterisk, but usually setting
*nat=no* should
show the peer's public IP.

Regards,
--Sergiu

On Tue, Dec 15, 2020 at 9:33 AM Mihai Cezar  wrote:

> Hello,
>
> Is it something like the XFF for Kamailio so I can see in asterisk (sip
> show peers) the ip of the registered softphone and not Kamailio's IP ?
>
> Thanks!
> ___
> 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 profile not defined

2020-12-04 Thread Sergiu Pojoga
Hmmm... if dialog params are wrapped in a ifdef condition, then do you have
something like #!define WITH_DIALOG at the top?

Otherwise the rest looks ok to me judging by the snippet that was provided.

On Fri, Dec 4, 2020 at 7:49 AM Gertjan Wolzak  wrote:

> Hello Sergiu,
>
> Thank you for the pointer, the line 1576 is:
>
> get_profile_size("callee", "$avp(custid)", "$avp(concurrent)");
>
>
> That is where Kamailio refuses to start
>
> And as you mentioned my error in the IF statement after correction you
> pointed out, Kamailio still refuses on the fact that the profile
>  was not defined...
>
> Dec  4 13:42:50 proxy01 /usr/local/sbin/kamailio[75008]: CRITICAL:
> dialog [dialog.c:391]: fixup_profile(): profile  not defined
> Dec  4 13:42:50 proxy01 /usr/local/sbin/kamailio[75008]: ERROR: 
> [core/route.c:1166]: fix_actions(): fixing failed (code=-6) at
> cfg:/usr/local/etc/kamailio/kamailio.cfg:1576
> Dec  4 13:42:50 proxy01 systemd[1]: kamailio.service: Main process
> exited, code=exited, status=255/n/a
> Dec  4 13:42:50 proxy01 systemd[1]: kamailio.service: Failed with result
> 'exit-code'.
>
> Does anyone else maybe have an idea on where I go wrong?
>
> Rgds,
>
> Gertjan
>
>
>
>
>
> ___
> 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 profile not defined

2020-12-03 Thread Sergiu Pojoga
Bonus: better replace that equal with >= comparison. There may be
conditions under which the dialog profile counting has already exceeded the
max limit, in which case the call would go through.

Regards,
--Sergiu

On Thu, Dec 3, 2020 at 2:39 PM Sergiu Pojoga  wrote:

> Hi Gertjan,
>
> Probably unrelated, but you have a syntax error in the IF statement, has
> to be double ==
>
> if( $avp(concurrent) == $var(max) )
>
> See if that helps. Otherwise, what's the line #1576?
>
> Regards,
> --Sergiu
>
> On Thu, Dec 3, 2020 at 4:06 AM Gertjan Wolzak  wrote:
>
>> Hello Kamailions,
>>
>> I am running into the following issue.
>>
>> The same setup I had working on 5.0, now I am using a 5.4 version of
>> Kamailio, but I do not believe it has to do with the version, more with
>> my ability to make errors...
>>
>> I am trying to limit incoming calls by using the dialog module. The max
>> concurrent calls value I retrieve from a database.
>>
>> But when I try to start Kamailio it will not because the dialog profile
>> is not defined...
>>
>> These are my configured Dialog parameters:
>>
>> #  Dialog params -
>> modparam("dialog", "default_timeout", 7200)
>> modparam("dialog", "db_mode", 0)
>> modparam("dialog", "dlg_flag", DLG_FLAG)
>> modparam("dialog", "hash_size", 4096)
>> #modparam("dialog", "detect_spirals", 1)
>> modparam("dialog", "profiles_with_value", "callee")
>>
>>
>> My check on the concurrent inbound calls:
>>
>> route[CONCURRENT_IN]
>> {
>>  #Add call to callee profile
>>  #Check if callee has not reached inbound call limit
>>
>>  #Get max concurrent calls
>>  sql_query("cc", "select max_calls_in from calllimit where
>> cust_id='$avp(custid)'", "ra");
>>  $avp(maxcalls)=$dbr(ra=>[0,0]);
>>  sql_result_free("ra");
>>  $avp(concurrent) = 0;
>>  get_profile_size("callee", "$avp(custid)", "$avp(concurrent)");
>>  if( $avp(concurrent) = $var(max) )
>>  {
>>  xlog("L_INFO"," Call limit reached for customer
>> $avp(custid)\r\n ");
>>  sl_send_reply("503", "No Lines Available");
>>  exit;
>>  }
>>
>>  set_dlg_profile("callee", "$avp(custid)");
>>
>>  return;
>> }
>>
>>
>> And the kamailio log error:
>>
>> Dec  3 09:12:08 proxy01 kamailio[74102]: INFO:  [main.c:2833]:
>> main(): processes (at least): 21 - shm size: 67108864 - pkg size: 8388608
>> Dec  3 09:12:08 proxy01 kamailio[74102]: CRITICAL: dialog
>> [dialog.c:391]: fixup_profile(): profile  not defined
>> Dec  3 09:12:08 proxy01 kamailio[74102]: ERROR: 
>> [core/route.c:1166]: fix_actions(): fixing failed (code=-6) at
>> cfg:/usr/local/etc/kamailio/kamailio.cfg:1576
>>
>>
>> Is someone able to see where I go wrong and point me in the right
>> direction?
>>
>> Thank you.
>>
>> Rgds,
>>
>> Gertjan Wolzak
>>
>>
>> ___
>> 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 profile not defined

2020-12-03 Thread Sergiu Pojoga
Hi Gertjan,

Probably unrelated, but you have a syntax error in the IF statement, has to
be double ==

if( $avp(concurrent) == $var(max) )

See if that helps. Otherwise, what's the line #1576?

Regards,
--Sergiu

On Thu, Dec 3, 2020 at 4:06 AM Gertjan Wolzak  wrote:

> Hello Kamailions,
>
> I am running into the following issue.
>
> The same setup I had working on 5.0, now I am using a 5.4 version of
> Kamailio, but I do not believe it has to do with the version, more with
> my ability to make errors...
>
> I am trying to limit incoming calls by using the dialog module. The max
> concurrent calls value I retrieve from a database.
>
> But when I try to start Kamailio it will not because the dialog profile
> is not defined...
>
> These are my configured Dialog parameters:
>
> #  Dialog params -
> modparam("dialog", "default_timeout", 7200)
> modparam("dialog", "db_mode", 0)
> modparam("dialog", "dlg_flag", DLG_FLAG)
> modparam("dialog", "hash_size", 4096)
> #modparam("dialog", "detect_spirals", 1)
> modparam("dialog", "profiles_with_value", "callee")
>
>
> My check on the concurrent inbound calls:
>
> route[CONCURRENT_IN]
> {
>  #Add call to callee profile
>  #Check if callee has not reached inbound call limit
>
>  #Get max concurrent calls
>  sql_query("cc", "select max_calls_in from calllimit where
> cust_id='$avp(custid)'", "ra");
>  $avp(maxcalls)=$dbr(ra=>[0,0]);
>  sql_result_free("ra");
>  $avp(concurrent) = 0;
>  get_profile_size("callee", "$avp(custid)", "$avp(concurrent)");
>  if( $avp(concurrent) = $var(max) )
>  {
>  xlog("L_INFO"," Call limit reached for customer
> $avp(custid)\r\n ");
>  sl_send_reply("503", "No Lines Available");
>  exit;
>  }
>
>  set_dlg_profile("callee", "$avp(custid)");
>
>  return;
> }
>
>
> And the kamailio log error:
>
> Dec  3 09:12:08 proxy01 kamailio[74102]: INFO:  [main.c:2833]:
> main(): processes (at least): 21 - shm size: 67108864 - pkg size: 8388608
> Dec  3 09:12:08 proxy01 kamailio[74102]: CRITICAL: dialog
> [dialog.c:391]: fixup_profile(): profile  not defined
> Dec  3 09:12:08 proxy01 kamailio[74102]: ERROR: 
> [core/route.c:1166]: fix_actions(): fixing failed (code=-6) at
> cfg:/usr/local/etc/kamailio/kamailio.cfg:1576
>
>
> Is someone able to see where I go wrong and point me in the right
> direction?
>
> Thank you.
>
> Rgds,
>
> Gertjan Wolzak
>
>
> ___
> 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] Location Fields Address vs Received

2020-11-25 Thread Sergiu Pojoga
In short, if NAT is detected during REGISTER - then Received is set (it
later becomes the D-URI when sending something to that Contact).

https://kamailio.org/docs/modules/stable/modules/nathelper.html#nathelper.p.received_avp

Regards,

On Wed, Nov 25, 2020 at 10:54 AM Daniel Greenwald 
wrote:

> On a usrloc record there is an Address field and Received field. The
> Received field is sometimes not set. What causes it to be not set and what
> is the difference between the two fields. Sorry if this is a dumb question,
> I looked at documentation but couldn't find it spelled out. Here is are 2
> examples from kamcmd ul.dump:
> {
>AoR: utkcf9b...@ata.phaxio.com
>Contacts: {
>Contact: {
>Address: 
> sip:utkc4ff9b6h3@69.78.34.56:4615;transport=tcp
>
>Expires: 42
>Q: -1.00
>Call-ID: d1c314305df3d342@192.168.0.3
>CSeq: 129173
>User-Agent: OBIHAI/OBi200-3.2.2.5898
>Received: [not set]
>Path: [not set]
>State: CS_NEW
>Flags: 0
>CFlags: 0
>Socket: tcp:10.0.22.254:5060
>Methods: 7839
>Ruid: uloc-5fbdd369-491e-4
>Instance:
> 
>Reg-Id: 0
>Server-Id: 0
>Tcpconn-Id: 58
>Keepalive: 0
>Last-Keepalive: 1606317577
>Last-Modified: 1606317577
>}
>}
> }
>
>
>
>
>  Contact: {
> Address: sip:mfjngfd272av@192.168.0.106:5060
> Expires: 30
> Q: -1.00
> Call-ID: 67413de375b2e76c@192.168.0.106
> CSeq: 146320
> User-Agent: OBIHAI/OBi300-3.2.2.5921
> Received: sip:70.34.56.78:5060
> Path: [not set]
> State: CS_NEW
> Flags: 0
> CFlags: 64
> Socket: udp:10.0.22.254:5060
> Methods: 7839
> Ruid: uloc-5fbdd369-490e-efa3
> Instance: 
> Reg-Id: 0
> Server-Id: 0
> Tcpconn-Id: -1
> Keepalive: 1
> Last-Keepalive: 1606314719
> Last-Modified: 1606314719
> }
> ___
> 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] ACK Relay Issue Transaction Not Found

2020-11-24 Thread Sergiu Pojoga
Or use sipdump module as an alternative

https://kamailio.org/docs/modules/stable/modules/sipdump.html

On Tue, Nov 24, 2020 at 12:55 PM Federico Cabiddu <
federico.cabi...@gmail.com> wrote:

> The outgoing (relayed) e2e ACK is not captured by the sipcapture module in
> "transaction" capture mode (the default), because of tm module internals.
> You have to explicitly capture it in the onsend_route.
>
> onsend_route {
> if ($rm == 'ACK') {
> sip_trace();
> }
> }
>
> Cheers,
>
> Federico
>
> On Tue, Nov 24, 2020 at 6:47 PM Alex Balashov 
> wrote:
>
>> On 11/24/20 12:35 PM, Antony Stone wrote:
>>
>> > On Tuesday 24 November 2020 at 18:28:44, Alex Balashov wrote:
>> >
>> >> Hiddenly? :-)
>> >
>> > I like the word - I can think of several contexts it would be useful
>> in, and
>> > the standard way of expressing the concept is so much less concise.
>>
>> It's true; the closest and comparably terse adverb I can readily conjure
>> is "surreptitiously", which implies a more actively deliberate and
>> nefarious level of packet forwarding.
>>
>> --
>> 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] kamailio.cfg fomatter

2020-11-24 Thread Sergiu Pojoga
The only other Kam syntax I know of is for vim

https://github.com/kamailio/vim-kamailio-syntax

Regards,
--Sergiu

On Tue, Nov 24, 2020 at 11:39 AM marek  wrote:

> hi,
>
> i'm using https://github.com/miconda/vscode-kamailio-syntax in VScode.
> its great!
>
> But i need format code. Are there some formatters for kamailio.cfg? It
> can be for other editors than VScode.
>
> Marek
>
>
> ___
> 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] how to add URI parameter

2020-11-15 Thread Sergiu Pojoga
Hi there,

Does Kamailio have a function to add URI parameters? I looked around but
couldn't find one. I refuse to believe Kamailio doesn't have one.

There's a *add_uri_param(param)*, but that's strictly for R-URI. I need it
for something else, Contact.

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


Re: [SR-Users] Checking callee registration

2020-11-10 Thread Sergiu Pojoga
You'll find your answer here:
https://lists.kamailio.org/pipermail/sr-users/2020-November/111075.html

On Mon, Nov 9, 2020 at 11:25 PM ahmed moghazy 
wrote:

> I know i should do it but how what is the code ?
>
> > On 09/11/2020, at 5:41 PM, Alex Balashov 
> wrote:
> >
> > You should do it!
> >
> >> On 11/9/20 9:04 AM, ahmed moghazy wrote:
> >> I want to check if callee is registered or not before routing call
> because this made error and make caller unregistered untill i restarted the
> linphone
> >> ___
> >> Kamailio (SER) - Users Mailing List
> >> sr-users@lists.kamailio.org
> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> > --
> > 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] outgoing TCP connection ID

2020-11-02 Thread Sergiu Pojoga
I see, basically "it's complicated" with TCP. Thanks for the detailed
explanation. Using ipops resolution would be detrimental, I will look into
the hash table suggestion.

Thanks!

On Mon, Nov 2, 2020 at 1:48 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> what's in kamailio memory related to a tcp connection may not be its
> actual state, because the kernel/tcp stack can be in reconnecting state
> without notifying the application layer. It can take up to a few minutes to
> get to timeout and report connection is closed. So I am not sure you can
> avoid send failure in t_relay(), and thus overall benefits could be minimal.
>
> Anyhow, look at the tcpops module, there is a function to get connection
> id by peer address/port, which you can get with next-hop variable before
> t_relay() (provided is not going to be fqdn, which may require mixing in
> ipops module).
>
> An alternative, if you need it for requests within dialog, you can use
> hash table to store the connection ID using call-id as key when processing
> the initial subscribe/invite, then you can retrieve it for bye/notify/...
>
> Cheers,
> Daniel
> On 02.11.20 19:04, Sergiu Pojoga wrote:
>
> Hi Daniel,
>
> In my case it's for an edge proxy scenario doing transport conversion, UDP
> backend to TCP/TLS client. So it would be after loose_route() followed by
> t_relay(). The initial TCP connection is established when a phone
> SUBSCRIBEs, later on the backend sends the in-dialog NOTIFY which often
> fails because the client & TCP connection is gone by now, causing a
> t_relay() failure.
>
> Thanks. Regards,
> --Sergiu
>
> On Mon, Nov 2, 2020 at 12:29 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> do you need it in a generic way, or after some specific operations like
>> lookup("location")?
>>
>> Cheers,
>> Daniel
>> On 01.11.20 16:45, Sergiu Pojoga wrote:
>>
>> Hi there,
>>
>> Is there a PV that exposes the outgoing TCP connection ID? $conid seems
>> to be for received only.
>>
>> *$conid - The TCP connection ID of the connection the current message
>> arrived on for TCP, TLS, WS, and WSS. Set to $null for SCTP and UDP.*
>>
>> The objective is to check the status of the egress TCP connection like
>> for e.g.:
>> if(!tcp_conid_state(conid)) {
>>
>> Thanks.
>> --Sergiu
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Funding: https://www.paypal.me/dcmierla
>>
>>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] outgoing TCP connection ID

2020-11-02 Thread Sergiu Pojoga
Hi Daniel,

In my case it's for an edge proxy scenario doing transport conversion, UDP
backend to TCP/TLS client. So it would be after loose_route() followed by
t_relay(). The initial TCP connection is established when a phone
SUBSCRIBEs, later on the backend sends the in-dialog NOTIFY which often
fails because the client & TCP connection is gone by now, causing a
t_relay() failure.

Thanks. Regards,
--Sergiu

On Mon, Nov 2, 2020 at 12:29 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> do you need it in a generic way, or after some specific operations like
> lookup("location")?
>
> Cheers,
> Daniel
> On 01.11.20 16:45, Sergiu Pojoga wrote:
>
> Hi there,
>
> Is there a PV that exposes the outgoing TCP connection ID? $conid seems to
> be for received only.
>
> *$conid - The TCP connection ID of the connection the current message
> arrived on for TCP, TLS, WS, and WSS. Set to $null for SCTP and UDP.*
>
> The objective is to check the status of the egress TCP connection like for
> e.g.:
> if(!tcp_conid_state(conid)) {
>
> Thanks.
> --Sergiu
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] outgoing TCP connection ID

2020-11-01 Thread Sergiu Pojoga
Hi there,

Is there a PV that exposes the outgoing TCP connection ID? $conid seems to
be for received only.

*$conid - The TCP connection ID of the connection the current message
arrived on for TCP, TLS, WS, and WSS. Set to $null for SCTP and UDP.*

The objective is to check the status of the egress TCP connection like for
e.g.:
if(!tcp_conid_state(conid)) {

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


Re: [SR-Users] Confusion about TCP worker ports

2020-10-29 Thread Sergiu Pojoga
In a nutshell, with TCP, it's the OS's network stack that assigns the port.

For more: https://lists.kamailio.org/pipermail/sr-users/2018-May/101529.html

On Thu, Oct 29, 2020 at 4:00 PM Noah Mehl  wrote:

> Alex,
>
> Is there no way to send the requests from the listen port?
>
> And if they’re not going to come from the listen port, can you please help
> me with the a way to update the message for the worker chosen rport?
>
> ~Noah
>
> On Oct 29, 2020, at 3:37 PM, Alex Balashov 
> wrote:
>
> Sorry to have missed your other question:
>
> The “resource temporarily unavailable” is a normal occurrence in a
> nonblocking connect(), and nothing to worry about.
>
> Unless the socket literally connects instantaneously, EAGAIN is what it’ll
> throw out when polled until connection is established.
>
> —
> Sent from mobile, with due apologies for brevity and errors.
>
> On Oct 29, 2020, at 3:27 PM, Alex Balashov 
> wrote:
>
> Internally generated requests are a little quirky in that they’re
> generated by outside timer processes or tasks in core timers — activity
> that takes place outside the SIP worker pool. However, the expectation is
> that any replies will be processed (in this case, absorbed) by the SIP
> workers.
>
> Asymmetric signalling is permitted in SIP, so sending from source port X
> while specifying a return port of Y in the top Via hop is perfectly
> acceptable.
>
> — Alex
>
> —
> Sent from mobile, with due apologies for brevity and errors.
>
> On Oct 29, 2020, at 3:21 PM, Noah Mehl  wrote:
>
> Hey all,
>
> I’m a little stuck on an implementation of a set of dispatchers via TCP.
> There are some oddities about the behavior of the TCP source port of the
> Kamailio tcp worker/s, and maybe this is expected, but it doesn’t seem
> valid.  For instance, I have a dispatcher:
>
> "RECORDS": [{
> "SET": {
> "ID": 1,
> "TARGETS": [{
> "DEST": {
> "URI": “sip:2.2.2.2:5060;transport=tcp",
> "FLAGS": "AP",
> "PRIORITY": 5
> }
> }]
> }
> }]
>
> But when Kamailio sends an OPTIONS keep alive, the source port for the
> worker is 33940, and not 5060 (which is the TCP listen port), as received
> by Freeswitch:
>
> recv 447 bytes from tcp/[1.1.1.1]:33940 at 18:58:24.958720:
>
>OPTIONS sip:2.2.2.2:5060;transport=tcp SIP/2.0
>Via: SIP/2.0/TCP
> 1.1.1.1;branch=z9hG4bK1525.80a9e442.0
>To: 
>From:  >;tag=3c52ba62ee4c4621b9660728159919d3-cda8066f
>CSeq: 10 OPTIONS
>Call-ID: 3aa18693487268dc-2790@1.1.1.1
>Max-Forwards: 70
>Content-Length: 0
>User-Agent: kamailio (5.4.2 (x86_64/linux))
>
>
>
> Also, I get weird debug messages when this tcp worker is spun up
> (specifically about Resource temporarily unavailable):
>
> 11(2790) DEBUG: dispatcher [dispatch.c:3340]: ds_ping_result_helper():
> probe all, mode DS_PROBE_ALL
> 11(2790) DEBUG: dispatcher [dispatch.c:3383]: ds_ping_set(): probing set
> #1, URI sip:2.2.2.2:5060;transport=tcp
> 11(2790) DEBUG: dispatcher [dispatch.c:3414]: ds_ping_set(): Default
> ping_from: sip:inbound-kamailio-01
> 11(2790) DEBUG: dispatcher [dispatch.c:3424]: ds_ping_set(): Default
> outbound proxy:
> 11(2790) DEBUG: tm [uac.c:450]: t_uac_prepare(): next_hop=<
> sip:2.2.2.2:5060;transport=tcp>
> 11(2790) DEBUG: tm [uac.c:158]: dlg2hash(): hashid 21073
> 11(2790) DEBUG:  [core/tcp_main.c:1993]: tcp_send(): no open tcp
> connection found, opening new one
> 11(2790) DEBUG:  [core/ip_addr.c:229]: print_ip(): tcpconn_new: new
> tcp connection: 2.2.2.2
> 11(2790) DEBUG:  [core/tcp_main.c:1175]: tcpconn_new(): on port
> 5060, type 2, socket -1
> 11(2790) DEBUG:  [core/tcp_main.c:1494]: tcpconn_add(): hashes:
> 2712:0:0, 1
> 11(2790) DEBUG:  [core/tcp_main.c:2886]: tcpconn_1st_send(): pending
> write on new connection 0x7f24e64c1e18 sock 8 (-1/447 bytes written) (err:
> 11 - Resource temporarily unavailable)
> 11(2790) DEBUG: tm [uac.c:678]: send_prepared_request_impl(): uac:
> 0x7f24e65285a8  branch: 0  to 2.2.2.2:5060
> 11(2790) DEBUG:  [core/onsend.c:50]: run_onsend(): required
> parameters are not available - ignoring
> 27(2806) DEBUG:  [core/tcp_main.c:3792]: handle_ser_child(): read
> response= 7f24e64c1e18, 5, fd 46 from 11 (2790)
> 27(2806) DEBUG:  [core/io_wait.h:375]: io_watch_add(): DBG:
> io_watch_add(0x56490f0f8060, 46, 2, 0x7f24e64c1e18), fd_no=37
> 27(2806) DEBUG:  [core/io_wait.h:782]: io_watch_chg(): DBG:
> io_watch_chg (0x56490f0f8060, 46, 0x1, 0x) fd_no=38 called
> 27(2806) DEBUG:  [core/io_wait.h:600]: io_watch_del(): DBG:
> io_watch_del (0x56490f0f8060, 46, -1, 0x0) fd_no=38 called
> 27(2806) DEBUG:  [core/tcp_main.c:4457]: handle_tcpconn_ev():
> sending to child, events 1
> 27(2806) DEBUG:  [core/tcp_main.c:4127]: send2child(): selected tcp
> worker idx:0 proc:19 pid:2798 for activity on [tcp:1.1.1.1:5060],
> 0x7f24e64c1e18
> 19(2798) DEBUG:  [core/tcp_read.c:1749]: 

Re: [SR-Users] dialog_active_dialogs erroneous value

2020-10-19 Thread Sergiu Pojoga
Sorry to insist but... looks like it's not just the active_dialogs stats
that's messed up. Early_dialogs are also often erroneous and the dialog
counters don't match against different RPCs.

What would the devs like me to do with this: drop it, open another GitHub
issue?

# kamcmd dlg.stats_active && kamcmd stats.get_statistics all | grep dialog
{
 starting: 0
 connecting: 0
 answering: 0
 ongoing: 2
 all: 2
}
dialog:active_dialogs = 20
dialog:early_dialogs = 18446744073709551614
dialog:expired_dialogs = 0
dialog:failed_dialogs = 6978
dialog:processed_dialogs = 11248

# kamcmd dmq.list_nodes
{
 host: 65.xx.xx.11
 port: 5062
 resolved_ip: 65.xx.xx.11
 status: active
 last_notification: 0
 local: 0
}
{
 host: 65.xx.xx.22
 port: 5062
 resolved_ip: 65.xx.xx.22
 status: active
 last_notification: 0
 local: 1
}

# kamailio -v
version: kamailio 5.3.4 (x86_64/linux) fc28a1

Thanks.
--Sergiu

On Fri, Oct 16, 2020 at 5:10 PM Sergiu Pojoga  wrote:

> Hi Joel,
>
> Thanks, that's precisely it!
>
> Indeed, `dlg.stats_active` works correctly and what's nice about it is
> that it shows stats summary from all DMQ nodes combined. However, I
> use xHTTP_PROM module to export my stats, which seems to rely on the
> 'problematic' counters. Sad... Let's hope this gets resolved one day.
>
> Regards,
> --Sergiu
>
> On Fri, Oct 16, 2020 at 4:17 PM Joel Serrano  wrote:
>
>> Hey Sergiu,
>>
>> I think I've been through a similar case... have a look at:
>> https://github.com/kamailio/kamailio/issues/1591 in case you find it
>> helpful.
>>
>> You might have to rely on the different metric that Daniel added.
>>
>> Joel.
>>
>>
>>
>> On Fri, Oct 16, 2020 at 3:35 AM Sergiu Pojoga  wrote:
>>
>>> Hi Daniel,
>>>
>>> You guessed right, two dmq nodes with dialog replication.
>>>
>>> Thanks,
>>>
>>>
>>> On Fri., Oct. 16, 2020, 2:15 a.m. Daniel-Constantin Mierla, <
>>> mico...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> is this happening when using dmq for dialog with multiple sip servers?
>>>> Or is a single instance sip server?
>>>>
>>>> Cheers,
>>>> Daniel
>>>> On 16.10.20 04:12, Sergiu Pojoga wrote:
>>>>
>>>> Hi there,
>>>>
>>>> Every now and then, the value of active dialogs metric spikes to an
>>>> erroneous huge number, messing up my otherwise beautiful grafana gauges :(
>>>>
>>>> Example:
>>>> kamailio_dialog_active_dialogs 18446744073709551614 1602812239115
>>>> kamailio_dialog_early_dialogs 0 1602812239115
>>>> kamailio_dialog_expired_dialogs 2 1602812239115
>>>> kamailio_dialog_failed_dialogs 7361 1602812239115
>>>>
>>>> Anybody faced the same symptoms, any clues what might be causing this?
>>>>
>>>> Thanks,
>>>> --Sergiu
>>>>
>>>> ___
>>>> Kamailio (SER) - Users Mailing 
>>>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>> --
>>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>>>> www.linkedin.com/in/miconda
>>>> Funding: https://www.paypal.me/dcmierla
>>>>
>>>> ___
>>> 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_active_dialogs erroneous value

2020-10-16 Thread Sergiu Pojoga
Hi Joel,

Thanks, that's precisely it!

Indeed, `dlg.stats_active` works correctly and what's nice about it is that
it shows stats summary from all DMQ nodes combined. However, I
use xHTTP_PROM module to export my stats, which seems to rely on the
'problematic' counters. Sad... Let's hope this gets resolved one day.

Regards,
--Sergiu

On Fri, Oct 16, 2020 at 4:17 PM Joel Serrano  wrote:

> Hey Sergiu,
>
> I think I've been through a similar case... have a look at:
> https://github.com/kamailio/kamailio/issues/1591 in case you find it
> helpful.
>
> You might have to rely on the different metric that Daniel added.
>
> Joel.
>
>
>
> On Fri, Oct 16, 2020 at 3:35 AM Sergiu Pojoga  wrote:
>
>> Hi Daniel,
>>
>> You guessed right, two dmq nodes with dialog replication.
>>
>> Thanks,
>>
>>
>> On Fri., Oct. 16, 2020, 2:15 a.m. Daniel-Constantin Mierla, <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> is this happening when using dmq for dialog with multiple sip servers?
>>> Or is a single instance sip server?
>>>
>>> Cheers,
>>> Daniel
>>> On 16.10.20 04:12, Sergiu Pojoga wrote:
>>>
>>> Hi there,
>>>
>>> Every now and then, the value of active dialogs metric spikes to an
>>> erroneous huge number, messing up my otherwise beautiful grafana gauges :(
>>>
>>> Example:
>>> kamailio_dialog_active_dialogs 18446744073709551614 1602812239115
>>> kamailio_dialog_early_dialogs 0 1602812239115
>>> kamailio_dialog_expired_dialogs 2 1602812239115
>>> kamailio_dialog_failed_dialogs 7361 1602812239115
>>>
>>> Anybody faced the same symptoms, any clues what might be causing this?
>>>
>>> Thanks,
>>> --Sergiu
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing 
>>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> --
>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>>> www.linkedin.com/in/miconda
>>> Funding: https://www.paypal.me/dcmierla
>>>
>>> ___
>> 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_active_dialogs erroneous value

2020-10-16 Thread Sergiu Pojoga
Hi Daniel,

You guessed right, two dmq nodes with dialog replication.

Thanks,


On Fri., Oct. 16, 2020, 2:15 a.m. Daniel-Constantin Mierla, <
mico...@gmail.com> wrote:

> Hello,
>
> is this happening when using dmq for dialog with multiple sip servers? Or
> is a single instance sip server?
>
> Cheers,
> Daniel
> On 16.10.20 04:12, Sergiu Pojoga wrote:
>
> Hi there,
>
> Every now and then, the value of active dialogs metric spikes to an
> erroneous huge number, messing up my otherwise beautiful grafana gauges :(
>
> Example:
> kamailio_dialog_active_dialogs 18446744073709551614 1602812239115
> kamailio_dialog_early_dialogs 0 1602812239115
> kamailio_dialog_expired_dialogs 2 1602812239115
> kamailio_dialog_failed_dialogs 7361 1602812239115
>
> Anybody faced the same symptoms, any clues what might be causing this?
>
> Thanks,
> --Sergiu
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dialog_active_dialogs erroneous value

2020-10-15 Thread Sergiu Pojoga
Hi there,

Every now and then, the value of active dialogs metric spikes to an
erroneous huge number, messing up my otherwise beautiful grafana gauges :(

Example:
kamailio_dialog_active_dialogs 18446744073709551614 1602812239115
kamailio_dialog_early_dialogs 0 1602812239115
kamailio_dialog_expired_dialogs 2 1602812239115
kamailio_dialog_failed_dialogs 7361 1602812239115

Anybody faced the same symptoms, any clues what might be causing this?

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


Re: [SR-Users] '302 Moved temporarily' contact parsing error

2020-10-13 Thread Sergiu Pojoga
Hmm, it's a tricky one, not sure actually.

https://tools.ietf.org/html/rfc3261#page-167

The answer might be in:

Even if the "display-name" is empty, the "name-addr" form MUST be used
if the "addr-spec" contains a comma, semicolon, or question mark.


On Tue, Oct 13, 2020 at 3:39 PM Sergiu Pojoga  wrote:

> Aren't the Contact params supposed to be delimited by semicolon?
>
> On Tue, Oct 13, 2020 at 1:06 PM David VILLAUME 
> wrote:
>
>> Hello,
>>
>>
>>
>> I see parsing errors on 302 contact header that seems compliant to RFC :
>>
>>
>>
>> Contact:;q=0.5,;q=0.25
>>
>>
>>
>>  [core/parser/parse_addr_spec.c:479]: parse_to_param(): invalid
>> character ',' in status 27: [;q=0.5]
>>
>>
>>
>> Is there an error in my contact or is it truly a parsing error ?
>>
>>
>>
>> Regards,
>>
>> David
>>
>>
>> ___
>> 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] '302 Moved temporarily' contact parsing error

2020-10-13 Thread Sergiu Pojoga
Aren't the Contact params supposed to be delimited by semicolon?

On Tue, Oct 13, 2020 at 1:06 PM David VILLAUME 
wrote:

> Hello,
>
>
>
> I see parsing errors on 302 contact header that seems compliant to RFC :
>
>
>
> Contact:;q=0.5,;q=0.25
>
>
>
>  [core/parser/parse_addr_spec.c:479]: parse_to_param(): invalid
> character ',' in status 27: [;q=0.5]
>
>
>
> Is there an error in my contact or is it truly a parsing error ?
>
>
>
> Regards,
>
> David
>
>
> ___
> 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] Permissions address

2020-10-12 Thread Sergiu Pojoga
Not entirely clear what you mean by 'in the cfg'. If you wanted to reload
it from the kam config logic upon some event, then you can always execute
RPC commands like so:

jsonrpc_exec('{"jsonrpc": "2.0", "method": "permissions.addressReload ",
"id": 1}');


On Mon, Oct 12, 2020 at 7:21 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello guys,
>
> Is there any way to reload the address table in the cfg? I always need to
> use "kamctl address reload"...
>
>
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> ___
> 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] modify Proxy-Authenticate header parameter

2020-10-08 Thread Sergiu Pojoga
You could probably use subst_hf regex to replace what's needed, something
like:

subst_hf("Proxy-Authenticate", "/:test@/:best@/", "a");

On Thu, Oct 8, 2020 at 6:28 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello guys,
>
> I'm receiving a Proxy-Authenticate header with a special parameter, call
> if "myparam", something like:
>
> Proxy-Authenticate: Digest realm="sip.mydomain.com", nonce="...",
> algorithm=MD5, qop="auth", opaque="/"
>
> I can get the parameter like so:
>
> $var(myparam) = @proxy_authorization["sip.mydomain.com"].myparam;
>
> And this is great!
>
> But i need to replace part of the parameter "myparam"m and I can't figure
> out how to do it...
>
> Can anyone help me with this?
>
> Thanks!,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> ___
> 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] MS Teams Serivce unavailable

2020-10-02 Thread Sergiu Pojoga
  Otherwise, enable SRTP in Freeswitch directly, so the skalatan guide
stays valid for not mentioning it ,lol

On Fri, Oct 2, 2020 at 11:25 AM Andy Kama  wrote:

> cool will look into that as atleast you have put me in the right direction
> thanks
>
> On Fri, Oct 2, 2020 at 4:21 PM Sergiu Pojoga  wrote:
>
>> It's a guide, not a complete solution. Look into RTPEngine, encryption of
>> RTP.
>>
>> On Fri, Oct 2, 2020 at 11:15 AM Andy Kama  wrote:
>>
>>> how would i add that though? as i dont see any mention of it in the
>>> guide
>>>
>>> On Fri, Oct 2, 2020 at 4:11 PM Sergiu Pojoga  wrote:
>>>
>>>> Totally overlooked the lack of SAVP profile. Bastian is right, that's
>>>> problem #1, then there's #2 and counting, lol
>>>>
>>>> Good luck.
>>>>
>>>> On Fri, Oct 2, 2020 at 11:02 AM Bastian Triller <
>>>> bastian.tril...@gmail.com> wrote:
>>>>
>>>>> there are no crypto attributes and SAVP profile in SDP. Direct Routing
>>>>> requires SRTP.
>>>>>
>>>>> Check the Reason header in response. Sometimes, there are useful
>>>>> hints, why your request is not accepted.
>>>>>
>>>>> On Fri, Oct 2, 2020 at 4:55 PM Sergiu Pojoga 
>>>>> wrote:
>>>>>
>>>>>> Why do you double RR if your Kam listens only on tls 5061? Your
>>>>>> topology isn't the same as in the skalatan tutorial.
>>>>>>
>>>>>> Also, your Kam VIA contains IP address. Try to make it FQDN by
>>>>>> setting an alias to your listen directive, e.g.:
>>>>>> listen=tls:YOURIP:5061 advertise "FQDN":5061
>>>>>>
>>>>>> On Fri, Oct 2, 2020 at 10:31 AM Andy Kama 
>>>>>> wrote:
>>>>>>
>>>>>>> see traces attached
>>>>>>>
>>>>>>> just blacked out my ips
>>>>>>> but scenario is softphone --- freeswitch --- kamailio  teams
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Oct 2, 2020 at 3:16 PM Sergiu Pojoga 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> relevant config snippets, kam logs, sip traces, all you've got?
>>>>>>>>
>>>>>>>> For all we know - service unavailable could be anything, e.g. your
>>>>>>>> O365 tenant is misconfigured.
>>>>>>>>
>>>>>>>> On Fri, Oct 2, 2020 at 9:32 AM Andy Kama 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> well not sure what else to send as i followed the link exactly
>>>>>>>>>
>>>>>>>>> hence why i was asking if anyone has had that issue previously
>>>>>>>>>
>>>>>>>>> On Fri, Oct 2, 2020 at 2:11 PM Sergiu Pojoga 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> > Can anyone guide me what I am doing wrong?
>>>>>>>>>>
>>>>>>>>>> Easy. You assume people on this mailing list are clairvoyants.
>>>>>>>>>>
>>>>>>>>>> On Fri, Oct 2, 2020 at 7:18 AM Andy Kama 
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi All,
>>>>>>>>>>>
>>>>>>>>>>> I have done all the changes to get teams working according to
>>>>>>>>>>>
>>>>>>>>>>> https://skalatan.de/en/blog/kamailio-sbc-teams#:~:text=Extend%20the%20MS%20Teams%20systems,Kamailio%20SBCs%20to%20MS%20Teams
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>>> but i find when i send a call to teams they send a response back
>>>>>>>>>>> with service unavailable.
>>>>>>>>>>>
>>>>>>>>>>> Can anyone guide me what I am doing wrong?
>>>>>>>>>>>
>>>>>>>>>>> I have added the record route and confirm it is being sent
>>>>>>>>>>>
>>>>>>>>>>> My setup is freeswitch -- kamailio --- teams
>>>>>>>>>>>

  1   2   3   >