Re: [SR-Users] Issue in Dialplan Module

2017-08-07 Thread Logeshwaran G
Hi ,

Please find the below logs , The call is not placing Its in Trying state.

To: 
From: ;tag=e4269c5e
Via: SIP/2.0/UDP 192.168.3.5:6090
;branch=z9hG4bK-d87543-161839468-1--d87543-;rport
Call-ID: e01ac670234a8675
CSeq: 3 REGISTER
Contact: ;expires=0
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
User-Agent: eyeBeam release 3004t stamp 16741
Authorization: Digest
username="",realm="209.95.52.97",nonce="WYlDhVmJQlmWGnZELD+8UBwWgX2NmBdu",uri="sip:209.95.52.97",response="2b4efd8c09e8ce2de0a56fab38157c72",algorithm=MD5
Content-Length: 0


10:18:23.5
SENDING TO: 209.95.52.97:5060
REGISTER sip:209.95.52.97 SIP/2.0
To: 
From: ;tag=e4269c5e
Via: SIP/2.0/UDP 192.168.3.5:6090
;branch=z9hG4bK-d87543-161839468-1--d87543-;rport
Call-ID: e01ac670234a8675
CSeq: 3 REGISTER
Contact: ;expires=0
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
User-Agent: eyeBeam release 3004t stamp 16741
Authorization: Digest
username="",realm="209.95.52.97",nonce="WYlDhVmJQlmWGnZELD+8UBwWgX2NmBdu",uri="sip:209.95.52.97",response="2b4efd8c09e8ce2de0a56fab38157c72",algorithm=MD5
Content-Length: 0


10:18:25.5
SENDING TO: 209.95.52.97:5060
REGISTER sip:209.95.52.97 SIP/2.0
To: 
From: ;tag=e4269c5e
Via: SIP/2.0/UDP 192.168.3.5:6090
;branch=z9hG4bK-d87543-161839468-1--d87543-;rport
Call-ID: e01ac670234a8675
CSeq: 3 REGISTER
Contact: ;expires=0
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
User-Agent: eyeBeam release 3004t stamp 16741
Authorization: Digest
username="",realm="209.95.52.97",nonce="WYlDhVmJQlmWGnZELD+8UBwWgX2NmBdu",uri="sip:209.95.52.97",response="2b4efd8c09e8ce2de0a56fab38157c72",algorithm=MD5
Content-Length: 0


10:18:29.5
SENDING TO: 209.95.52.97:5060
REGISTER sip:209.95.52.97 SIP/2.0
To: 
From: ;tag=e4269c5e
Via: SIP/2.0/UDP 192.168.3.5:6090
;branch=z9hG4bK-d87543-161839468-1--d87543-;rport
Call-ID: e01ac670234a8675
CSeq: 3 REGISTER
Contact: ;expires=0
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
User-Agent: eyeBeam release 3004t stamp 16741
Authorization: Digest
username="",realm="209.95.52.97",nonce="WYlDhVmJQlmWGnZELD+8UBwWgX2NmBdu",uri="sip:209.95.52.97",response="2b4efd8c09e8ce2de0a56fab38157c72",algorithm=MD5
Content-Length: 0


10:18:33.5
SENDING TO: 209.95.52.97:5060
REGISTER sip:209.95.52.97 SIP/2.0
To: 
From: ;tag=e4269c5e
Via: SIP/2.0/UDP 192.168.3.5:6090
;branch=z9hG4bK-d87543-161839468-1--d87543-;rport
Call-ID: e01ac670234a8675
CSeq: 3 REGISTER
Contact: ;expires=0
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
User-Agent: eyeBeam release 3004t stamp 16741
Authorization: Digest
username="",realm="209.95.52.97",nonce="WYlDhVmJQlmWGnZELD+8UBwWgX2NmBdu",uri="sip:209.95.52.97",response="2b4efd8c09e8ce2de0a56fab38157c72",algorithm=MD5
Content-Length: 0


10:18:34.3
RECEIVING FROM: 209.95.52.97:5060
SIP/2.0 200 OK
To: ;tag=9dd61ff61e802d8e2bef5f14621ef3c2.8904
From: ;tag=e4269c5e
Via: SIP/2.0/UDP 192.168.3.5:6090
;branch=z9hG4bK-d87543-161839468-1--d87543-;rport=6090;received=192.168.3.5
Call-ID: e01ac670234a8675
CSeq: 3 REGISTER
Server: kamailio (5.0.2 (x86_64/linux))
Content-Length: 0


