[SR-Users] Re: http_async and tm

2024-08-27 Thread Alexandru Covalschi via sr-users
> In my case, problem is 100% in the REST API, trying to ‘fix’ it in
kamailio was just an option that i was exploring  or more like ‘am i doing
something wrong?’

Not necessarily, but maybe moving from a centralized http entrypoint to
mqtt may be beneficial in your case. Kamailio integration is pretty
straightforward and doesn't differ much from http_async_client.
__
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 integration with REST services

2024-08-27 Thread Alexandru Covalschi via sr-users
You may consider writing the entire routing script in python as well -
check out KEMI.

вт, 27 авг. 2024 г. в 15:38, Sergio Charrua via sr-users <
sr-users@lists.kamailio.org>:

> Thanks Fred!
>
> >... but you’re really hacking kamailio to be an http api server...
>
> Actually it will be a HTTP Client...kamailio will send requests to an
> HTTPS REST Service that requires authentication, returning a JWT token if
> authentication is OK. Then, with the Token, Kamailio will make another
> HTTPS Request to another endpoint of the REST Service to do some voodoo
> My issue is on how to handle, on Kamailio, the authentication JWT token
> returned from the REST Service.
>
> I did consider having a Python script handling HTTP requests...might be
> the best solution, as it is (or seems to be) more flexible in the long
> term
>
> Atenciosamente / Kind Regards / Cordialement / Un saludo,
>
>
> *Sérgio Charrua*
>
>
>
>
> On Tue, Aug 27, 2024 at 1:08 PM Fred Posner via sr-users <
> sr-users@lists.kamailio.org> wrote:
>
>>
>> > On Aug 27, 2024, at 6:58 AM, Sergio Charrua via sr-users <
>> sr-users@lists.kamailio.org> wrote:
>> >
>> > Hi all!
>> >
>> > I need to integrate a REST Service with Kamailio. Integration is easy,
>> not a problem, but my concern is that the REST Services has a JWT token
>> authentication required for each request, common to many (it not all) REST
>> Services.
>> > So, it is required to POST for authentication (username and password)
>> and once I get authentication done, and receive a JWT token, I will need to
>> use this token in all other requests to the REST Service. The token is
>> valid for 24h.
>> > My question is:
>> > - how to save the token for use during 24h, on all calls/sessions,
>> without the need to authenticate on every call?
>> > - how to detect the token has expired and re-authenticate?
>> >
>> > I looked for some modules, but could not find any that suited me.
>> > I am thinking of executing a Python script for this, but concerned
>> about latency and PDD
>> > Any thoughts? Any suggestions? Any known best-practice?
>> >
>> > Atenciosamente / Kind Regards / Cordialement / Un saludo,
>> >
>> > Sérgio Charrua
>>
>>
>> Have you considered an inbetween service (such as a go/python/node api
>> listener) to handle the authentication / token issuance part?
>>
>> In theory I assume you could use the JWT and other modules to help do
>> what you are looking for, but you’re really hacking kamailio to be an http
>> api server at that point and although it may be able to do it quite well,
>> it’s really not the first candidate I’d choose for the job.
>>
>>
>>
>> Regards,
>>
>> Fred Posner
>> https://fredoso.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:
>


-- 
Alexandru Covalschi
VoIP engineer and system administrator
tg: @acovalschi
__
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 integration with REST services

2024-08-27 Thread Alexandru Covalschi via sr-users
Hi,

You can use a $shv() variable to store the key.
To track it you can use rtimer or just don't track it at lll, but
just renew at 403.
There are other ways tho, these are what I use

вт, 27 авг. 2024 г. в 14:25, Sergio Charrua via sr-users <
sr-users@lists.kamailio.org>:

> Hi all!
>
> I need to integrate a REST Service with Kamailio. Integration is easy, not
> a problem, but my concern is that the REST Services has a JWT token
> authentication required for each request, common to many (it not all) REST
> Services.
> So, it is required to POST for authentication (username and password) and
> once I get authentication done, and receive a JWT token, I will need to use
> this token in all other requests to the REST Service. The token is valid
> for 24h.
> My question is:
> - how to save the token for use during 24h, on all calls/sessions, without
> the need to authenticate on every call?
> - how to detect the token has expired and re-authenticate?
>
> I looked for some modules, but could not find any that suited me.
> I am thinking of executing a Python script for this, but concerned about
> latency and PDD
> Any thoughts? Any suggestions? Any known best-practice?
>
> Atenciosamente / Kind Regards / Cordialement / Un saludo,
>
>
> *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:
>


-- 
Alexandru Covalschi
VoIP engineer and system administrator
tg: @acovalschi
__
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] I have mo media and I must park

2024-08-26 Thread Alexandru Covalschi via sr-users
Hello list!

Please help me understand if putting my b2bua in sensory deprivation is
actually the best approach to punish it for sole reason of its existence.

The background of this horror story is pretty cliche, call center needs a
way to infinitely expand, so I'm building a scaling telephony core.

Our main protagonist is an innocent b2bua with a very grounded backstory:
step 0: receive external instruction to start a call
step 1: originate
step 2: park
step 3: play moh until:
- - a) told to pass it to other component
- - b) told to hang up
- - c) hang up on local timeout

A simplified diagram of the call flow looks something like this (repeating
names are same components):

### Signaling ###
Remote Destination
^
Kamailio-external
   ^
Freeswitch-originator
  V
Freeswitch- queue
V
Kamailio-local
  V
Agent
### end of signaling ###

### Media ###
Remote Destination
^
Rtpengine-external
   ^
Freeswitch-originator
  V
Freeswitch-queue
  V
Rtpengine- local
  V
Agent
### end of media ###

Due to specifics of the setting, re-negotiating the media and any
non-essential signaling with remote destination is a very much last resort.
And, as you can imagine, after step3a (pass it to other component), the
character development of Freeswitch-originator service stops completely.
Well, at least it is doing an honest job by playing the music on hold,
which a little bit justifies its presence on the media path. But not for
long.
In the world of near future, pull request number 3956 is merged with the
master branch, exposing the rtpengine API and leaving me no reason not to
move MoH to a kernel media player. At this moment I feel a wild urge to get
rid of Freeswitch-originator at all, but then I read the sources for mohq
and dialog to remind myself that Kamailio is a proxy and proxies can't do
this... So I fill b2bua's dialplan with 387.44 million lines of hateful
comments and remind it to rcvonly every time it tries to warn the others
about the grim fate.
When the queue designates an agent to his call, theoretically I don't even
need the second freswitch as well - if agen't media session has been
established (sometimes ICE take tooo long) with  Rtpengine- local, I can
bridge their media sessions using publish and subscribe.

I'd like to ask your opinion, list: do you see any plotholes potential
issues with such deisgn?
I'd honestly like to set Freeswitch to bypass-media, so it wont' waste
ports and cpu for nothing at all.
Are there any issues if I add body for the iniitial invite in the
request_route as if it was  received in there?
Maybe there's a better way, overall?
Any critique is welcome!
Thank you
--
AC
__
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 Visions 2030 for Appalachia

