Changeset 2373 for pjproject/trunk
- Timestamp:
- Dec 10, 2008 4:54:16 PM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r2371 r2373 178 178 puts (" --id=url Set the URL of local ID (used in From header)"); 179 179 puts (" --contact=url Optionally override the Contact information"); 180 puts (" --contact-params=S Append the specified parameters S in Contact URI"); 180 181 puts (" --proxy=url Optional URL of proxy server to visit"); 181 182 puts (" May be specified multiple times"); … … 463 464 OPT_LOCAL_PORT, OPT_IP_ADDR, OPT_PROXY, OPT_OUTBOUND_PROXY, 464 465 OPT_REGISTRAR, OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT, 466 OPT_CONTACT_PARAMS, 465 467 OPT_100REL, OPT_USE_IMS, OPT_REALM, OPT_USERNAME, OPT_PASSWORD, 466 468 OPT_NAMESERVER, OPT_STUN_DOMAIN, OPT_STUN_SRV, … … 518 520 { "id", 1, 0, OPT_ID}, 519 521 { "contact", 1, 0, OPT_CONTACT}, 522 { "contact-params",1,0, OPT_CONTACT_PARAMS}, 520 523 { "auto-update-nat", 1, 0, OPT_AUTO_UPDATE_NAT}, 521 524 { "use-compact-form", 0, 0, OPT_USE_COMPACT_FORM}, … … 827 830 break; 828 831 832 case OPT_CONTACT_PARAMS: 833 cur_acc->contact_params = pj_str(pj_optarg); 834 break; 835 829 836 case OPT_AUTO_UPDATE_NAT: /* OPT_AUTO_UPDATE_NAT */ 830 837 cur_acc->allow_contact_rewrite = pj_strtoul(pj_cstr(&tmp, pj_optarg)); … … 1368 1375 (int)acc_cfg->force_contact.slen, 1369 1376 acc_cfg->force_contact.ptr); 1377 pj_strcat2(result, line); 1378 } 1379 1380 /* Contact parameters */ 1381 if (acc_cfg->contact_params.slen) { 1382 pj_ansi_sprintf(line, "--contact-params %.*s\n", 1383 (int)acc_cfg->contact_params.slen, 1384 acc_cfg->contact_params.ptr); 1370 1385 pj_strcat2(result, line); 1371 1386 } -
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r2371 r2373 2132 2132 2133 2133 /** 2134 * Additional URI parameters that will be appended in the Contact header 2135 * for this account. This will affect the Contact header in all SIP 2136 * messages sent on behalf of this account, including but not limited to 2137 * REGISTER, INVITE, and SUBCRIBE requests or responses. 2138 * 2139 * The parameters should be preceeded by semicolon, and all strings must 2140 * be properly escaped. Example: 2141 * ";my-param=X;another-param=Hi%20there" 2142 */ 2143 pj_str_t contact_params; 2144 2145 /** 2134 2146 * Specify whether support for reliable provisional response (100rel and 2135 2147 * PRACK) should be required for all sessions of this account. -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r2351 r2373 682 682 tmp = (char*) pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 683 683 len = pj_ansi_snprintf(tmp, PJSIP_MAX_URL_SIZE, 684 "<sip:%.*s%s%.*s:%d;transport=%s >",684 "<sip:%.*s%s%.*s:%d;transport=%s%.*s>", 685 685 (int)acc->user_part.slen, 686 686 acc->user_part.ptr, … … 689 689 via_addr->ptr, 690 690 rport, 691 tp->type_name); 691 tp->type_name, 692 (int)acc->cfg.contact_params.slen, 693 acc->cfg.contact_params.ptr); 692 694 if (len < 1) { 693 695 PJ_LOG(1,(THIS_FILE, "URI too long")); … … 1664 1666 contact->ptr = (char*)pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 1665 1667 contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE, 1666 "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s >",1668 "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s>", 1667 1669 (int)acc->display.slen, 1668 1670 acc->display.ptr, … … 1677 1679 endquote, 1678 1680 local_port, 1679 transport_param); 1681 transport_param, 1682 (int)acc->cfg.contact_params.slen, 1683 acc->cfg.contact_params.ptr); 1680 1684 1681 1685 return PJ_SUCCESS; … … 1814 1818 contact->ptr = (char*) pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 1815 1819 contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE, 1816 "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s >",1820 "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s>", 1817 1821 (int)acc->display.slen, 1818 1822 acc->display.ptr, … … 1827 1831 endquote, 1828 1832 local_port, 1829 transport_param); 1833 transport_param, 1834 (int)acc->cfg.contact_params.slen, 1835 acc->cfg.contact_params.ptr); 1830 1836 1831 1837 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.