10:18:37.7 Proxy slot #0 () - Shutting down DUM took 16.115001 seconds.



On Tue, Aug 8, 2017 at 2:04 AM, Joel Serrano  wrote:

> Hi,
>
> (Sorry, my previous reply got blocked due to email size). Can you enable
> debug logs and try again, then send the logs?
>
> I tried the regex with the number 000919629897172 and it worked for me..
> We must be missing something..
>
>
>
> On Sun, Aug 6, 2017 at 11:19 PM, Logeshwaran G 
> wrote:
>
>> I mean to say by applying the Rule mentioned from Joel is also not worked.
>>
>>
>> Rules:
>> ==
>> dpid: 1
>> pr: 1
>> match_op: 1
>> match_exp: ^000[0-9]+$  <<< This will trigger a match on any number
>> that will start with three zeros.
>> match_len: 0
>> subst_exp: ^000([0-9]+)$  <<< If the match_exp is found, then create
>> a group with the desired part of the number, in this case, everything after
>> the three zeros.
>> repl_exp: \1   <<< \1 is a back reference to group 1, in this case
>> the number you selected in subst_exp, without the three zeros.
>> attrs:
>>
>>
>>
>>
>> On Mon, Aug 7, 2017 at 11:43 AM, Logeshwaran G 
>> wrote:
>>
>>> Please find the below output
>>>
>>>  5(12951) ERROR: 

Re: [SR-Users] Module for Call placement between the two Different Switches

2017-08-07 Thread Logeshwaran G
Thank you

On Mon, Aug 7, 2017 at 5:43 PM, Daniel Tryba  wrote:

> On Sat, Aug 05, 2017 at 11:34:18AM +0530, Logeshwaran G wrote:
> > I am Having my own kamailio Pbx setup, I Have my local subscriber list
> > database, I need to allow the calls from the outside switch(For example
> > Nexge or Itel etc...) What module I have to refer for this??
>
> There is no need for special modules for this. Just accept these SIP
> requests.
>
> The problem might be how you known you should accept these messages.
> This can be done with following (but not limited to):
> - a simple if($si=="1.2.3.4")
> - using is_in_subnet from ipops
> - ds_is_from_list if you have these endpoints in a dispatcher
> - the permission module
> - maybe even a challenge/response with a authenticate function
>
>
> ___
> 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] Some Fault messages I am trying to clear up

2017-08-07 Thread Kevin Greene

Hi list people:

When using Siremis with Kamailio, I see this error:

First Fault
[2017-08-07 22:55:17 (GMT)] An exception occurred while executing this 
script:
Error message: #256, Unable to location template file 
system_internal_error.tpl.
Script name and line number of error: 
/var/www/siremis-4.3.0/openbiz/bin/Resource.php:283


function: errorHandler ( 256, "Unable to location template file 
system_internal_error.tpl.", 
"/var/www/siremis-4.3.0/openbiz/bin/Resource.php", 283, Array(11) ) @ 
/var/www/siremis-4.3.0/openbiz/bin/sysheader.inc 117
function: userErrorHandler ( 256, "Unable to location template file 
system_internal_error.tpl.", 
"/var/www/siremis-4.3.0/openbiz/bin/Resource.php", 283, Array(11) ) @
function: trigger_error ( "Unable to location template file 
system_internal_error.tpl.", 256 ) @ 
/var/www/siremis-4.3.0/openbiz/bin/Resource.php 283
function: getTplFileWithPath ( "system_internal_error.tpl", "email" ) @ 
/var/www/siremis-4.3.0/openbiz/bin/BizSystem.php 544
function: getTplFileWithPath ( "system_internal_error.tpl", "email" ) @ 
/var/www/siremis-4.3.0/siremis/modules/service/userEmailService.php 108
function: SystemInternalErrorEmail ( Array(2), Null ) @ 
/var/www/siremis-4.3.0/siremis/modules/common/form/ErrorForm.php 34
function: Report ( ) @ 
/var/www/siremis-4.3.0/openbiz/bin/BizController.php 310
function: invoke ( ) @ 
/var/www/siremis-4.3.0/openbiz/bin/BizController.php 110
function: dispatchRequest ( ) @ 
/var/www/siremis-4.3.0/openbiz/bin/BizController.php 32
function: include_once ( 
"/var/www/siremis-4.3.0/openbiz/bin/BizController.php" ) @ 
/var/www/siremis-4.3.0/siremis/bin/controller.php 6


It looks like I am missing a template file to send a copy of the error 
message to the system administrator.


Also: during the installation, I, using the install script, added a 
number of tables to the MySQL server. However, it seems I am missing a 
few columns in a couple of the tables. Is there some sort of system 
sanity script that will check the database for all the required tables 
and required columns?


Example:

2017-08-07 23:12:14 (GMT)] An exception occurred while executing this 
script:
Error message: #0, Error in query:: SELECT T0.id, T0.setid, T0.url, 
T0.flags, T0.weight, T0.description FROM rtpproxy T0 LIMIT 10. 
SQLSTATE[42S02]: Base table or view not found: 1146 Table 
'kamailio.rtpproxy' doesn't exist
Script name and line number of error: 
/var/www/siremis-4.3.0/openbiz/bin/data/BizDataObj_Lite.php:447


