/* Copy callerid, if there is any */
if (c->callerid) {
- p->calloptions.callerid = strdup(c->callerid);
- }
+ char *tmp = strchr(c->callerid, '"');
+ if (!tmp) {
+ p->calloptions.callerid = malloc(80); // evil
+ // sprintf(p->calloptions.callerid, "\"%s\"", c->callerid);
+ sprintf(p->calloptions.callerid, "\"\" <%s>", c->callerid);
+ } else {
+ p->calloptions.callerid = strdup(c->callerid);
+ }
+ }
res = h323_make_call(called_addr, &(p->cd), p->calloptions);