Re: [SR-Users] How to distinguish is from Asterisk or from the client

2019-09-11 Thread Lợi Đặng
You may also want to consider dispatcher module's ds_is_from_list.
https://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.f.ds_is_from_list

rgds,
Loi Dang Thanh
Phone : +84. 774.735.448
Email : loi.dangth...@gmail.com


On Thu, Sep 12, 2019 at 3:54 AM Alex Balashov 
wrote:

> This is a question of your own business rules.
>
> The most common way to do it is to use something like the 'permissions'
> module. Build a 'trusted' table with all your Asterisk gateway IPs, and
> then do the following when you receive an initial INVITE:
>
>if(allow_trusted()) {
>   # Must be from platform gateways to customer - treat as
>   # "inbound".
>
>   ...
>} else {
>   # Do authentication challenge and treat as "outbound"
>   # from customer softphone.
>
>   ...
>}
>
> -- Alex
>
> On Wed, Sep 11, 2019 at 10:46:49PM +0200, przeqpiciel wrote:
>
> > Hi,
> > I looking information how to distinguish whether the packet is directed
> to
> > the Astersik (my platform) or to the customer (softphone / sip client ).
>
> > ___
> > 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


Re: [SR-Users] How to distinguish is from Asterisk or from the client

2019-09-11 Thread Alex Balashov
This is a question of your own business rules. 

The most common way to do it is to use something like the 'permissions'
module. Build a 'trusted' table with all your Asterisk gateway IPs, and
then do the following when you receive an initial INVITE:

   if(allow_trusted()) {
  # Must be from platform gateways to customer - treat as
  # "inbound".

  ...
   } else {
  # Do authentication challenge and treat as "outbound"
  # from customer softphone.

  ...
   }

-- Alex

On Wed, Sep 11, 2019 at 10:46:49PM +0200, przeqpiciel wrote:

> Hi,
> I looking information how to distinguish whether the packet is directed to
> the Astersik (my platform) or to the customer (softphone / sip client ).

> ___
> 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


[SR-Users] How to distinguish is from Asterisk or from the client

2019-09-11 Thread przeqpiciel
Hi,
I looking information how to distinguish whether the packet is directed to
the Astersik (my platform) or to the customer (softphone / sip client ).
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio status get Active (Exited)

2019-09-11 Thread Henning Westerholt
Hello Guarav,

please investigate in your kamailio log file if you find more information why 
kamailio was stopped.

Cheers,

Henning

Am 11.09.19 um 19:15 schrieb Gaurav Bmotra:
hi
i m using kamailio 5.1, with -m 512 -M 8
it stop registering user SIP
anf in status it shows

