[SR-Users] How to hook to Register And Unregister event in Kamailio

E. Schmidbauer eschmidbauer at gmail.com
Mon Jul 22 13:33:35 CEST 2019


here is a good example of how you can use evapi in kamailio:
http://kb.asipto.com/kamailio:k43-async-sip-routing-nodejs#evapi_processing

here is a good example of how you can implement it with a go app:
https://github.com/cgrates/kamevapi




On Mon, Jul 22, 2019 at 7:18 AM Anuran Barman <anuranbarman at gmail.com>
wrote:

> It seems like this module is useful for making the connection/message
> flow. But that I need when I have the events of Register and unregister.
> How to get the events from this module?
>
> On Mon, Jul 22, 2019 at 3:51 PM Anuran Barman <anuranbarman at gmail.com>
> wrote:
>
>> Though I have already a NodeJS server running, I will try the evapi
>> module. If there are some tutorial/Wiki on how to do this please share that
>> with me. That will be great help.
>>
>> On Mon, Jul 22, 2019 at 3:39 PM E. Schmidbauer <eschmidbauer at gmail.com>
>> wrote:
>>
>>> I would recommend using `evapi` for something like this
>>> You could build a small go app that connects via evapi and send/receive
>>> events to/from kamailio.
>>>
>>>
>>> On Mon, Jul 22, 2019 at 3:07 AM Anuran Barman <anuranbarman at gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>> I  am integrating Kamailio into my application. I want to hook to the
>>>> successful REGISTER and unregister event into Kamailio into my application.
>>>> For now, I am able to hook into INVITE event and can hit my server to send
>>>> a email to the callee user that user X is calling you. The way I am doing
>>>> is by this
>>>>         if (is_method("INVITE")) {
>>>>                 xlog("LOG_LOCAL3","L_INFO","invite came ($fU) ($tU)");
>>>>                 $var(res) = http_connect("sipnodejsserver",
>>>> "/","text/plain","src_user:$fU,dst_user:$tU" ,"$avp(route)");
>>>>                 xlog("LOG_LOCAL3","L_INFO","request sent $avp(route)
>>>>  $var(res)");
>>>>                 setflag(FLT_ACC); # do accounting
>>>>         }
>>>>
>>>> I need to show into my application that their SIP phone is online or
>>>> not. How can I hook into this?
>>>> _______________________________________________
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users at lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190722/39ca5f78/attachment.html>


More information about the sr-users mailing list