Hi Fabio,

> I'd like to know it there is a way for me to pass a variable number of
> tagged parameters for Sofia functions. For example, I have an array with an
> unknown number of strings that represent headers, and I'd like to call
> nua_invite() with a SIP_HEADER_STR() tag for each member of the array.
> As I don't think there are tags for loops, is there a way to do this?
> Thank you in advance.
>
>
You can try to create a list of tag items (tagi_t *list) using the functions
provided by sofia-sip API, and then when tags are requested in the
nua_invite(), pass
TAG_NEXT(list), just before the TAG_END(). That will tell the sofia-sip
function to include all the tags available in that tag-item list you
created. Not sure at NUA-level, but it works at NTA-level.

The only work needed here is to convert your own array to the (tagi_t *)
list.

http://sofia-sip.sourceforge.net/refdocs/su/su__tag_8h.html

Cheers,
-Aleksander
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to