Sun 18 Jan 2009 10:34:53 AM UTC, original submission:
Hi All,
the API seams only provide 10 digits as a call ID,
but if I need more longer, for example 32 digits, and which pattern xxxxxxx@IP_address,
I need ad some code in the file 'jrequest.c' as following.
under function
"osip_from_set_tag (request->from, osip_from_tag_new_random ());"
(line 423)
we add following caode after 438 line:
char tmp[33],randnum[10];
unsigned int number;
/* call-id is always the same for REGISTRATIONS */
i = osip_call_id_init (&callid);
if (i != 0)
goto brood_error_1;
cidrand = osip_call_id_new_random ();
/orger add for call id/
memset(tmp,0x00,sizeof(tmp));
strcat(tmp, cidrand);
strcat(tmp, "-");
number = osip_build_random_number ();
sprintf (randnum, "%u", number);
strcat(tmp, randnum);
strcat(tmp, "-");
number = osip_build_random_number ();
sprintf (randnum, "%u", number);
strcat(tmp, randnum);
strcpy(cidrand,tmp);
and remove following 3 line
cidrand = osip_call_id_new_random ();
strcat(tmp, cidrand);
osip_call_id_set_number (callid, tmp);
|