or:

[2017-08-07 23:14:58 (GMT)] An exception occurred while executing this 
script:
Error message: #0, Error in query:: SELECT T0.id, T0.name, T0.uri, 
T0.mohdir, T0.mohfile, T0.debug FROM mohqueues T0 LIMIT 10. 
SQLSTATE[42S02]: Base table or view not found: 1146 Table 
'kamailio.mohqueues' doesn't exist


or:

[2017-08-07 23:16:57 (GMT)] An exception occurred while executing this 
script:
Error message: #42S22, SQLSTATE[42S22]: Column not found: 1054 Unknown 
column 'src_user' in 'field list'
Script name and line number of error: 
/var/www/siremis-4.3.0/openbiz/others/Zend/Db/Statement/Pdo.php:234


or:

2017-08-07 23:18:33 (GMT)] An exception occurred while executing this 
script:
Error message: #0, Error in query:: SELECT T0.id, T0.method, 
T0.from_tag, T0.to_tag, T0.callid, T0.sip_code, T0.sip_reason, T0.time, 
T0.src_ip, T0.dst_user, T0.dst_domain, T0.dst_ouser, T0.src_user, 
T0.src_domain, T0.cdr_id FROM acc T0 WHERE method='INVITE' AND 
T0.src_user='admin' LIMIT 10. SQLSTATE[42S22]: Column not found: 1054 
Unknown column 'T0.src_ip' in 'field list'


In the case of the above table, it does not say which table.

Anyway -- any help would be great.

Thanks.

Kevin




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


Re: [SR-Users] Issue in Dialplan Module

2017-08-07 Thread Joel Serrano
Hi,

(Sorry, my previous reply got blocked due to email size). Can you enable
debug logs and try again, then send the logs?

I tried the regex with the number 000919629897172 and it worked for me.. We
must be missing something..



On Sun, Aug 6, 2017 at 11:19 PM, Logeshwaran G 
wrote:

> I mean to say by applying the Rule mentioned from Joel is also not worked.
>
>
> Rules:
> ==
> dpid: 1
> pr: 1
> match_op: 1
> match_exp: ^000[0-9]+$  <<< This will trigger a match on any number
> that will start with three zeros.
> match_len: 0
> subst_exp: ^000([0-9]+)$  <<< If the match_exp is found, then create
> a group with the desired part of the number, in this case, everything after
> the three zeros.
> repl_exp: \1   <<< \1 is a back reference to group 1, in this case
> the number you selected in subst_exp, without the three zeros.
> attrs:
>
>
>
>
> On Mon, Aug 7, 2017 at 11:43 AM, Logeshwaran G 
> wrote:
>
>> Please find the below output
>>
>>  5(12951) ERROR: 

Re: [SR-Users] Core crash in del_lump() "offset exceeds message size" when using subst() inside tm:local-request route.