2024-04-04 Thread Alexandru Covalschi via sr-users
tell you, causes do not necessarily resemble
>> their
>> effects."
>>
>> "Taylor and her people know that Kamailio Visions 2030 draws on a long
>> history of highly effective technological and app-based interventions in
>> economically underprivileged areas, such as Nicholas Negroponte's One
>> Laptop
>> per Child (OLPC) scheme, and the famous carpet-bombing of Eritrea with
>> second-generation iPads by Selena Gomez. All of this had tremendous
>> results."
>>
>> "Salutary results", added a representative of the PIF.
>>
>> Balashov pointed us to the foundational problem statement of Kamailio
>> Visions
>> 2030, which cited the concept of "Technik", as developed in "Hybrid
>> Reality", a
>> technocratic manifesto (in e-book form) by much-loved TED visionaries
>> Parag and
>> Ayesha Khanna. There, the authors declared:
>>
>>"Good Technik requires a combination of the attributes that deliver
>> high human development, economic growth, political inclusiveness,
>> and technology preparedness.”
>>
>> "In short", said Balashov, "Taylor, with some help from the efficient
>> deployment
>> of Saudi capital, will bring good technik to Appalachia. The tide of
>> technik
>> lifts all ships."
>>
>> --
>> 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:
>


-- 
Alexandru Covalschi
VoIP engineer and system administrator
tel: +37367398493
__
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] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread Alexandru Covalschi
Alternative way is to use unixodbc, but it just means you put the password
into another file.

ср, 18 нояб. 2020 г. в 14:35, Alexandru Covalschi <568...@gmail.com>:

