Hi, Bobby!
I'm glad you're interested in enhancing OpenSIPS with extra features for
the Event Interface, and I am eager to help you with this.
The pvar interface in OpenSIPS is quite simple. Each variable consists
of a spec and a value, which can be string or integer. Reading or
writing a variable can be easily done using the generic pseudo-variable
interface. I think the best way to start this is to watch the devel
tutorial we prepared for the PVAR interface[1].
[1] http://www.opensips.org/Documentation/Tutorials-DevelSession04
PS: probably this discussion should be continued on the devel list.
Best regards,
Razvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
On 05/24/2013 08:21 AM, Bobby Smith wrote:
Greetings list,
I'd like to be able to use a pvar in the subscribe function for the
event interface like so:
subscribe("$avp(event_name)", "$avp(rabbit_url)")
Where event_name would be like E_CUSTOM_SUBSCRIBE and url would be
"rabbitmq:localhost/$fU"
I know this is not supported yet and I'd be interested in implementing
it, but understanding how pvars work is kinda tough without
documentation. Also, it seems like you have to have a sip_msg in
context for the function to translate a pvar into it's data type, but in
the event interface it's not passed in.
Any thoughts? I'd prefer not to use an infinite case statement: my use
case is having a 1.9.x route block with param() calls that pass in the
event name and the pvar for the queue name to subscribe to.
Thanks list!
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users