Hello, everybody!
I want to code SBC, using sofia-sip. Does has the project reference SBC (as,
for example opensipstack has OpenSBC)?
Or may be there is some guide? My first try is not successeful. I create two
nua_t objects, set them NUTAG_URL with ip`s from the different networks. When i
got message on the first nua, i try to use SIPTAG_SIP (<sip_t* obj>) to send it
through the other nua.
Something like that:
-----
/*NUA 1*/
snprintf (bind_url, sizeof(bind_url), "sip:%s:5060;maddr=%s;transport=udp,tcp",
IP1, IP1);
trace_info ("Bind SIP to %s\n", bind_url);
g_nua1 = nua_create (g_root, sip_callback, NULL, NUTAG_URL (bind_url), TAG_NULL
());
...
nua_set_params (g_nua1, NUTAG_AUTOANSWER (0), NUTAG_AUTOACK (0), NUTAG_AUTO302
(0),
NTATAG_PASS_100 (1), TAG_NULL ());
snprintf (bind_url, sizeof(bind_url),
"sip:%s:5060;maddr=%s;transport=udp,tcp", IP2, IP2);
trace_info ("Bind SIP to %s\n", bind_url);
g_nua2 = nua_create (g_root, sip_callback, NULL, NUTAG_URL (bind_url),
NUTAG_AUTOANSWER (0),
NUTAG_AUTOACK (0), NUTAG_AUTO302 (0), NTATAG_PASS_100 (1), TAG_NULL ());
....
nua_set_params (g_nua2, NUTAG_AUTOANSWER (0), NUTAG_AUTOACK (0), NUTAG_AUTO302
(0),
NTATAG_PASS_100 (1), TAG_NULL ());
static void
sip_callback (nua_event_t event, int status, char const *phrase, nua_t * nua,
void * ctx_root,
nua_handle_t * nh, void * ctx_handle, sip_t const *sip, tagi_t tags[])
{
...
nua_handle_t * nhn = nua_handle (g_nua2, NULL, TAG_NULL());
...
nua_invite (nhn, SIPTAG_SIP(sip),TAG_NULL());
}
-----
Send invite to the nua1 ip and try to resend it into nua2. Got the error on
nua_invite:
nua_stack.c:527: nua_signal: Assertion `b == bend' failed.
Look into the stack code - does msgopbjtag_dup for duplicate sip tag work wrong
or is there other reason for that assertion?
Thank you for answer.
--
Best regards,
Vladimir O. Luchko
Novosibirsk, Eltex
E-mail: vlad.l...@mail.ru
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel