[OpenSIPS-Users] external app listening to OpenSIPS/SIP events

Julian Kay juliank at vazycomm.com
Thu Jan 7 15:32:36 CET 2016


Thanks for your help!!

yes the event is reaching the xmlrpc server I'm including 2 entries in the Tomcat log file:

call using xmlrpc-test-tool: 	192.168.3.167 - - [06/Jan/2016:16:26:11 -0500] "POST /ccurbiz/xmlrpc/RPC2 HTTP/1.0" 200 156

call using event_xmlrpc:	192.168.3.167 - - [06/Jan/2016:23:21:19 -0500] "POST /RPC2 HTTP/1.1" 404 959

(192.168.3.167 is the OpenSIPs server)

I've tried a few variations for the host name parameter including: 
subscribe_event("E_SIP_MESSAGE","xmlrpc:192.168.3.132:8080:ccurbiz.xmlrpc.OpenSIPSInterface.msgtests");

subscribe_event("E_SIP_MESSAGE","xmlrpc:192.168.3.132:8080/ccurbiz/xmlrpc:OpenSIPSInterface.msgtests"); 	-> this is the most similar to other xmlrpc clients I've tested.

Best regards!
Juls


-----Original Message-----
From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Razvan Crainea
Sent: Thursday, January 07, 2016 4:34 AM
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] external app listening to OpenSIPS/SIP events

Hi, Julian!

First of all, is the event reaching the xmlrpc server? If not sure, try to make a tcpdump to capture the communication.
If it does reach the server, what are the errors you are seeing in the Tomcat server?

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 01/07/2016 12:32 AM, Julian Kay wrote:
> THANKS!!
>
> _raising the event in the script got rid of the error._
>
> But OpenSIPS is not calling the method I'm testing on a Tomcat XMLRPC 
> serverlet. This is my actual event subscription code I'm using:
>
> subscribe_event("E_SIP_MESSAGE","xmlrpc:192.168.3.132:8080:ccurbiz.xml
> rpc.OpenSIPSInterface.msgtests");
>
> I've tried several (many) syntax variations.
>
> On the Tomcat server it always points to the root RPC2 and returns the 
> error code 404.
>
> ccurbiz -> is my  java project name
>
> xmlrpc -> is the servelet mapping to the Java class OpenSIPSInterface
>
> msgtest -> is the method I'm trying to call
>
> I wanted to make sure the xmlrpc server was working, I'm able to 
> successfully call the method with xmlrpc-test-tool
>
> Any suggestion to be able to make this work with Tomcat server are 
> greatly appreciated!!
>
> Thanks!
>
> Juls
>
> *From:*users-bounces at lists.opensips.org
> [mailto:users-bounces at lists.opensips.org] *On Behalf Of *Razvan 
> Crainea
> *Sent:* Wednesday, December 30, 2015 10:40 AM
> *To:* users at lists.opensips.org
> *Subject:* Re: [OpenSIPS-Users] external app listening to OpenSIPS/SIP 
> events
>
> Hi, Julian!
>
> Make sure you are raising that event from your script (i.e.
> raise_event("E_SIP_MESSAGE")).
>
> http://www.opensips.org/Documentation/Tutorials-EventInterface#toc9
>
> Best regards,
> Răzvan
>
> On 12/24/2015 03:39 AM, Julian Kay wrote:
>
>     Thanks for the input, but for now I need to work with XMLRPC.
>
>     is it possible to create a custom event? I've been trying to use in
>     the startup_route: subscribe_event("E_SIP_MESSAGE",
>     "xmlrpc:http://192.168.3.201:8888/msgtests")
>
>     I get the error: ERROR: core:evi_event_subscribe: invalid event name
>     <E_SIP_MESSAGE>
>
>     Any help much appreciated, thx!!!
>
>     Juls
>
>     *From:*users-bounces at lists.opensips.org
>     <mailto:users-bounces at lists.opensips.org>
>     [mailto:users-bounces at lists.opensips.org] *On Behalf Of *Tito Cumpen
>     *Sent:* Wednesday, December 16, 2015 6:19 PM
>     *To:* OpenSIPS users mailling list
>     *Subject:* Re: [OpenSIPS-Users] external app listening to
>     OpenSIPS/SIP events
>
>     Julian,
>
>     Look into using
>     http://www.opensips.org/html/docs/modules/devel/event_rabbitmq This
>     module allows you to spin up an event based at any moment in the
>     script and pass variables in the process(Meaning it is a
>     publisher.). Your app can subscribe as reader of the queue and do
>     whatever task needs to be done. You can go as far as using this CDR
>     as well.
>
>     Goodluck,
>
>     Tito
>
>     On Wed, Dec 16, 2015 at 6:14 PM, Julian Kay <juliank at vazycomm.com
>     <mailto:juliank at vazycomm.com>> wrote:
>
>     Hi;
>
>     I'm looking for some guidance or confirmation that I'm on the right
>     path. If I want an external app to be able to listen to SIP events
>     like SIP event 180 (ringing), is registering a custom event with
>     OpenSIPS MI and then use "raise_event" to fire a custom event a good
>     way to get my external app to listen to OpenSIPS events?
>
>     Thanks!!
>
>     Juls
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
>     _______________________________________________
>
>     Users mailing list
>
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
>
> Răzvan Crainea
>
> OpenSIPS Core Developer
>
> http://www.opensips-solutions.com
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list