> Don't use databases. Create an API and use it to access the data you need.
> Won't work for every possible usage, but in general API-driven SIP-routing
> is very possible with Kamailio, especially with KEMI.
>
> ср, 18 нояб. 2020 г. в 11:32, Ahmed Marsou :
>
>> Hi;
>> I want to remove all plain text usernames an passwords from kamailio.cfg
>> file. Like modparam("auth_db", "db_url", "dbdriver://username:password
>> @dbhost/dbname")
>> or this  modparam("sqlops","sqlcon","ca=>dbdriver://username:password
>> @dbhost/dbname")
>> Can you help me with some ideas of how can I handle that?
>> Thank you.
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> --
> Alexandru Covalschi
> VoIP engineer and system administrator
> tel: +37367398493
>
>

-- 
Alexandru Covalschi
VoIP engineer and system administrator
tel: +37367398493
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread Alexandru Covalschi
Don't use databases. Create an API and use it to access the data you need.
Won't work for every possible usage, but in general API-driven SIP-routing
is very possible with Kamailio, especially with KEMI.

ср, 18 нояб. 2020 г. в 11:32, Ahmed Marsou :

> Hi;
> I want to remove all plain text usernames an passwords from kamailio.cfg
> file. Like modparam("auth_db", "db_url", "dbdriver://username:password
> @dbhost/dbname")
> or this  modparam("sqlops","sqlcon","ca=>dbdriver://username:password
> @dbhost/dbname")
> Can you help me with some ideas of how can I handle that?
> Thank you.
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Alexandru Covalschi
VoIP engineer and system administrator
tel: +37367398493
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC ha1 password

2019-08-28 Thread Alexandru Covalschi
Thank you for your feedback, I will first try playing with event route, i'm in 
KEMI anyway, however I also think extending the module  is a go-for. 


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

> 28 авг. 2019 г., в 20:56, Daniel-Constantin Mierla  
> написал(а):
> 
> Hello,
> 
> indeed, it seems to be no support to use the ha1 form of password for uac 
> module remote registrations. Probably it was is some plans at some point 
> because the column is there, but it was not implemented so far -- or it was 
> just a cloning of columns from subscriber table.
> 
> Not sure about the coding effort, but I think the right solution would be to 
> extend the module.
> 
> Cheers,
> Daniel
> 
> On 28.08.19 16:15, Alexandru Covalschi wrote:
>> Hello, 
>> I'm trying to make Kamailio to SIP register on a remote server. However 
>> storing plaintext password looks very unsecure.
>> Is there a possibility to store password for uac module using ha1 hash 
>> instead of the plaintext password? I see there's a row for it in the 
>> database, but in the source code it's not used and it seems i can't neither 
>> use it in db neither set up in-memory as avp.
>> Maybe there's a workaround to directly access the in-memory uac registration 
>> htable?
>> 
>> 
>> Regards,
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +37367367850
>> 
>> 
>> 
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
>> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
> -- 
> Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com/>
> www.twitter.com/miconda <http://www.twitter.com/miconda> -- 
> www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC ha1 password

2019-08-28 Thread Alexandru Covalschi
Can I fire REGISTER's w/o authentication but then process 401/407 in a failure 
route and somehow tell UAC module which ha1 to use? Keeping all the timers 
functionality and uac_reg_lookup feature? Or at least if I process 401/407 in a 
failure_route and manually create the Auth header, will UAC module still be 
able to keep track of the registrations?
Anyway, an in-memory registration table is preferred as I'm using an API which 
will push all trunks inside Kamailio... Using a database is the worst scenario 
in my case.

Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

> 28 авг. 2019 г., в 16:15, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> Hello, 
> I'm trying to make Kamailio to SIP register on a remote server. However 
> storing plaintext password looks very unsecure.
> Is there a possibility to store password for uac module using ha1 hash 
> instead of the plaintext password? I see there's a row for it in the 
> database, but in the source code it's not used and it seems i can't neither 
> use it in db neither set up in-memory as avp.
> Maybe there's a workaround to directly access the in-memory uac registration 
> htable?
> 
> 
> Regards,
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +37367367850
> 

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


[SR-Users] UAC ha1 password

2019-08-28 Thread Alexandru Covalschi
Hello, 
I'm trying to make Kamailio to SIP register on a remote server. However storing 
plaintext password looks very unsecure.
Is there a possibility to store password for uac module using ha1 hash instead 
of the plaintext password? I see there's a row for it in the database, but in 
the source code it's not used and it seems i can't neither use it in db neither 
set up in-memory as avp.
Maybe there's a workaround to directly access the in-memory uac registration 
htable?

____
Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

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


Re: [SR-Users] opt_reply(): called for non-OPTIONS request

2019-07-16 Thread Alexandru Covalschi
... in request route 
   KSR.xlog.xinfo("\n!!!\nBefore options_reply (before route_reqinit) $rm 
valus is " + KSR.pv.get("$rm") + "\n!!!\n")
self.ksr_route_reqinit(msg);
_

... in reqinit
KSR.xlog.xinfo("\n!!!\nBefore options_reply (before is_options) $rm 
valus is " + KSR.pv.get("$rm") + "\n!!!\n")
if KSR.is_OPTIONS() and KSR.is_myself_ruri():
KSR.xlog.xinfo("\n!!!\nBefore options_reply (after is_options) $rm 
valus is " + KSR.pv.get("$rm") + "\n!!!\n")
KSR.x.modf("options_reply");
exit();
__


 2(494) INFO: 

Re: [SR-Users] opt_reply(): called for non-OPTIONS request

2019-07-15 Thread Alexandru Covalschi
It's in route_reqinit, I only to couple of checks before calling it

def ksr_request_route(self, msg):
received_port = KSR.pv.get("$Rp");
proto = KSR.pv.get("$proto");
if ((received_port == MY_WS_PORT) or (received_port == MY_WSS_PORT) and
(proto != "ws") and (proto != "wss")):
KSR.xlog.xwarn("SIP request received on " + received_port + "\n");
KSR.sl.send_reply(403, "Forbidden");
exit();

if not KSR.is_method_in("IABCRO"):
KSR.sl.sl_send_reply(405, "Method not allowed");
exit();

if KSR.is_INVITE():
KSR.rr.record_route();
KSR.dialog.dlg_manage();

self.ksr_route_reqinit(msg);

def ksr_route_reqinit(self, msg):
KSR.xlog.xinfo("IN ksr_route_reqinit\n");
if KSR.maxfwd.process_maxfwd(10) < 0:
KSR.sl.sl_send_reply(483, "Too many hops");
exit();

if KSR.is_OPTIONS() and KSR.is_myself_ruri():
KSR.x.modf("options_reply");
exit();

if KSR.sanity.sanity_check(1511, 7) < 0:
KSR.xlog.xinfo("Malformed SIP message from " + 
str(KSR.pv.get("$si")) + ":" + str(KSR.pv.get("$sp")) + "\n");
exit();

return 1;

Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

> 15 июля 2019 г., в 9:20, Daniel-Constantin Mierla  
> написал(а):
> 
> Hello,
> do you have that piece of code in the request route function (or a function 
> executed from there)?
> 
> Any other functions from KSR executed before, or it is just at the top?
> 
> Cheers,
> Daniel
> 
> On Mon, Jul 15, 2019 at 12:31 AM Alexandru Covalschi <568...@gmail.com 
> <mailto:568...@gmail.com>> wrote:
> Hello list,
> 
> if KSR.is_OPTIONS() and KSR.is_myself_ruri():
> KSR.x.modf("options_reply");
> exit();
> 
> with a valid URI (no username) gives the subj output (opt_reply(): called for 
> non-OPTIONS request)
> How could that be? 
> Python KEMI, 5.2.3, docker.
> 
> 
> Regards,
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +37367367850
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
> 
> 
> -- 
> Daniel-Constantin Mierla - http://www.asipto.com <http://www.asipto.com/>
> http://twitter.com/#!/miconda <http://twitter.com/#!/miconda> - 
> http://www.linkedin.com/in/miconda 
> <http://www.linkedin.com/in/miconda>___
> 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] opt_reply(): called for non-OPTIONS request

2019-07-14 Thread Alexandru Covalschi
Hello list,

if KSR.is_OPTIONS() and KSR.is_myself_ruri():
KSR.x.modf("options_reply");
exit();

with a valid URI (no username) gives the subj output (opt_reply(): called for 
non-OPTIONS request)
How could that be? 
Python KEMI, 5.2.3, docker.


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

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


Re: [SR-Users] Wrong $rm value

2019-07-14 Thread Alexandru Covalschi
Ok, it was before t_continue, sorry for occasional spam... This thread can be 
removed


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

> 14 июля 2019 г., в 15:01, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> Forgot to mention that I do a t_newtran() before t_suspend
> 
> ____
> Regards,
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +37367367850
> 
>> 14 июля 2019 г., в 14:40, Alexandru Covalschi <568...@gmail.com 
>> <mailto:568...@gmail.com>> написал(а):
>> 
>> Hello list,
>> 
>> I use kamailio 5.2.3 from repo's on stretch in docker. I use python KEMI + 
>> async and encountered weird behaviour: after t_continue $rm shows OPTIONS 
>> instead of REGISTER/INVITE. I wonder if that's correct behaviour, because 
>> for me it looks like a bug. 
>> Repeating is easy - just check $rm after t_continue.
>> 
>> 
>> Regards,
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +37367367850
>> 
> 

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


Re: [SR-Users] Wrong $rm value

2019-07-14 Thread Alexandru Covalschi
Forgot to mention that I do a t_newtran() before t_suspend


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

> 14 июля 2019 г., в 14:40, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> Hello list,
> 
> I use kamailio 5.2.3 from repo's on stretch in docker. I use python KEMI + 
> async and encountered weird behaviour: after t_continue $rm shows OPTIONS 
> instead of REGISTER/INVITE. I wonder if that's correct behaviour, because for 
> me it looks like a bug. 
> Repeating is easy - just check $rm after t_continue.
> 
> ____
> Regards,
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +37367367850
> 

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


[SR-Users] Wrong $rm value

2019-07-14 Thread Alexandru Covalschi
Hello list,

I use kamailio 5.2.3 from repo's on stretch in docker. I use python KEMI + 
async and encountered weird behaviour: after t_continue $rm shows OPTIONS 
instead of REGISTER/INVITE. I wonder if that's correct behaviour, because for 
me it looks like a bug. 
Repeating is easy - just check $rm after t_continue.


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

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


[SR-Users] Selects and KEMI

2019-03-05 Thread Alexandru Covalschi
Is there any way to use selects in KEMI? I understand it's syntax sugar, but 
maybe there's a workaround.


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +380 97 24 75445

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


Re: [SR-Users] evapi_async + python3 KEMI

2019-03-05 Thread Alexandru Covalschi
Thanks!


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +380 97 24 75445

> 5 марта 2019 г., в 9:00, Daniel-Constantin Mierla  
> написал(а):
> 
> Hello,
> 
> better use KSR.tm.t_newtran() instead of KSR.tmx.t_suspend() and then 
> KSR.evapi.async_relay(...)
> 
> It should also work only with:
> 
> if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label_n)")))
> 
> See:
> 
>   * https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#t_name 
> <https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#t_name>
> Using $T(id_label_n) forces to create the transaction, if it doesn't exist.
> 
> Cheers,
> Daniel
> 
> On 04.03.19 17:21, Alexandru Covalschi wrote:
>> UPD:
>> Such construction seems to work
>> if KSR.tmx.t_suspend():
>> KSR.evapi.relay(str(KSR.pv.get("$T(id_label)")));
>> However I'm wondering if there could be any issues using it like that? I 
>> know that evapi.relay is non-blocking, however - are all variables 
>> accessible in that way?
>> 
>> I'm using 5.2 from debian:stretch stable repo in a docker container.
>> ________
>> Regards,
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +380 97 24 75445
>> 
>>> 4 марта 2019 г., в 16:30, Alexandru Covalschi <568...@gmail.com 
>>> <mailto:568...@gmail.com>> написал(а):
>>> 
>>> Hello list,
>>> 
>>> I'm trying to use async evapi with app_python3 KEMI, but I don't know how 
>>> to get t_suspend variables. 
>>> What am I doing is connecting to evapi via telnet and making a call, which 
>>> successfully reaches that point:
>>> if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label)"))):
>>> KSR.xlog.xinfo("processing suspended in transaction [" + 
>>> str(KSR.pv.get("$T(id_index)")) + ":" + str(KSR.pv.get("$T(id_label)")) 
>>> +"]\n");
>>> 
>>> I have the id_label in the log, but in telnet I have None. 
>>> How can I get transaction index and label transferred using python3 KEMI? 
>>> Shall I use KSR.x.modf (in that case I'm losing almost all KEMI benefits)?..
>>> 
>>> 
>>> Regards,
>>> Alexandru Covalschi
>>> VoIP Engineer and System Administrator
>>> tel: +380 97 24 75445
>>> 
>> 
>> 
>> 
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
>> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
> -- 
> Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com/>
> www.twitter.com/miconda <http://www.twitter.com/miconda> -- 
> www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com 
> <http://www.kamailioworld.com/>
> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
> www.asipto.com <http://www.asipto.com/>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] evapi_async + python3 KEMI

2019-03-04 Thread Alexandru Covalschi
UPD:
Such construction seems to work
if KSR.tmx.t_suspend():
KSR.evapi.relay(str(KSR.pv.get("$T(id_label)")));
However I'm wondering if there could be any issues using it like that? I know 
that evapi.relay is non-blocking, however - are all variables accessible in 
that way?

I'm using 5.2 from debian:stretch stable repo in a docker container.
____
Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +380 97 24 75445

> 4 марта 2019 г., в 16:30, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> Hello list,
> 
> I'm trying to use async evapi with app_python3 KEMI, but I don't know how to 
> get t_suspend variables. 
> What am I doing is connecting to evapi via telnet and making a call, which 
> successfully reaches that point:
> if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label)"))):
> KSR.xlog.xinfo("processing suspended in transaction [" + 
> str(KSR.pv.get("$T(id_index)")) + ":" + str(KSR.pv.get("$T(id_label)")) 
> +"]\n");
> 
> I have the id_label in the log, but in telnet I have None. 
> How can I get transaction index and label transferred using python3 KEMI? 
> Shall I use KSR.x.modf (in that case I'm losing almost all KEMI benefits)?..
> 
> 
> Regards,
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +380 97 24 75445
> 

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


[SR-Users] evapi_async + python3 KEMI

2019-03-04 Thread Alexandru Covalschi
Hello list,

I'm trying to use async evapi with app_python3 KEMI, but I don't know how to 
get t_suspend variables. 
What am I doing is connecting to evapi via telnet and making a call, which 
successfully reaches that point:
if KSR.evapi.async_relay(str(KSR.pv.get("$T(id_label)"))):
KSR.xlog.xinfo("processing suspended in transaction [" + 
str(KSR.pv.get("$T(id_index)")) + ":" + str(KSR.pv.get("$T(id_label)")) +"]\n");

I have the id_label in the log, but in telnet I have None. 
How can I get transaction index and label transferred using python3 KEMI? 
Shall I use KSR.x.modf (in that case I'm losing almost all KEMI benefits)?..


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +380 97 24 75445

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


Re: [SR-Users] Failed to find command http_client_query

2017-12-09 Thread Alexandru Covalschi
Hello Daniel, 

I don't want to be annoying, anyway it's only my personal testing rack, but I 
think that bug may be critical in some situations, so if you require additional 
info besides the full config I've sent you in private message - please let me 
know.

Thanks
____
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 4 дек. 2017 г., в 23:09, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> Hello, 
> 
> Wanted to ask if you found something
> ____
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +373 673 98 493
> 
>> 24 нояб. 2017 г., в 22:19, Alexandru Covalschi <568...@gmail.com 
>> <mailto:568...@gmail.com>> написал(а):
>> 
>> Hello, sharing whole config except vars.cfg file, where values like 
>> API_PROTO, DBURL etc. are defined. 
>> 
>> 
>> 
>> 
>> 
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +373 673 98 493
>> 
>>> 24 нояб. 2017 г., в 13:21, Daniel-Constantin Mierla >> <mailto:mico...@gmail.com>> написал(а):
>>> 
>>> Hello,
>>> 
>>> can you provide here all the http_client_query(...) you have in your config 
>>> and list in which route block are they used (like request_route, 
>>> failure_route, ...)? You can replace IP addresses, usernames, passwords 
>>> with other strings, but if you use any kamailio variables (e.g. $rU), let 
>>> them in place.
>>> Cheers,
>>> Daniel
>>> 
>>> On 23.11.17 20:54, Alexandru Covalschi wrote:
>>>> sip:172.21.0.14:5060  is the local address of the 
>>>> server, it seems like a bug in http_client, as I don't have such 
>>>> http_query call anywhere :/ 
>>>> just re-checked
>>>> Also the fact that it works perfectly on 4.4.6 tells that it's not a 
>>>> configuration issue
>>>> 
>>>> 
>>>> Alexandru Covalschi
>>>> VoIP Engineer and System Administrator
>>>> tel: +373 673 98 493
>>>> 
>>>>> 23 нояб. 2017 г., в 16:59, Daniel-Constantin Mierla >>>> <mailto:mico...@gmail.com>> написал(а):
>>>>> 
>>>>> There was a mistake in the exports structure, the name of the function 
>>>>> with 4 parameter was http_query instead of http_client_query. I pushed a 
>>>>> patch to fix it.
>>>>> Then, related to the issue with cannot resolve the host, the debug 
>>>>> messages show an invalid http url being used:
>>>>> 
>>>>> Nov 21 04:18:20 ast1 /usr/sbin/kamailio[20804]: DEBUG: http_client 
>>>>> [functions.c:146]: curL_query_url(): ** # CURL URL 
>>>>> [sip:172.21.0.14:5060 ]
>>>>> 
>>>>> The it fails to do the dns stuff with it...
>>>>> 
>>>>> Cheers,
>>>>> Daniel
>>>>> 
>>>>> On 22.11.17 22:38, Alexandru Covalschi wrote:
>>>>>> Just wanted to ask if you need my help to test/check/etc.
>>>>>> 
>>>>>> 
>>>>>> Alexandru Covalschi
>>>>>> VoIP Engineer and System Administrator
>>>>>> tel: +373 673 98 493
>>>>>> 
>>>>>>> 21 нояб. 2017 г., в 11:58, Alexandru Covalschi <568...@gmail.com 
>>>>>>> <mailto:568...@gmail.com>> написал(а):
>>>>>>> 
>>>>>>> Kamailio is actually starting, please take a look at that debug=4 log 
>>>>>>> file: 
>>>>>>> https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt
>>>>>>>  
>>>>>>> <https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt>
>>>>>>> at line 1042 http_client module is successfully loading, but at line 
>>>>>>> 12785 it fails to load http_client_query
>>>>>>> 
>>>>>>> Also please check line 50385 in 
>>>>>>> https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt 
>>>>>>> <https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt> 
>>>>>>> I'm using http_query here with 5.0.4 http_client, you can see that 
>>>>>>> http_client makes a re

Re: [SR-Users] Failed to find command http_client_query

2017-12-04 Thread Alexandru Covalschi
Hello, 

Wanted to ask if you found something

Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 24 нояб. 2017 г., в 22:19, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> Hello, sharing whole config except vars.cfg file, where values like 
> API_PROTO, DBURL etc. are defined. 
> 
> 
> 
> 
> ________
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +373 673 98 493
> 
>> 24 нояб. 2017 г., в 13:21, Daniel-Constantin Mierla > <mailto:mico...@gmail.com>> написал(а):
>> 
>> Hello,
>> 
>> can you provide here all the http_client_query(...) you have in your config 
>> and list in which route block are they used (like request_route, 
>> failure_route, ...)? You can replace IP addresses, usernames, passwords with 
>> other strings, but if you use any kamailio variables (e.g. $rU), let them in 
>> place.
>> Cheers,
>> Daniel
>> 
>> On 23.11.17 20:54, Alexandru Covalschi wrote:
>>> sip:172.21.0.14:5060  is the local address of the 
>>> server, it seems like a bug in http_client, as I don't have such http_query 
>>> call anywhere :/ 
>>> just re-checked
>>> Also the fact that it works perfectly on 4.4.6 tells that it's not a 
>>> configuration issue
>>> 
>>> 
>>> Alexandru Covalschi
>>> VoIP Engineer and System Administrator
>>> tel: +373 673 98 493
>>> 
>>>> 23 нояб. 2017 г., в 16:59, Daniel-Constantin Mierla >>> <mailto:mico...@gmail.com>> написал(а):
>>>> 
>>>> There was a mistake in the exports structure, the name of the function 
>>>> with 4 parameter was http_query instead of http_client_query. I pushed a 
>>>> patch to fix it.
>>>> Then, related to the issue with cannot resolve the host, the debug 
>>>> messages show an invalid http url being used:
>>>> 
>>>> Nov 21 04:18:20 ast1 /usr/sbin/kamailio[20804]: DEBUG: http_client 
>>>> [functions.c:146]: curL_query_url(): ** # CURL URL 
>>>> [sip:172.21.0.14:5060 ]
>>>> 
>>>> The it fails to do the dns stuff with it...
>>>> 
>>>> Cheers,
>>>> Daniel
>>>> 
>>>> On 22.11.17 22:38, Alexandru Covalschi wrote:
>>>>> Just wanted to ask if you need my help to test/check/etc.
>>>>> 
>>>>> 
>>>>> Alexandru Covalschi
>>>>> VoIP Engineer and System Administrator
>>>>> tel: +373 673 98 493
>>>>> 
>>>>>> 21 нояб. 2017 г., в 11:58, Alexandru Covalschi <568...@gmail.com 
>>>>>> <mailto:568...@gmail.com>> написал(а):
>>>>>> 
>>>>>> Kamailio is actually starting, please take a look at that debug=4 log 
>>>>>> file: 
>>>>>> https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt 
>>>>>> <https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt>
>>>>>> at line 1042 http_client module is successfully loading, but at line 
>>>>>> 12785 it fails to load http_client_query
>>>>>> 
>>>>>> Also please check line 50385 in 
>>>>>> https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt 
>>>>>> <https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt> 
>>>>>> I'm using http_query here with 5.0.4 http_client, you can see that 
>>>>>> http_client makes a request, but afterwards it returns curl error 6, but 
>>>>>> the weirdest thing is - at line 19887 I request token from the very same 
>>>>>> IP address, only url is changed, and it actually works fine.
>>>>>> 
>>>>>> Alexandru Covalschi
>>>>>> VoIP Engineer and System Administrator
>>>>>> tel: +373 673 98 493
>>>>>> 
>>>>>>> 21 нояб. 2017 г., в 10:44, Daniel-Constantin Mierla >>>>>> <mailto:mico...@gmail.com>> написал(а):
>>>>>>> 
>>>>>>> But then kamailio is not starting, or?
>>>>>>> 
>>>>>>> Can you provide all the error message as they are printed in syslog 
>>>>>>> file? File, line and other details are part of the logs m

Re: [SR-Users] Best way to do routing against a list of gateways

2017-11-29 Thread Alexandru Covalschi
I'd suggest creating a separate htable with your gateways and just query it, 
you don't need a separate module for key-value matching

____
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 29 нояб. 2017 г., в 13:58, voipspace voipspace  
> написал(а):
> 
> I suppose I just could do sql direct on lcr_gw table like
>  
> select ip_addr, prefix from lcr_gw where gw_name = "my_termination_provider"
>  
> What I wanted to know is a module already doing this function.
>  
> I am looking for a function because in theory it will be more tested and 
> because i heard sql directly is prone to memory leaks
>  
>  
>  
> 
> 
> 29.11.2017, 11:29, "voipspace voipspace" :
>> Hi
>>  
>> I want to build the following scenerio
>>  
>> There should be some sort of database table to hold a list of gateway 
>> entries with fields ip, prefix, and name/description.
>>  
>> It would be good to use exiting tables to use what is avaiable. Have been 
>> looking at the lcr and drouting tables
>> but it seems they are designed to choose automaticaly for you and not just 
>> returning data about specific entries.
>>  
>> Please suggest how I may archive the following
>>  
>> Kamailio will receive a request it will then send to another Kamailio 
>> redirect server.
>> The response from the redirect will have a sip header value holding the 
>> id/name of the gateway choosen.
>>  
>> I want Kamailio processing the reponse to use the gateway id/name to lookup 
>> on the table and access the full details
>> ip, prefix details. 
>>  
>> This data can then be used to construct the relay parameter.
>>  
>> 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] lcr_id vs lcr_count

2017-11-28 Thread Alexandru Covalschi
There is a strong reason to have lcr_count variable - it actually represents 
the size of in-memory table that is created to store all lcr_id's on module 
loading, I don't think there is a way to avoid that, unless you rewrite lcr 
module to not load lcr in-memory, but query database (which IMO is a terrible 
idea).
If you need to dynamically assign kamailio lcr_id you can use 
event_route[core:worker-one-init] and write lcr_id inside $shv().
____
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 29 нояб. 2017 г., в 8:54, Patrick Wakano  написал(а):
> 
> Hello Kamailio list!
> 
> I've been working with the LCR module and I wanted to use the lcr_id to match 
> some ID's I have somewhere else.
> However, due to the lcr_count my lcr_ids must be less than the lcr_count. I 
> understand the reason behind the lcr_count, what I think is a mistake is to 
> have the lcr_id dependent of the lcr_count.
> Ideally we should be able to use any lcr_id value, just observing that the 
> total amount of lcr groups should not exceed the lcr_count.
> The problem is this if that appears in the load_gws, to_gw and from_gw 
> functions in lcr_mod.c:
> if ((lcr_id < 1) || (lcr_id > lcr_count_param)) {
> LM_ERR("invalid lcr_id parameter value %d\n", lcr_id);
> return -1;
> }
> 
> I ended up using another table to make the conversion of ids, but this is 
> horrible Any other reason to force the lcr_id to be less than the 
> lcr_count?
> 
> Best Regards,
> Patrick Wakano
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

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


Re: [SR-Users] allow_trusted not passing

2017-11-27 Thread Alexandru Covalschi
Try
if (!allow_trusted("$si")) {
xlog("L_INFO","\n\n--NOT trusted! - $si - $proto");
sl_send_reply("403", "Forbidden");
exit;
}


____
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 27 нояб. 2017 г., в 11:48, voipspace voipspace  
> написал(а):
> 
> }
> 

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


Re: [SR-Users] Failed to find command http_client_query

2017-11-23 Thread Alexandru Covalschi
sip:172.21.0.14:5060  is the local address of the server, 
it seems like a bug in http_client, as I don't have such http_query call 
anywhere :/ 
just re-checked
Also the fact that it works perfectly on 4.4.6 tells that it's not a 
configuration issue

____
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 23 нояб. 2017 г., в 16:59, Daniel-Constantin Mierla  
> написал(а):
> 
> There was a mistake in the exports structure, the name of the function with 4 
> parameter was http_query instead of http_client_query. I pushed a patch to 
> fix it.
> Then, related to the issue with cannot resolve the host, the debug messages 
> show an invalid http url being used:
> 
> Nov 21 04:18:20 ast1 /usr/sbin/kamailio[20804]: DEBUG: http_client 
> [functions.c:146]: curL_query_url(): ** # CURL URL 
> [sip:172.21.0.14:5060 ]
> 
> The it fails to do the dns stuff with it...
> 
> Cheers,
> Daniel
> 
> On 22.11.17 22:38, Alexandru Covalschi wrote:
>> Just wanted to ask if you need my help to test/check/etc.
>> 
>> 
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +373 673 98 493
>> 
>>> 21 нояб. 2017 г., в 11:58, Alexandru Covalschi <568...@gmail.com 
>>> <mailto:568...@gmail.com>> написал(а):
>>> 
>>> Kamailio is actually starting, please take a look at that debug=4 log file: 
>>> https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt 
>>> <https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt>
>>> at line 1042 http_client module is successfully loading, but at line 12785 
>>> it fails to load http_client_query
>>> 
>>> Also please check line 50385 in 
>>> https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt 
>>> <https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt> 
>>> I'm using http_query here with 5.0.4 http_client, you can see that 
>>> http_client makes a request, but afterwards it returns curl error 6, but 
>>> the weirdest thing is - at line 19887 I request token from the very same IP 
>>> address, only url is changed, and it actually works fine.
>>> 
>>> Alexandru Covalschi
>>> VoIP Engineer and System Administrator
>>> tel: +373 673 98 493
>>> 
>>>> 21 нояб. 2017 г., в 10:44, Daniel-Constantin Mierla >>> <mailto:mico...@gmail.com>> написал(а):
>>>> 
>>>> But then kamailio is not starting, or?
>>>> 
>>>> Can you provide all the error message as they are printed in syslog file? 
>>>> File, line and other details are part of the logs message, allowing to 
>>>> identify the location in the source code where that happens ...
>>>> 
>>>> Cheers,
>>>> Daniel
>>>> 
>>>> On 21.11.17 09:38, Alexandru Covalschi wrote:
>>>>> It is still one of the issues
>>>>> 
>>>>> 
>>>>> Alexandru Covalschi
>>>>> VoIP Engineer and System Administrator
>>>>> tel: +373 673 98 493
>>>>> 
>>>>>> 21 нояб. 2017 г., в 9:40, Daniel-Constantin Mierla >>>>> <mailto:mico...@gmail.com>> написал(а):
>>>>>> 
>>>>>> Hello,
>>>>>> 
>>>>>> in your email in this thread, you said:
>>>>>> 
>>>>>> > When I try to change http_query to http_client_query it fails to load 
>>>>>> > with  error "failed to find command http_client_query".
>>>>>> 
>>>>>> Is it still the case, or that was sorted out?
>>>>>> 
>>>>>> Cheers,
>>>>>> Daniel
>>>>>> 
>>>>>> On 20.11.17 22:43, Alexandru Covalschi wrote:
>>>>>>> Works ok on 4.4.6. So I suppose it's a weird 5.0.4 + my environment 
>>>>>>> bug. I'm rolling back to 4.4.6 right now, will keep one 5.0.4 machine 
>>>>>>> for testing (on debian 9)
>>>>>>> Let me know if I can provide any dumps/cores etc.
>>>>>>> 
>>>>>>> 
>>>>>>> Alexandru Covalschi
>>>>>>> VoIP Engineer and System Administrator
>>>>>>> tel: +373 673 98 493
>>>>>>> 
>>>>

Re: [SR-Users] Failed to find command http_client_query

2017-11-22 Thread Alexandru Covalschi
Just wanted to ask if you need my help to test/check/etc.


Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 21 нояб. 2017 г., в 11:58, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> Kamailio is actually starting, please take a look at that debug=4 log file: 
> https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt 
> <https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt>
> at line 1042 http_client module is successfully loading, but at line 12785 it 
> fails to load http_client_query
> 
> Also please check line 50385 in 
> https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt 
> <https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt> 
> I'm using http_query here with 5.0.4 http_client, you can see that 
> http_client makes a request, but afterwards it returns curl error 6, but the 
> weirdest thing is - at line 19887 I request token from the very same IP 
> address, only url is changed, and it actually works fine.
> 
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +373 673 98 493
> 
>> 21 нояб. 2017 г., в 10:44, Daniel-Constantin Mierla > <mailto:mico...@gmail.com>> написал(а):
>> 
>> But then kamailio is not starting, or?
>> 
>> Can you provide all the error message as they are printed in syslog file? 
>> File, line and other details are part of the logs message, allowing to 
>> identify the location in the source code where that happens ...
>> 
>> Cheers,
>> Daniel
>> 
>> On 21.11.17 09:38, Alexandru Covalschi wrote:
>>> It is still one of the issues
>>> 
>>> 
>>> Alexandru Covalschi
>>> VoIP Engineer and System Administrator
>>> tel: +373 673 98 493
>>> 
>>>> 21 нояб. 2017 г., в 9:40, Daniel-Constantin Mierla >>> <mailto:mico...@gmail.com>> написал(а):
>>>> 
>>>> Hello,
>>>> 
>>>> in your email in this thread, you said:
>>>> 
>>>> > When I try to change http_query to http_client_query it fails to load 
>>>> > with  error "failed to find command http_client_query".
>>>> 
>>>> Is it still the case, or that was sorted out?
>>>> 
>>>> Cheers,
>>>> Daniel
>>>> 
>>>> On 20.11.17 22:43, Alexandru Covalschi wrote:
>>>>> Works ok on 4.4.6. So I suppose it's a weird 5.0.4 + my environment bug. 
>>>>> I'm rolling back to 4.4.6 right now, will keep one 5.0.4 machine for 
>>>>> testing (on debian 9)
>>>>> Let me know if I can provide any dumps/cores etc.
>>>>> 
>>>>> 
>>>>> Alexandru Covalschi
>>>>> VoIP Engineer and System Administrator
>>>>> tel: +373 673 98 493
>>>>> 
>>>>>> 20 нояб. 2017 г., в 23:29, Alexandru Covalschi <568...@gmail.com 
>>>>>> <mailto:568...@gmail.com>> написал(а):
>>>>>> 
>>>>>> So the weirdest thing is Kamailio actually sends the request, but it 
>>>>>> returns curl error 6 in the answer variable. I have a plenty of clonned 
>>>>>> servers and same behaviour is on all of them, also just now tried on a 
>>>>>> fresh debian 9 - same result. I'm inside a virtual machine (vmware), but 
>>>>>> not sure it matters...
>>>>>> 
>>>>>> 
>>>>>> Alexandru Covalschi
>>>>>> VoIP Engineer and System Administrator
>>>>>> tel: +373 673 98 493
>>>>>> 
>>>>>>> 20 нояб. 2017 г., в 22:37, Alexandru Covalschi <568...@gmail.com 
>>>>>>> <mailto:568...@gmail.com>> написал(а):
>>>>>>> 
>>>>>>> I often get WARNING: http_client [functions.c:281]: curL_query_url(): 
>>>>>>> Couldn't resolve host, while I don't even use hostnames. 
>>>>>>> After I changed IP address to hostname (which I've added into 
>>>>>>> /etc/hosts) nothing changed. It seems like a weird bug, but I've no 
>>>>>>> idea - is it CURL or kamailio, but when I execute curl from shell it is 
>>>>>>> working fine. I have google dns in resolve.conf and nslookup is also 
>>>>&

Re: [SR-Users] debian setup without registration

2017-11-22 Thread Alexandru Covalschi
You can just reply 200 OK on each REGISTER in AUTH route (you should have it in 
standart install), like that:
  if (is_method("REGISTER")) {
  sl_send_reply("200","OK");
 exit;

________
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 22 нояб. 2017 г., в 18:37, Amar Tinawi  написал(а):
> 
> First, and based on my experience, not 100% sure , you can’t perform register 
> without having username and password along side with a database, because 
> (username and password0 are parts of the sip registration process, and you 
> need them in order to be reachable and known in the network and monitored.
>  
> Reaching from external network is applicable as long as your server is 
> reachable
>  
> BR 
> Ammar 
>  
>  
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>  
> From: Atux Atux <mailto:atuxn...@gmail.com>
> Sent: Wednesday, November 22, 2017 4:43 PM
> To: sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
> Subject: [SR-Users] debian setup without registration
>  
> Hi. i am new to the are of kamailio. i am looking to install in a PC running 
> debian 9 kamailio. that is easy since all i had to do was apt-get install 
> kamailio. I am looking on how to setup the system in a way that everyone 
> sending a register, to be able to register no matter what user name or passwd 
> sends. i do not want a MYSQL server on that server. Could someone give me 
> some hints on how to configure it please? In /etc/kamailio/kamctrlc i have 
> SIP_DOMAIN=192.168.124.5which is my IP.
> Everybody from my LAN 192.168.124.0/24 <http://192.168.124.0/24> network must 
> be able to send a register with any username and any passwd and be able to 
> register. Also from the outside world, through port forward from my router.
> Some hints please?
> 
>  
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
> <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] Failed to find command http_client_query

2017-11-21 Thread Alexandru Covalschi
Kamailio is actually starting, please take a look at that debug=4 log file: 
https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt 
<https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt>
at line 1042 http_client module is successfully loading, but at line 12785 it 
fails to load http_client_query

Also please check line 50385 in 
https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt 
<https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt> 
I'm using http_query here with 5.0.4 http_client, you can see that http_client 
makes a request, but afterwards it returns curl error 6, but the weirdest thing 
is - at line 19887 I request token from the very same IP address, only url is 
changed, and it actually works fine.
____
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 21 нояб. 2017 г., в 10:44, Daniel-Constantin Mierla  
> написал(а):
> 
> But then kamailio is not starting, or?
> 
> Can you provide all the error message as they are printed in syslog file? 
> File, line and other details are part of the logs message, allowing to 
> identify the location in the source code where that happens ...
> 
> Cheers,
> Daniel
> 
> On 21.11.17 09:38, Alexandru Covalschi wrote:
>> It is still one of the issues
>> 
>> 
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +373 673 98 493
>> 
>>> 21 нояб. 2017 г., в 9:40, Daniel-Constantin Mierla >> <mailto:mico...@gmail.com>> написал(а):
>>> 
>>> Hello,
>>> 
>>> in your email in this thread, you said:
>>> 
>>> > When I try to change http_query to http_client_query it fails to load 
>>> > with  error "failed to find command http_client_query".
>>> 
>>> Is it still the case, or that was sorted out?
>>> 
>>> Cheers,
>>> Daniel
>>> 
>>> On 20.11.17 22:43, Alexandru Covalschi wrote:
>>>> Works ok on 4.4.6. So I suppose it's a weird 5.0.4 + my environment bug. 
>>>> I'm rolling back to 4.4.6 right now, will keep one 5.0.4 machine for 
>>>> testing (on debian 9)
>>>> Let me know if I can provide any dumps/cores etc.
>>>> 
>>>> 
>>>> Alexandru Covalschi
>>>> VoIP Engineer and System Administrator
>>>> tel: +373 673 98 493
>>>> 
>>>>> 20 нояб. 2017 г., в 23:29, Alexandru Covalschi <568...@gmail.com 
>>>>> <mailto:568...@gmail.com>> написал(а):
>>>>> 
>>>>> So the weirdest thing is Kamailio actually sends the request, but it 
>>>>> returns curl error 6 in the answer variable. I have a plenty of clonned 
>>>>> servers and same behaviour is on all of them, also just now tried on a 
>>>>> fresh debian 9 - same result. I'm inside a virtual machine (vmware), but 
>>>>> not sure it matters...
>>>>> 
>>>>> 
>>>>> Alexandru Covalschi
>>>>> VoIP Engineer and System Administrator
>>>>> tel: +373 673 98 493
>>>>> 
>>>>>> 20 нояб. 2017 г., в 22:37, Alexandru Covalschi <568...@gmail.com 
>>>>>> <mailto:568...@gmail.com>> написал(а):
>>>>>> 
>>>>>> I often get WARNING: http_client [functions.c:281]: curL_query_url(): 
>>>>>> Couldn't resolve host, while I don't even use hostnames. 
>>>>>> After I changed IP address to hostname (which I've added into 
>>>>>> /etc/hosts) nothing changed. It seems like a weird bug, but I've no idea 
>>>>>> - is it CURL or kamailio, but when I execute curl from shell it is 
>>>>>> working fine. I have google dns in resolve.conf and nslookup is also 
>>>>>> working ok.
>>>>>> Can anyone help me with that?
>>>>>> 
>>>>>> 
>>>>>> Alexandru Covalschi
>>>>>> VoIP Engineer and System Administrator
>>>>>> tel: +373 673 98 493
>>>>>> 
>>>>>>> 20 нояб. 2017 г., в 22:06, Alexandru Covalschi <568...@gmail.com 
>>>>>>> <mailto:568...@gmail.com>> написал(а):
>>>>>>> 
>>>>>>> t
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>&g

Re: [SR-Users] Failed to find command http_client_query

2017-11-21 Thread Alexandru Covalschi
It is still one of the issues


Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 21 нояб. 2017 г., в 9:40, Daniel-Constantin Mierla  
> написал(а):
> 
> Hello,
> 
> in your email in this thread, you said:
> 
> > When I try to change http_query to http_client_query it fails to load with  
> > error "failed to find command http_client_query".
> 
> Is it still the case, or that was sorted out?
> 
> Cheers,
> Daniel
> 
> On 20.11.17 22:43, Alexandru Covalschi wrote:
>> Works ok on 4.4.6. So I suppose it's a weird 5.0.4 + my environment bug. I'm 
>> rolling back to 4.4.6 right now, will keep one 5.0.4 machine for testing (on 
>> debian 9)
>> Let me know if I can provide any dumps/cores etc.
>> 
>> 
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +373 673 98 493
>> 
>>> 20 нояб. 2017 г., в 23:29, Alexandru Covalschi <568...@gmail.com 
>>> <mailto:568...@gmail.com>> написал(а):
>>> 
>>> So the weirdest thing is Kamailio actually sends the request, but it 
>>> returns curl error 6 in the answer variable. I have a plenty of clonned 
>>> servers and same behaviour is on all of them, also just now tried on a 
>>> fresh debian 9 - same result. I'm inside a virtual machine (vmware), but 
>>> not sure it matters...
>>> 
>>> 
>>> Alexandru Covalschi
>>> VoIP Engineer and System Administrator
>>> tel: +373 673 98 493
>>> 
>>>> 20 нояб. 2017 г., в 22:37, Alexandru Covalschi <568...@gmail.com 
>>>> <mailto:568...@gmail.com>> написал(а):
>>>> 
>>>> I often get WARNING: http_client [functions.c:281]: curL_query_url(): 
>>>> Couldn't resolve host, while I don't even use hostnames. 
>>>> After I changed IP address to hostname (which I've added into /etc/hosts) 
>>>> nothing changed. It seems like a weird bug, but I've no idea - is it CURL 
>>>> or kamailio, but when I execute curl from shell it is working fine. I have 
>>>> google dns in resolve.conf and nslookup is also working ok.
>>>> Can anyone help me with that?
>>>> 
>>>> 
>>>> Alexandru Covalschi
>>>> VoIP Engineer and System Administrator
>>>> tel: +373 673 98 493
>>>> 
>>>>> 20 нояб. 2017 г., в 22:06, Alexandru Covalschi <568...@gmail.com 
>>>>> <mailto:568...@gmail.com>> написал(а):
>>>>> 
>>>>> t
>>>> 
>>> 
>> 
>> 
>> 
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
>> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
> 
> -- 
> Daniel-Constantin Mierla
> www.twitter.com/miconda <http://www.twitter.com/miconda> -- 
> www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
> Kamailio Advanced Training - www.asipto.com <http://www.asipto.com/>
> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com 
> <http://www.kamailioworld.com/>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Failed to find command http_client_query

2017-11-20 Thread Alexandru Covalschi
Works ok on 4.4.6. So I suppose it's a weird 5.0.4 + my environment bug. I'm 
rolling back to 4.4.6 right now, will keep one 5.0.4 machine for testing (on 
debian 9)
Let me know if I can provide any dumps/cores etc.

____
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 20 нояб. 2017 г., в 23:29, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> So the weirdest thing is Kamailio actually sends the request, but it returns 
> curl error 6 in the answer variable. I have a plenty of clonned servers and 
> same behaviour is on all of them, also just now tried on a fresh debian 9 - 
> same result. I'm inside a virtual machine (vmware), but not sure it matters...
> 
> ____
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +373 673 98 493
> 
>> 20 нояб. 2017 г., в 22:37, Alexandru Covalschi <568...@gmail.com 
>> <mailto:568...@gmail.com>> написал(а):
>> 
>> I often get WARNING: http_client [functions.c:281]: curL_query_url(): 
>> Couldn't resolve host, while I don't even use hostnames. 
>> After I changed IP address to hostname (which I've added into /etc/hosts) 
>> nothing changed. It seems like a weird bug, but I've no idea - is it CURL or 
>> kamailio, but when I execute curl from shell it is working fine. I have 
>> google dns in resolve.conf and nslookup is also working ok.
>> Can anyone help me with that?
>> 
>> ____
>> Alexandru Covalschi
>> VoIP Engineer and System Administrator
>> tel: +373 673 98 493
>> 
>>> 20 нояб. 2017 г., в 22:06, Alexandru Covalschi <568...@gmail.com 
>>> <mailto:568...@gmail.com>> написал(а):
>>> 
>>> t
>> 
> 

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


Re: [SR-Users] Failed to find command http_client_query

2017-11-20 Thread Alexandru Covalschi
So the weirdest thing is Kamailio actually sends the request, but it returns 
curl error 6 in the answer variable. I have a plenty of clonned servers and 
same behaviour is on all of them, also just now tried on a fresh debian 9 - 
same result. I'm inside a virtual machine (vmware), but not sure it matters...


Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 20 нояб. 2017 г., в 22:37, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> I often get WARNING: http_client [functions.c:281]: curL_query_url(): 
> Couldn't resolve host, while I don't even use hostnames. 
> After I changed IP address to hostname (which I've added into /etc/hosts) 
> nothing changed. It seems like a weird bug, but I've no idea - is it CURL or 
> kamailio, but when I execute curl from shell it is working fine. I have 
> google dns in resolve.conf and nslookup is also working ok.
> Can anyone help me with that?
> 
> 
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +373 673 98 493
> 
>> 20 нояб. 2017 г., в 22:06, Alexandru Covalschi <568...@gmail.com 
>> <mailto:568...@gmail.com>> написал(а):
>> 
>> t
> 

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


Re: [SR-Users] Failed to find command http_client_query

2017-11-20 Thread Alexandru Covalschi
I often get WARNING: http_client [functions.c:281]: curL_query_url(): Couldn't 
resolve host, while I don't even use hostnames. 
After I changed IP address to hostname (which I've added into /etc/hosts) 
nothing changed. It seems like a weird bug, but I've no idea - is it CURL or 
kamailio, but when I execute curl from shell it is working fine. I have google 
dns in resolve.conf and nslookup is also working ok.
Can anyone help me with that?

____
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 20 нояб. 2017 г., в 22:06, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> t

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


Re: [SR-Users] Failed to find command http_client_query

2017-11-20 Thread Alexandru Covalschi
To be specific - it actually loads with http_client, but works not really well 
- I get empty body even when I see there's a body in sngrep


Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

> 20 нояб. 2017 г., в 21:58, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> Hello everyone,
> 
> Updated to 5.0.4 from repo, up-to-date debian 8, http_client.so is certainly 
> loaded. When I try to change http_query to http_client_query it fails to load 
> with  error "failed to find command http_client_query". Any ideas? It is same 
> on all my test servers.
> 
> ____
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +373 673 98 493
> 

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


[SR-Users] Failed to find command http_client_query

2017-11-20 Thread Alexandru Covalschi
Hello everyone,

Updated to 5.0.4 from repo, up-to-date debian 8, http_client.so is certainly 
loaded. When I try to change http_query to http_client_query it fails to load 
with  error "failed to find command http_client_query". Any ideas? It is same 
on all my test servers.

____
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493

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