2017-08-07 Thread Cody Herzog
Yes. The crash was happening when using subst() or subst_body() inside of 
event_route[tm:local-request].

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Monday, August 7, 2017 12:55 PM
To: Cody Herzog ; Kamailio (SER) - Users Mailing 
List 
Subject: Re: [SR-Users] Core crash in del_lump() "offset exceeds message size" 
when using subst() inside tm:local-request route.


Were you using the subst() in event_route[...]?

Cheers,
Daniel

On 07.08.17 19:47, Cody Herzog wrote:
Thanks for the response.

I will make a pull request soon.

>are you using msg_apply_changes()?

No. I tried to use it, but it does not seem to be allowed in the 
tm:local-request route.

>do you receive traffic over tcp/tls?

Yes. We are using TLS.

Thanks.
-Cody

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Monday, August 7, 2017 12:15 AM
To: Cody Herzog ; 
Kamailio (SER) - Users Mailing List 

Subject: Re: [SR-Users] Core crash in del_lump() "offset exceeds message size" 
when using subst() inside tm:local-request route.


Hello,

can you make a pull request with the patch you did to terminate the buffer with 
'\0'? It is a valid fix if there are situations when the buffer is not 
zero-terminated.

To figure out when it is not zero-terminated, if you don't know already, in 
order to analyze if it has impact on other part of code, few questions:

  - are you using msg_apply_changes()?

  - do you receive traffic over tcp/tls?

Cheers,
Daniel

On 31.07.17 19:43, Cody Herzog wrote:
Hello.

We are running Kamailio 4.3.5 on Ubuntu 14.04 LTS 64-bit.

Sorry, I should have included that information in my first email.

I have done more debugging, and I believe the problem is caused by the 
subst_run() function being used on a message buffer which is not null 
terminated at msg->len.

The subst_f() and subst_body_f() functions both call  subst_run(), and most of 
the time, everything seems fine. However, in our use case, the msg->buf does 
not always seem to be null terminated at msg->len.

In other words: msg->buf[msg->len] != '\0'

It seems there is sometimes some extra data in the buffer beyond msg->len, and 
subst_run() may abort() if it ever moves beyond msg->len.

I found a few places in textops.c where a buffer is being temporarily null 
terminated in order to perform a regexec () search, then restored later, as in:

body = hf->body;
c = body.s[body.len];
body.s[body.len] = '\0';
ret = regexec((regex_t*) re, body.s, 1, , 0);
body.s[body.len] = c;

I've tried making the same type of change to subst_f() and subst_body_f(), and 
now I am not seeing the crash.

If I guarantee that msg->buf[msg->len] == '\0' when subst_run() is called, then 
everything seems to be OK.

What do you think? Is that a valid change to make?

Let me know if you'd like me to make a pull request on the main branch with 
those changes.

Thanks very much.
-Cody






From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Sunday, July 30, 2017 11:12 PM
To: Kamailio (SER) - Users Mailing List 
; Cody Herzog 

Subject: Re: [SR-Users] Core crash in del_lump() "offset exceeds message size" 
when using subst() inside tm:local-request route.


Hello,

what's the version of Kamailio and the operating system you run on?

Cheers,
Daniel

On 28.07.17 23:53, Cody Herzog wrote:
Hello.

Inside the tm:local-request route, I am trying to modify the body of outgoing 
NOTIFY messages using the subst_body() function.

Things seem to work fine most of the time. The NOTIFY messages are correctly 
modified. However, I will very rarely hit a crash.

I can force the crash to happen more quickly by stress testing with thousands 
of NOTIFY messages being modified.

Is it safe to call subst() or subst_body() inside the tm:local-request route? 
If not, is there another way I can modify the outgoing NOTIFY messages safely?

Note that I am also calling append_hf() inside the same tm:local-request route, 
but that has been working for a very long time without causing any problems. 
Could there be some kind of bad interaction between append_hf() and 
subst_body()?

Strangely, it seems like using subst() makes the crash more likely to happen. 
For some reason, subst_body() seems to be more robust.

Here are the logs I see:

-
Jul 28 10:57:40 SIPCOMM-VEGAS-TEST /usr/local/sbin/kamailio[2476]: CRITICAL: 
 [data_lump.c:292]: del_lump(): offset exceeds message size (1625 > 1194) 
aborting...
Jul 28 10:57:43 SIPCOMM-VEGAS-TEST /usr/local/sbin/kamailio[2481]: CRITICAL: 
 [pass_fd.c:275]: receive_fd(): EOF on 53
