per component ASR/ACD and AngularJS

33 views
Skip to first unread message

David Villasmil

unread,
Mar 24, 2017, 2:48:19 PM3/24/17
to Homer Developers
Hello,

So I've made some changes to Homer, because I need (i think we all do) some out-of-the-box real ASR and ACD stats PER COMPONENT.

- I've patched sipcapture.c in kamailio (now included in version 5) to expose src_ip and dst_ip pvs, in order to get the real source and destination ip address of the packets.
- I've created a view in mysql called dispatcher and I'm using the dispatcher module to find out if both src_ip and dst_ip are included in the "alias" table.
- Whenever a call is received, lookup using dispatcher the src_ipo and dst_ip, if BOTH are there then:

I changed my kamailio cfg in order to store in a mem table the status of calls:
Create record for every tracked call in a MEMORY table (following Homer's philosophy)  when the following happens:
  • When an INVITE is received, insert the call info
  • When a final REPLY is received:
    • if Status = 1XX set the status_code field
    • if Status = 200 set the datetime_answer with NOW()
    • if Status is [3456]XX set the dateim_end and the sip_reason fiel. (datetime_answer should be empty)
  • When a BYE is received, set datetime_end, sip_reason.

Caveats:

There are cases to take into account:

  • Calls which dies without a BYE.
  • Calls which weren't processed properly
    • hack attempts, which do not go farther than 407 because the hacker doesn't try to authorize
    • INVITE's sent out but the client couldn't be reached

For these cases, whether to account for them or remove them, is to be decided,  for the PoC they are removed after 2 hours.


- When the stats timer fires, I compile all the info and insert it in a stats table.

The end result is aa follows:



It works pretty well.

I want to do a PR for this, the problem I'm having is with AngularJS (although i've been reading on it, I think the learning curve is very steep and it will take me a while to be able to do this), I don't know the first thing about it and I would like to show this info like the sipcapture results grid, possibly with a filter to filter by IP address.

I'm wondering if anyone can help me with this part?

Thanks a lot guys.

David

Lorenzo Mangani

unread,
Mar 24, 2017, 3:14:29 PM3/24/17
to home...@googlegroups.com
Hi David,

We'll be happy to fill in on the additional visualizations - the team here is currently working on the next HOMER UI so its a great time to add stuff.
Feel free to send a PR for the backend components, and we'll attache them to the rest.

Thanks!


Kind Regards,

Lorenzo Mangani
Managing Director and Core Dev

QXIP BV - Capture Engineering
Amsterdam, The Netherlands

Mobile: +31 6 4603-2730

Find our more about HOMER, PCAPTURE, CAPTAGENT and all our Services and Solutions at http://qxip.net 

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or legally privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of this original message. 

--
You received this message because you are subscribed to the Google Groups "Homer Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to homer-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Villasmil

unread,
Mar 24, 2017, 3:15:49 PM3/24/17
to Homer Developers
perfect, thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to homer-dev+...@googlegroups.com.

David Villasmil

unread,
Apr 10, 2017, 4:18:11 PM4/10/17
to Homer Developers
Hello All,

I just made 2 P/Rs for the "Per component ASR/ACD":



- Added 1 new table on schema_configuration called: version which is needed by kamailio's dispatcher module.
- Added 1 View on schema_configuration called dispatcher_module which returns a view of the table "alias" that can be used by kamailio's dispatcher module.


- I changed kamalio.cfg to use the dispatcher module to look for BOTH sides of a SIP dialog, if both IPs are found, this call will be trcked to get ASR/ACD.
- Changed everything/Dockerfile to install kamailio from "nightly" repository as the 2 pvs used for this feature are not yet in 5 (only one is)
- Changed webapp/Dockerfile to clone homer-api from my fork, this needs to be changed back to wherever the merged P/R is.


I hope I was clear enough :)

Thanks for everything guys, hope you like it!


David Villasmil

David Villasmil

unread,
May 3, 2017, 7:43:18 AM5/3/17
to Homer Developers
Has anyone looked into this?

Alexandr Dubovikov

unread,
May 3, 2017, 11:15:53 AM5/3/17
to home...@googlegroups.com
Hi David,

many thank for your PR. This very interesting way to do ASR/NER calculation, unfortunately, this requires some corrections:

First, you have changed the default templates variables to hardcoded strings and of course it not acceptable

The second part, there is a white space and tabulations changes, this should be applied like a separate PR.

and the last part: why do you prefer to use the dispatcher module for this?  IMHO the best way if you will get ASR for all IP ?

Wbr,
Alexandr



--
You received this message because you are subscribed to the Google Groups "Homer Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to homer-dev+unsubscribe@googlegroups.com.

David Villasmil

unread,
May 3, 2017, 11:23:47 AM5/3/17
to home...@googlegroups.com
Hello Alex,

Problem of getting a global ASR/ACD is that is masks possible problems, i.e.: let's say you have a load balanced architecture, and 1 gw has 60% asr while the other has 30%, depending on quantity of calls, you may not notice one gw is failing because the 2 compensate each other.

This of course also applies to ACD as well.

I think it's much better to have a drill-down of network performance per component out-of-the-box, you'll get more detailed info.

I will take a look at what you're pointing out.

Regards,

David
To unsubscribe from this group and stop receiving emails from it, send an email to homer-dev+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Homer Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/homer-dev/ixPAw1Fjygk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to homer-dev+...@googlegroups.com.

David Villasmil

unread,
May 3, 2017, 11:25:06 AM5/3/17
to home...@googlegroups.com
Oh yeah, sorry about those hardcoded params, i will fix them ASAP
Reply all
Reply to author
Forward
0 new messages