--
● kamailio.service - LSB: Start the Kamailio SIP proxy server
   Loaded: loaded (/etc/init.d/kamailio; generated)
   Active: active (exited) since Sat 2019-09-07 11:05:16 UTC; 3 days ago
 Docs: man:systemd-sysv-generator(8)

Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17708]: INFO:  
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17677]: INFO:  
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17714]: INFO:  
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17685]: INFO:  
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17681]: {1 1094155754 NOTIFY 
TwGwmzx4wINnraJs1Gh3Kg..} INFO:  [main.c:819]: sig_usr(): s… received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17704]: INFO:  
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17689]: INFO:  
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17693]: INFO:  
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17691]: INFO:  
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17674]: INFO:  
[core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Hint: Some lines were ellipsized, use -l to show in full.
-

plz help
thank you

--








Regards:
Gaurav Kumar




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


--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio status get Active (Exited)

2019-09-11 Thread Gaurav Bmotra
hi
i m using kamailio 5.1, with -m 512 -M 8
it stop registering user SIP
anf in status it shows

--
● kamailio.service - LSB: Start the Kamailio SIP proxy server
   Loaded: loaded (/etc/init.d/kamailio; generated)
   Active: active (exited) since Sat 2019-09-07 11:05:16 UTC; 3 days ago
 Docs: man:systemd-sysv-generator(8)

Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17708]: INFO: 
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17677]: INFO: 
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17714]: INFO: 
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17685]: INFO: 
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17681]: {1 1094155754 NOTIFY
TwGwmzx4wINnraJs1Gh3Kg..} INFO:  [main.c:819]: sig_usr(): s… received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17704]: INFO: 
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17689]: INFO: 
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17693]: INFO: 
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17691]: INFO: 
[main.c:819]: sig_usr(): signal 15 received
Sep 11 06:38:36 talk /usr/local/sbin/kamailio[17674]: INFO: 
[core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Hint: Some lines were ellipsized, use -l to show in full.
-

plz help
thank you

-- 








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


Re: [SR-Users] lookup(aliases) issues with 5.2

2019-09-11 Thread Daniel-Constantin Mierla
Hello,

I will think what would be good ways to optimizie.

If you want to change the code, probably doesn't make sense to revert
the entire patch locally, just allow '_' -- you should change:

if(!isalnum(*p) && (*p != '.') && (*p != '-')) {

to

if(!isalnum(*p) && (*p != '.') && (*p != '-') && (*p != '_')) {

in src/core/parser/parse_uri.c -- see function parse_uri() and case
URI_HOST_P.

Cheers,
Daniel


On 29.08.19 10:21, igor.potjevle...@gmail.com wrote:
>
> Hello Daniel, Henning,
>
>  
>
> I'd be interested, but if I'm the only one... Otherwise I can indeed
> remove this patch as Henning suggests, but it embarrasses me to have a
> different source code.
>
> Tell me if it's possible to make it customizable. Otherwise I will
> consider either removing the patch or finding another workaround.
>
>  
>
> Regards,
>
>  
>
> Igor.
>
>  
>
> *De :*Daniel-Constantin Mierla 
> *Envoyé :* mercredi 28 août 2019 20:26
> *À :* igor.potjevle...@gmail.com; 'Kamailio (SER) - Users Mailing
> List' 
> *Objet :* Re: [SR-Users] lookup(aliases) issues with 5.2
>
>  
>
> Hello,
>
> I haven't authored that patch and also never needed an underscore in
> host part of the URI, but also it didn't affect me before that change.
> I guess Juha wanted o be compliant with the RFC.
>
> If people need to allow an extended set of chars in the host part, I
> am fine to add some parameter to control that.
>
> Cheers,
> Daniel
>
> On 28.08.19 15:34, igor.potjevle...@gmail.com
>  wrote:
>
> Hello,
>
>  
>
> Hmm, ok. Saw it.
>
> Is it possible to reconsider a less strict control?
>
>  
>
> Regards,
>
>  
>
> Igor.
>
>  
>
> *De :*Daniel-Constantin Mierla 
> 
> *Envoyé :* mercredi 28 août 2019 10:25
> *À :* igor.potjevle...@gmail.com
> ; 'Kamailio (SER) - Users
> Mailing List' 
> 
> *Objet :* Re: [SR-Users] lookup(aliases) issues with 5.2
>
>  
>
> Hello,
>
> reading again I see that the error with the host uri is printed
> from the C code. I thought of another issue that was reported
> related to IPv6 addresses in the URI that kamctl rejected.
>
> The problem is that the underscore is not allowed in hostname: the
> relevant standard is RFC 1123, section 2.1 "Host Names and
> Numbers" which limits host names to letters-digits-hyphen.
>
> I checked the commits log and it seems this more strict
> verification was added by next commit:
>
> commit 4994960324d5353222b3de08515bed07802ab7bc
> Author: Juha Heinanen  
> Date:   Wed Jan 10 08:39:48 2018 +0200
>
>     core/parser: more strict parsing of sip uri host
>
> Regarding the $ALL_METHODS not being defined, iirc, you should set
> it to . (or maybe -1 in this case).
>
> Cheers,
> Daniel
>
> On 28.08.19 10:12, igor.potjevle...@gmail.com
>  wrote:
>
> Hello Daniel,
>
>  
>
> We moved to the latest 5.2.4 but hostname with underscore are
> still not handle properly.
>
> Is it a real design choice or a mistake somewhere in the code
> that handle domain name?
>
>  
>
> Regards,
>
>  
>
> Igor.
>
>  
>
> *De :*igor.potjevle...@gmail.com
> 
>  
> *Envoyé :* mardi 27 août 2019 11:53
> *À :* mico...@gmail.com ; 'Kamailio
> (SER) - Users Mailing List' 
> 
> *Objet :* RE: [SR-Users] lookup(aliases) issues with 5.2
>
>  
>
> Hello Daniel,
>
>  
>
> Thank you for getting back to me.
>
> We will update with 5.2.4 and I'll let you know if it's solved.
>
>  
>
> Regards,
>
>  
>
> Igor.
>
>  
>
> *De :*Daniel-Constantin Mierla  >
> *Envoyé :* mardi 27 août 2019 09:39
> *À :* Kamailio (SER) - Users Mailing List
>  >;
> igor.potjevle...@gmail.com 
> *Objet :* Re: [SR-Users] lookup(aliases) issues with 5.2
>
>  
>
> Hello,
>
> On 27.08.19 09:27, igor.potjevle...@gmail.com
>  wrote:
>
> Hello!
>
>  
>
> Any help on that matter? Sounds like the domain parsing
> have been updated. Is it possible to back on the previous
> mode?
>
> did you mean backporting to older branches? If yes, it was
> done to branch 5.2, have you tried with latest version in that
> branch?
>
> Cheers,
> Daniel
>
>  
>
>