Hello Joao,
As a general rule, speaking broadly and methodologically, Kamailio - as
a SIP proxy - is not a good vehicle for the initiation of calls, since
it cannot, itself, be a party to a dialog. Synthesising an INVITE using
uac_req_send() isn't going to work because there's no second party to
the dialog. Where will the replies to the INVITE go? Kamailio itself
cannot be a party.
There are, nevertheless, the ways to initiate a call from Kamailio using
the 'dialog' module. The most straightforward is probably the
'dlg_bridge' / 'dlg.bridge' (MI and RPC respectively) commands, which
can be called externally to Kamailio,
http://kamailio.org/docs/modules/4.3.x/modules/dialog.html#idp3756384
or internally from route script, via the dlg_bridge() command:
http://kamailio.org/docs/modules/4.3.x/modules/dialog.html#idp3698368
The general idea here is that an INVITE is initiated to one party and
then that party is REFER'd out to another party. REFER is a SIP method
that is commonly used for unattended transfers and call forwarding. You
can read more about it here:
https://www.ietf.org/rfc/rfc3515.txt
Of course, for it to work, party #1 has to support REFER.
-- Alex
--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web:
http://www.evaristesys.com/,
http://www.csrpswitch.com/