[pjsip] Reading from Location table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Benny,
thanks a lot for your last hints, it works properly now!

I'm working on a call forwarding function, too. 
I'm reading the called uri (to which the msg should be forwarded) from a location table as a "pj_str_t" type field  (in the location table data are of varchar[255] type).

The problem is that I've to save it in a (pjsip_uri*) var to use it in the pjsip_endpt_create_request_fwd() to make the call forwarding properly.

How can I transform a pj_str_t* variable into a pjsip_uri* one???

I've tried this, using a pjsip_sip_uri one:

pj_str_t *appo;
pjsip_sip_uri *url;
		
appo = lookup_location(rdata); 		//this is the function that returns the string from the location database; 

url = pjsip_sip_uri_create(app.pool, 0);
pj_memcpy(&url, &appo->ptr, sizeof(url));
status = pjsip_endpt_create_request_fwd(app.sip_endpt, rdata, (pjsip_uri*)url, NULL, 0, &tdata);


But it doesn't work, it goes in segmentation fault  in pjsip_uri_clone() function.


Thanks in advance,
cheers
Giusy








[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux