Re: [SR-Users] SIP reply reason and code in dialog

2018-01-26 Thread voipspace voipspace
Hi

I want to record the reason for the end of the call.
Was it a fail or a normal finish.

I completing cdr recording in dialog end so this is where I wan to get the 
following details

1). I want tot get reason value
After the INVITE completes successfully the codes are sent in the Reason: 
header of the BYE transaction.

or these

2).

Keyword SIP Description
noroute 404 No route to destination could be found
noconn  503 Could not connect to outgoing channel or network
noauth  401 Caller is not authenticated
nomedia 415 Failed to negotiate media channel
noanswer487 Called party did not answer
busy486 Called party is busy
congestion  480 Temporary network congestion
offline 404 Called party or network is offline
rejected406 Call rejected by called party or network
forbidden   403 Call is not authorized
incomplete  484 Called party number or address is incomplete
looping 483 Call loop detected
failure 500 Generic local server or interoperation failureDuring 
the call
timeout BYE 102 Call duration exceeded limit
nocall  481 100 Referenced call could not be found on server
pending 491 111 Another operation is in progress on the same call



23.01.2018, 08:26, "Daniel-Constantin Mierla" <mico...@gmail.com>:
> Hello,
>
> event_route[dialog:end] is executed when a BYE is received by Kamailio
> or a BYE is generated by Kamailio because the dialog lifetime elapsed.
> There is no SIP response at that moment.
>
> Maybe you can explain what you need to achieve and then see if that's
> possible to do somehow
>
> Cheers,
> Daniel
>
> On 21.01.18 16:24, voipspace voipspace wrote:
>>  within event_route[dialog:end]
>>
>>  How do I find out SIP reply reason phrase and SIP reply code
>>
>>  $rr
>>  $rs
>>
>>  and
>>
>>  $T_rpl($rs)
>>  $T_rpl($rr)
>>
>>  are null
>>
>>  ___
>>  Kamailio (SER) - Users Mailing List
>>  sr-users@lists.kamailio.org
>>  https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

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


[SR-Users] SIP reply reason and code in dialog

2018-01-21 Thread voipspace voipspace


within event_route[dialog:end]

How do I find out SIP reply reason phrase and SIP reply code

$rr
$rs

and

$T_rpl($rs)
$T_rpl($rr)

are null

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


Re: [SR-Users] exec warning

2018-01-17 Thread voipspace voipspace

I am using in  route, event_route blocks;




17.01.2018, 14:07, "Daniel-Constantin Mierla" <mico...@gmail.com>:
> Hello,
>
> are you using exec_msg() for a SIP response?
>
> Cheers,
> Daniel
>
> On 17.01.18 00:48, voipspace voipspace wrote:
>>  exec_msg gives the following warning. Even when no variables are used in 
>> the parameters
>>
>>   8(29619) WARNING: exec [exec_hf.c:464]: append_fixed_vars(): uri not parsed
>>   8(29619) WARNING: exec [exec_hf.c:482]: append_fixed_vars(): orig URI not 
>> parsed
>>
>>  ___
>>  Kamailio (SER) - Users Mailing List
>>  sr-users@lists.kamailio.org
>>  https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

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


[SR-Users] exec warning

2018-01-16 Thread voipspace voipspace


exec_msg gives the following warning. Even when no variables are used in the 
parameters


 8(29619) WARNING: exec [exec_hf.c:464]: append_fixed_vars(): uri not parsed
 8(29619) WARNING: exec [exec_hf.c:482]: append_fixed_vars(): orig URI not 
parsed

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


Re: [SR-Users] How much is too much logging

2018-01-15 Thread voipspace voipspace
Not yet come to the load testing stage yet. Still building the system.
Target is 2 calls a hour.

Is 50 log lines per call considered a lot?


15.01.2018, 11:05, "Daniel-Constantin Mierla" <mico...@gmail.com>:
> Hello,
>
> On 14.01.18 23:34, voipspace voipspace wrote:
>>  Hi
>>
>>  I set my logging like this to rsyslog to write to local file
>>
>>  log_facility=LOG_LOCAL0
>>  "local0.* -/var/log/kamailio.log" >> /etc/rsyslog.conf
>>
>>  The entries I have logging is quite detailed and can even be used to in 
>> place of acc info.
>>
>>  For each call it writes 50 lines. Would this be considered to many writes 
>> and impact performance?
>
> what is the expected requests per second rate?
>
> Have stress tested and watched the cpu usage by kamailio and syslog apps?
>
> Like Alex pointed as well, there are various elements that could impact
> here, such as fast hdd, in memory logging, ...
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

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


[SR-Users] send_data keeps connection open

2018-01-14 Thread voipspace voipspace
Hi

I tried send_data it transmits the data however the socket connect remains open.
Is it possibe to just send.
I dont want the other end to need to close the connect or reply.

thanks

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


Re: [SR-Users] Happy New Year 2018!

2018-01-02 Thread voipspace voipspace
Happy New Year, Every One.

Hope you had great time off with family and friends.

May 2018 be prosperous and happy for you all.

On to bigger and greater thing in the new year.

bw Kamailio is awesome!




01.01.2018, 11:09, "Daniel-Constantin Mierla" :
> A Happy And Prosperous Year 2018 to everyone using Kamailio and helping
> to improve the project!
>
> Looking forward to meeting many of you around this world during 2018 and
> collaborate online in a friendly environment!
>
> Daniel
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - www.asipto.com
> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

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


Re: [SR-Users] In failure_route after t_drop and t_relay - cancel problem

2018-01-02 Thread voipspace voipspace

It was a misconfig on my end.
I rechecked I had record route and route(RELAY) in proper place.

It is fine now :)


02.01.2018, 11:40, "Daniel-Constantin Mierla" <mico...@gmail.com>:
> Hello,
>
> did the last forwarded invite get any 1xx response?
>
> Cheers,
> Daniel
>
> On 29.12.17 01:21, voipspace voipspace wrote:
>> Hi
>>
>> Relevent section of the config similiar to below.
>>
>> Incoming invite is sent to a redirect server, 300 reply is sent back.
>> failure_route catches the '300' applies t_drop_replies(); and creates a new 
>> invite
>> to host NEW_ADDRESS.
>>
>> The issue I am facing - at this point when a CANCEL is received a '200' is 
>> sent back to the requester however it does get notified to the current
>> invite which remains processing
>>
>> ...
>>
>> if (is_method("CANCEL")) {
>>     if (t_check_trans()) {
>>             t_relay();
>>     }
>>     exit;
>>
>> ...
>>
>> failure_route[FAIL]
>> {
>>     if (t_check_status("300")) {
>>         t_drop_replies();
>>         rewritehost(NEW_ADDRESS);
>>         t_relay();
>>      }
>>  }
>>
>> ___ Kamailio (SER) - Users 
>> Mailing List sr-users@lists.kamailio.org 
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> -- Daniel-Constantin Mierla www.twitter.com/miconda -- 
> www.linkedin.com/in/miconda Kamailio Advanced Training - www.asipto.com 
> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

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


[SR-Users] In failure_route after t_drop and t_relay - cancel problem

2017-12-28 Thread voipspace voipspace
Hi Relevent section of the config similiar to below. Incoming invite is sent to a redirect server, 300 reply is sent back.failure_route catches the '300' applies t_drop_replies(); and creates a new inviteto host NEW_ADDRESS. The issue I am facing - at this point when a CANCEL is received a '200' is sent back to the requester however it does get notified to the current invite which remains processing ... if (is_method("CANCEL")) {    if (t_check_trans()) {            t_relay();    }    exit; ... failure_route[FAIL]{    if (t_check_status("300")) {        t_drop_replies();        rewritehost(NEW_ADDRESS);        t_relay();     } }  ___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Handling redirect replies and send to new host

2017-12-27 Thread voipspace voipspace
Hi

I am aiming to do the following

User calls to Kamailio Switch (A)
Switch (A) calls to Kamailio redirect server (B)..
(B) runs script to determine route
(B) sends Stateless 300 redirect reply to (A). 
(A) sends ACK to (B).
(A) send user call to another host (extracted from header variable from 
redirect reply)



(A) call to (B)
rewritehost("x.x.x.x");
t_relay();


(A) On receipt of the 300 response I do not want this redirect to go back to 
the user.

onreply_route {
if (t_check_status("3[0-9][0-9]")) {
// How do I send ACK to (B) to finish this redirect ?
// Then I want a new relay to the host. How would I do 
it ?
}
}




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


[SR-Users] how to escape asterisk in pattern matching

2017-12-05 Thread voipspace voipspace

how to escape asterisk in pattern matching

if($rU=~"\d+*") 

regards

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


[SR-Users] How to use ruri-pattern with allow_trusted?

2017-12-04 Thread voipspace voipspace

Hi

Have used allow_trused to pass the allowed ip.
Now I want to check the request has a correct tech prefix.

With an entry in ruri-patten column in the trusted table for example 75622#.

So if calls are to olny be allowed when the "to" destination starts with
75622#. 

Regards

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


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

2017-11-29 Thread voipspace voipspace
http://www.kamailio.org/docs/modules/4.4.x/modules/htable.html#htable.rpc.reload looks like it is a good method. thanks29.11.2017, 14:48, "voipspace voipspace" <voipsp...@yandex.com>: How then could I dynamic add or remove htables entries 29.11.2017, 14:40, "Alexandru Covalschi" <568...@gmail.com>: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 CovalschiVoIP Engineer and System Administratortel: +373 673 98 493

29 нояб. 2017 г., в 13:58, voipspace voipspace <voipsp...@yandex.com> написал(а):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" <voipsp...@yandex.com>: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 tablesbut 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 detailsip, prefix details.  This data can then be used to construct the relay parameter. Regards ___Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users,___Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users,___Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


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

2017-11-29 Thread 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" <voipsp...@yandex.com>: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 tablesbut 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 detailsip, 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


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

2017-11-29 Thread 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 tablesbut 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 detailsip, 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


Re: [SR-Users] allow_trusted not passing

2017-11-29 Thread voipspace voipspace
Thanks guys It worked for me now (allow_trusted("$si", "$proto"))and set UDP as proto is database  28.11.2017, 15:01, "Daniel-Constantin Mierla" <mico...@gmail.com>:Hello,one more thing to check -- the comparison is done by comparing thestring values, be sure there is no whitespace around.On the other hand, if you do not need the pattern matching, I suggest touse address table instead of trusted table, it is better optimized forip and network address matching.Cheers,DanielOn 28.11.17 09:41, Sebastian Damm wrote: Hi, On Tue, Nov 28, 2017 at 1:47 AM, voipspace voipspace <voipsp...@yandex.com> wrote: Unfortunately that does not work. Second argument is required Try it with only if (!allow_trusted()) { ... } If you check against the source address, you don't need an argument at all. I don't know if some pattern is needed for the trusted entry to work. In our setup the trusted entries look like this: item: { ip: w.x.y.z proto: 0 pattern: ^sip:.*$ ruri_pattern: NULL tag: NULL priority: 0 } Regards, Sebastian ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users --Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/micondaKamailio Advanced Training - www.asipto.comKamailio World Conference - May 14-16, 2018 - www.kamailioworld.com___Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] allow_trusted not passing

2017-11-27 Thread voipspace voipspace
Unfortunately that does not work. Second argument is required27.11.2017, 15:19, "Alexandru Covalschi" <568...@gmail.com>:Tryif (!allow_trusted("$si")) {    xlog("L_INFO","\n\n--NOT trusted! - $si - $proto");    sl_send_reply("403", "Forbidden");    exit;}
Alexandru CovalschiVoIP Engineer and System Administratortel: +373 673 98 493

27 нояб. 2017 г., в 11:48, voipspace voipspace <voipsp...@yandex.com> написал(а):},___Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

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


[SR-Users] allow_trusted not passing

2017-11-27 Thread voipspace voipspace
Hi I have the following condition below in my config if (!allow_trusted("$si", "$proto")) {    xlog("L_INFO","\n\n--NOT trusted! - $si - $proto");    sl_send_reply("403", "Forbidden");    exit;} I checked that $si is the same ip as in the permissions table and confirmed that it has been loadedwith kamcmd permissions.trustedDump This is the output{        table: 8        item: {                ip:  x.x.x.x                proto: 0                pattern:                ruri_pattern:                tag: NULL                priority: 0        }} However allow_trusted function returns false i.e. not trusted. Why so this be the case when permissions.trustedDump report as above? By the way I am using sqlite as the data store if that make a diffreence thanks   ___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users