Jul 28 10:57:44 SIPCOMM-VEGAS-TEST /usr/local/sbin/kamailio[2367]: ALERT: 
 [main.c:731]: handle_sigs(): child process 2476 

Re: [SR-Users] Module for Call placement between the two Different Switches

2017-08-07 Thread Daniel Tryba
On Sat, Aug 05, 2017 at 11:34:18AM +0530, Logeshwaran G wrote:
> I am Having my own kamailio Pbx setup, I Have my local subscriber list
> database, I need to allow the calls from the outside switch(For example
> Nexge or Itel etc...) What module I have to refer for this??

There is no need for special modules for this. Just accept these SIP
requests.

The problem might be how you known you should accept these messages.
This can be done with following (but not limited to): 
- a simple if($si=="1.2.3.4")
- using is_in_subnet from ipops
- ds_is_from_list if you have these endpoints in a dispatcher
- the permission module
- maybe even a challenge/response with a authenticate function


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


Re: [SR-Users] carrierroute and failure route

2017-08-07 Thread Sebastian Damm
Hi,

On Sat, Aug 5, 2017 at 7:00 PM, Yu Boot  wrote:
> Gotcha! I've added fix_nated_contact() to [NATDETECT] route and now all
> messages UNTIL reinvite occurs are with correct NATed IP in "Contact" field.

while fix_nated_contact() may work in your scenario, it is generally a
"bad variant" to use. The set_contact_alias() method is much less
invasive. Depending on the client, it could reject reINVITEs or other
in-call messages (like BYE) because the contact header initially sent
differs from the request URI of the incoming message.

That's why set_contact_alias() only appends the real IP of the client,
and handle_ruri_alias() takes care that the original contact is set
correctly.

As said, if it works in your environment, everything is fine. Just be
careful if you don't know what devices will be talking to your
service.

BR
Sebastian

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


[SR-Users] RFC: Moving misc/obsolete/ to its own git repository

2017-08-07 Thread Daniel-Constantin Mierla
Hello,

trying to make the git repository a bit slimmer and avoid unuseful
indexing of unused modules, I am considering to move misc/obsolete to
its own github repository (planned to be named kamailio-obsolete). The
initial idea was to keep there modules that were duplicated or no longer
maintained, just in case someone will come later and wants to revive it.
However, iirc, it is more than 4 years and nobody touched them, so very
likely it requires a bit of work to revive any of them, so a fresh
re-import will be the same from an external repository.

If anyone still wants to keep them in the main kamailio repository,
respond on the mailing list and present the benefits. If not, I will do
the operation in the next several days.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - 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] load credentials in cnxcc from dburl

2017-08-07 Thread Daniel-Constantin Mierla
Note also the is_subscriber() function from auth_db, it can be used to
load credentials without requiring the authentication process.

Also, sqlops is a handy module for loading data from any sql database table.

Cheers,
Daniel


