[SR-Users] Error in parse json documents in kamailio with jansson module

2018-01-07 Thread Mojtaba
Hello,
I used ndbmongo module in kamailio,
I used mongodb_find command to get some data from mongo, like this:

if(mongodb_find("sermongo", "Asterisk", "user", "{ \"number\" :
\"$fU\" }", "res")) {
xlog("L_INFO", "Data from mongodb is \"
$mongodb(res=>value) \" \n");
$var(data) = $mongodb(res=>value);
}
The result in syslog is like this:
Jan  8 07:23:36 ubuntu14 /usr/local/sbin/kamailio[12127]: {1 2 INVITE
MDRlMjRlNGVjZGY1Y2JkYjA5OGM2ZTg1ZTFjZTk0Nzg.} INFO: 

Re: [SR-Users] parsing of SIP message failed

2018-01-07 Thread Suresh Talasaniya
Hello Everyone,

I need to setup Kamailio server with Presence for SIP and WebRTC clients.

The WebRTC client gets the subscribe and notify events for zoiper sip
client and also display the presence in browser log. But other VoIP phone
and WebRTC extension events for presence not received. I have seen some
errors in Kamailio.

Please, find here attached 3 files for reference.

1) kamailio.cfg (part of kamailio.cfg file)
2) kamailio.log
3) webrtc_browser.log


Could somebody help me with this?

On Thu, Jan 4, 2018 at 2:21 PM, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> On 03.01.18 12:33, Suresh Talasaniya wrote:
>
> Hi,
>
> *I consistently receive the following 3 errors (see below) over and over
> when a call is being collected.*
>
>
>
>
>
>
>
>
> *what do you mean by "when a call is being collected"? What exactly are
> you doing in kamailio.cfg for this operation> The message is an HTTP
> response, Kamailio can act only as HTTP server, therefore receiving only
> HTTP requests. Kamailio cannot act as an HTTP proxy. Cheers, Daniel *
>
>
>
> ERROR:  [core/parser/parse_fline.c:257]: parse_first_line():
> parse_first_line: bad message (offset: 22)
>
> ERROR:  [core/parser/msg_parser.c:671]: parse_msg(): ERROR:
> parse_msg: message= SIP/2.0/TLS x.x.x.x:42173#015#012Sec-WebSocket-Protocol:
> sip#015#012Upgrade: websocket#015#012Connection:
> upgrade#015#012Sec-WebSocket-Accept: 
> qrLTSNMA7oAO8YXGaUhf3Ru26X0=#015#012Content-Length:
> 0#015#012#015#012>
>
> Any assistance would be appreciated.
>
> Thank you.
>
> --
> Regards,
> Suresh Talasaniya.
> Contact : +91-9724264776
> Skype : suresh.talsaniya
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - www.asipto.com
> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
>
>


-- 
Regards,
Suresh Talasaniya.
Contact : +91-9724264776
Skype : suresh.talsaniya


kamailio.cfg
Description: Binary data


kamailio.log
Description: Binary data


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


[SR-Users] cdr processing questions

2018-01-07 Thread voipspace voipspace


A few question;

Firstly

With mod acc and acc_cdr i see the default fields logged is only start_time, 
end_time, duration.

This is an actual entry logged.

start_time, end_time, duration
1515353126, 1515353135, 9.66

Why is the duration 9.66? 

It seems wrong because it is more then the difference in time

1515353135 - 1515353126 = 9



Secondly

What is a reliable way to capture and log start time, answer time, and end time.
How do I get the duration info. a) start time to end time. b) answer to end 
time. 

Is there an built in variable that store this info?


Thirdly

dialog events listed as:

event_route[dialog:start]
event_route[dialog:end]
event_route[dialog:failed]

There does not seems to be a event for answer so then how to be notified when a 
dialog is answered?

Regards

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


[SR-Users] app_lua sr.sqlops.query exit status

2018-01-07 Thread jenus

Hello,

I'm doing some tests with a lua script and app_lua. I'm using 
sr.sqlops.query to insert records into the database but would like to 
test the exit status of the sql query. In kamailio i can do:


if(!sql_query("kamailio", "INSERT INTO subscriber ..."))

Is there some kind of exit status for the lua function sr.sqlops.query 
in order to do the same check in lua? In other words, is it possible to 
check if a sql query was successful in lua? The result seems to be nill 
in all cases for a INSERT in lua using sr.sqlops.query.



Thanks,

Jan Hazenberg

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