[sr-dev] Is it possible to send SIP message from within the custom module?

Cockhootec Yahrabee cockootec at gmail.com
Fri Apr 22 16:36:54 CEST 2016


I've find out that the desired function has been exported via API to other
modules here (I am using kamailio source from tag 4.3.5):

https://github.com/kamailio/kamailio/blob/4.3/modules/uac/api.h#L8


The function obviously didn't have any arguments so how should 'create' the
SIP message I want to send from my custom module? In the kamailio.cfg (see
previous email) there is need to create some pseudo-variable which this
function parses automatically but I am not sure how I can create such a
pseudo-variable in custom module and then pass it somehow to exported
function (
https://github.com/kamailio/kamailio/blob/4.3/modules/uac/uac_send.c#L758).

`_uac_req` which seems to be used in `uac_send` seems to be static and
inaccessible from another modules (
https://github.com/kamailio/kamailio/blob/4.3/modules/uac/uac_send.c#L75).


Any ideas?



On Sat, Apr 16, 2016 at 8:35 PM, Cockhootec Yahrabee <cockootec at gmail.com>
wrote:

> I have found out that the UAC module can be used to send SIP messages from
> within the kamailio config file.
>
>
> http://www.kamailio.org/docs/modules/4.3.x/modules/uac.html#uac.f.uac_req_send()
>
> I am wondering if it is possible to use these functions from within my
> custom module which I am developing? I am not sure how can I create pseudo
> variables within the module.
>
>
> Thanks a lot for any help.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160422/cc7b0d34/attachment.html>


More information about the sr-dev mailing list