Klaus Darilion wrote: > Benny Prijono wrote: >> P.J. Cast. wrote: >>> If you are using C++, you can simply do: >>> std::string mystring(pj_str.ptr, pjs_str.slen); >>> >>> If you are using C, you could write a simply little >>> function easily enough. Though, I'm not sure if pjsip >>> has a built in function. >> There are some actually: >> >> PJ_IDECL(pj_str_t*) pj_strdup_with_null(pj_pool_t *pool, >> pj_str_t *dst, >> const pj_str_t *src); > > What is *pool? Is it available when I use the pjsua API? Pool is pjlib's memory pool, it's the memory allocation strategy that is used by all libraries. See this for more info: http://www.pjsip.org/pjlib/docs/html/group__PJ__POOL__GROUP.htm I'm not at all surprised if you didn't know this, as pjsua API is presented without the need to use pool. But if you need it, you can have your own with pjsua_pool_create()/pj_pool_release(). -benny > klaus