On 07.08.17 10:04, Logeshwaran G wrote:
> Thanks a lot,
>
> Will refer the avpops module, If I need help, will get back to you.
>
> On Mon, Aug 7, 2017 at 1:24 PM, Federico Cabiddu
> > wrote:
>
> Hi,
> you can use the avpops module for
> this http://www.kamailio.org/docs/modules/devel/modules/avpops.html
> .
>
> Regards,
>
> Federico
>
> On Mon, Aug 7, 2017 at 9:52 AM, Logeshwaran G
> > wrote:
>
> Yes, I am using the script which I have sent you in the
> Previous mail,
>
> But That   if($avp(credits) < 30
> $avp(credits) is not reading the credits value from the
> subscriber table,
>
> Do i need to implement something for reading that database.
>
>
> On Mon, Aug 7, 2017 at 1:14 PM, Federico Cabiddu
>  > wrote:
>
> Hi,
> so you don't need any credentials in cnxcc.
> Just do as you are doing, read the subscriber's column
> which hold the user's balance,and call or not the cnxcc's
> functions according to the value of the avp.
>
> Cheers,
>
> Federico
>
> On Mon, Aug 7, 2017 at 9:38 AM, Logeshwaran G
> >
> wrote:
>
> Hi ,
>
> I do have one column name Credits in the kamailio
> table subscriber,
>
> I am trying to disallow the calls to the user whom
> they have low credits balance.
>
> with the below codes:
>
>  if($avp(credits) < 30) {
> xlog("L_ALERT", "ALERT: Credit balance
> is less");
> sl_send_reply("403", "Forbidden");
> drop; 
> }
>
> Correct me if I am wrong!!
>
> On Mon, Aug 7, 2017 at 12:37 PM, Federico Cabiddu
>  > wrote:
>
> Hi,
> maybe I don't understand your question, but cnxcc
> does not make any usage nor requires credential.
> What are you trying to achieve exactly?
>
> Cheers,
>
> Federico
>
> On Mon, Aug 7, 2017 at 8:21 AM, Logeshwaran G
>  > wrote:
>
> Is there any possibility of loading credential
> from the db in the cnxcc module.
>
> For Example: modparam("auth_db",
> "load_credentials", "$avp(status)=status")
>
> Like the above one , I need it for CNXCC
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 
> 
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
> 
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 
> 
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
> 
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 

Re: [SR-Users] load credentials in cnxcc from dburl

2017-08-07 Thread Federico Cabiddu
Hi,
you can use the avpops module for this
http://www.kamailio.org/docs/modules/devel/modules/avpops.html.

Regards,

Federico

On Mon, Aug 7, 2017 at 9:52 AM, Logeshwaran G 
wrote:

> Yes, I am using the script which I have sent you in the Previous mail,
>
> But That   if($avp(credits) < 30
> $avp(credits) is not reading the credits value from the subscriber table,
>
> Do i need to implement something for reading that database.
>
>
> On Mon, Aug 7, 2017 at 1:14 PM, Federico Cabiddu <
> federico.cabi...@gmail.com> wrote:
>
>> Hi,
>> so you don't need any credentials in cnxcc.
>> Just do as you are doing, read the subscriber's column which hold the
>> user's balance,and call or not the cnxcc's functions according to the value
>> of the avp.
>>
>> Cheers,
>>
>> Federico
>>
>> On Mon, Aug 7, 2017 at 9:38 AM, Logeshwaran G 
>> wrote:
>>
>>> Hi ,
>>>
>>> I do have one column name Credits in the kamailio table subscriber,
>>>
>>> I am trying to disallow the calls to the user whom they have low credits
>>> balance.
>>>
>>> with the below codes:
>>>
>>>  if($avp(credits) < 30) {
>>> xlog("L_ALERT", "ALERT: Credit balance is less");
>>> sl_send_reply("403", "Forbidden");
>>> drop;
>>> }
>>>
>>> Correct me if I am wrong!!
>>>
>>> On Mon, Aug 7, 2017 at 12:37 PM, Federico Cabiddu <
>>> federico.cabi...@gmail.com> wrote:
>>>
 Hi,
 maybe I don't understand your question, but cnxcc does not make any
 usage nor requires credential.
 What are you trying to achieve exactly?

 Cheers,

 Federico

 On Mon, Aug 7, 2017 at 8:21 AM, Logeshwaran G 
 wrote:

> Is there any possibility of loading credential from the db in the
> cnxcc module.
>
> For Example: modparam("auth_db", "load_credentials",
> "$avp(status)=status")
>
> Like the above one , I need it for CNXCC
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>

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


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


Re: [SR-Users] load credentials in cnxcc from dburl

2017-08-07 Thread Logeshwaran G
Yes, I am using the script which I have sent you in the Previous mail,

But That   if($avp(credits) < 30
$avp(credits) is not reading the credits value from the subscriber table,

Do i need to implement something for reading that database.


On Mon, Aug 7, 2017 at 1:14 PM, Federico Cabiddu  wrote:

> Hi,
> so you don't need any credentials in cnxcc.
> Just do as you are doing, read the subscriber's column which hold the
> user's balance,and call or not the cnxcc's functions according to the value
> of the avp.
>
> Cheers,
>
> Federico
>
> On Mon, Aug 7, 2017 at 9:38 AM, Logeshwaran G 
> wrote:
>
>> Hi ,
>>
>> I do have one column name Credits in the kamailio table subscriber,
>>
>> I am trying to disallow the calls to the user whom they have low credits
>> balance.
>>
>> with the below codes:
>>
>>  if($avp(credits) < 30) {
>> xlog("L_ALERT", "ALERT: Credit balance is less");
>> sl_send_reply("403", "Forbidden");
>> drop;
>> }
>>
>> Correct me if I am wrong!!
>>
>> On Mon, Aug 7, 2017 at 12:37 PM, Federico Cabiddu <
>> federico.cabi...@gmail.com> wrote:
>>
>>> Hi,
>>> maybe I don't understand your question, but cnxcc does not make any
>>> usage nor requires credential.
>>> What are you trying to achieve exactly?
>>>
>>> Cheers,
>>>
>>> Federico
>>>
>>> On Mon, Aug 7, 2017 at 8:21 AM, Logeshwaran G 
>>> wrote:
>>>
 Is there any possibility of loading credential from the db in the cnxcc
 module.

 For Example: modparam("auth_db", "load_credentials",
 "$avp(status)=status")

 Like the above one , I need it for CNXCC

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


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


Re: [SR-Users] load credentials in cnxcc from dburl

2017-08-07 Thread Federico Cabiddu
Hi,
so you don't need any credentials in cnxcc.
Just do as you are doing, read the subscriber's column which hold the
user's balance,and call or not the cnxcc's functions according to the value
of the avp.

Cheers,

Federico

On Mon, Aug 7, 2017 at 9:38 AM, Logeshwaran G 
wrote:

> Hi ,
>
> I do have one column name Credits in the kamailio table subscriber,
>
> I am trying to disallow the calls to the user whom they have low credits
> balance.
>
> with the below codes:
>
>  if($avp(credits) < 30) {
> xlog("L_ALERT", "ALERT: Credit balance is less");
> sl_send_reply("403", "Forbidden");
> drop;
> }
>
> Correct me if I am wrong!!
>
> On Mon, Aug 7, 2017 at 12:37 PM, Federico Cabiddu <
> federico.cabi...@gmail.com> wrote:
>
>> Hi,
>> maybe I don't understand your question, but cnxcc does not make any usage
>> nor requires credential.
>> What are you trying to achieve exactly?
>>
>> Cheers,
>>
>> Federico
>>
>> On Mon, Aug 7, 2017 at 8:21 AM, Logeshwaran G 
>> wrote:
>>
>>> Is there any possibility of loading credential from the db in the cnxcc
>>> module.
>>>
>>> For Example: modparam("auth_db", "load_credentials",
>>> "$avp(status)=status")
>>>
>>> Like the above one , I need it for CNXCC
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] load credentials in cnxcc from dburl

2017-08-07 Thread Logeshwaran G
Hi ,

I do have one column name Credits in the kamailio table subscriber,

I am trying to disallow the calls to the user whom they have low credits
balance.

with the below codes:

 if($avp(credits) < 30) {
xlog("L_ALERT", "ALERT: Credit balance is less");
sl_send_reply("403", "Forbidden");
drop;
}

Correct me if I am wrong!!

On Mon, Aug 7, 2017 at 12:37 PM, Federico Cabiddu <
federico.cabi...@gmail.com> wrote:

> Hi,
> maybe I don't understand your question, but cnxcc does not make any usage
> nor requires credential.
> What are you trying to achieve exactly?
>
> Cheers,
>
> Federico
>
> On Mon, Aug 7, 2017 at 8:21 AM, Logeshwaran G 
> wrote:
>
>> Is there any possibility of loading credential from the db in the cnxcc
>> module.
>>
>> For Example: modparam("auth_db", "load_credentials",
>> "$avp(status)=status")
>>
>> Like the above one , I need it for CNXCC
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] load credentials in cnxcc from dburl

2017-08-07 Thread Federico Cabiddu
Hi,
maybe I don't understand your question, but cnxcc does not make any usage
nor requires credential.
What are you trying to achieve exactly?

Cheers,

Federico

On Mon, Aug 7, 2017 at 8:21 AM, Logeshwaran G 
wrote:

> Is there any possibility of loading credential from the db in the cnxcc
> module.
>
> For Example: modparam("auth_db", "load_credentials", "$avp(status)=status")
>
> Like the above one , I need it for CNXCC
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Issue in Dialplan Module

2017-08-07 Thread Logeshwaran G
Please find the below output

 5(12951) ERROR: