summaryrefslogtreecommitdiff
path: root/pjsip-apps
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-08-15 20:26:34 +0000
committerBenny Prijono <bennylp@teluu.com>2006-08-15 20:26:34 +0000
commit540278de72f88da8853d86dc3b655fe9bb3013b5 (patch)
treeda69840039428b7daa2f1806d9d72eae13d51157 /pjsip-apps
parentab77e4d8b4ddc20d6018d67c739e3317e4746c49 (diff)
Support for PUBLISH (RFC 3903):
- API BREAK: pjsua_pres_create_uac() API CHANGED!! Added options in the function, to allow creating SUBSCRIBE without ";id=" parameter in the Event header. - the generic event publication in pjsip-simple/publish.[hc] - split PIDF and X-PIDF body generation and parsing into pjsip-simple/presence_body.c. - allow NULL in module parameter in pjsip_endpt_add_capability() - added "--publish" option in PJSUA. - by default, PJSUA-LIB will not add ";id=" parameter in Event header in the SUBSCRIBE request since lots of server and user agents don't support this correctly. - Set version to 0.5.7.6. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@685 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c
index 5692e7ca..1ed3fe8c 100644
--- a/pjsip-apps/src/pjsua/pjsua_app.c
+++ b/pjsip-apps/src/pjsua/pjsua_app.c
@@ -101,6 +101,7 @@ static void usage(void)
puts (" --realm=string Set realm");
puts (" --username=string Set authentication username");
puts (" --password=string Set authentication password");
+ puts (" --publish Send presence PUBLISH for this account");
puts (" --next-cred Add another credentials");
puts ("");
puts ("SIP Account Control:");
@@ -258,7 +259,7 @@ static pj_status_t parse_args(int argc, char *argv[],
enum { OPT_CONFIG_FILE, OPT_LOG_FILE, OPT_LOG_LEVEL, OPT_APP_LOG_LEVEL,
OPT_HELP, OPT_VERSION, OPT_NULL_AUDIO,
OPT_LOCAL_PORT, OPT_PROXY, OPT_OUTBOUND_PROXY, OPT_REGISTRAR,
- OPT_REG_TIMEOUT, OPT_ID, OPT_CONTACT,
+ OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT,
OPT_REALM, OPT_USERNAME, OPT_PASSWORD,
OPT_USE_STUN1, OPT_USE_STUN2,
OPT_ADD_BUDDY, OPT_OFFER_X_MS_MSG, OPT_NO_PRESENCE,
@@ -286,6 +287,7 @@ static pj_status_t parse_args(int argc, char *argv[],
{ "outbound", 1, 0, OPT_OUTBOUND_PROXY},
{ "registrar", 1, 0, OPT_REGISTRAR},
{ "reg-timeout",1, 0, OPT_REG_TIMEOUT},
+ { "publish", 0, 0, OPT_PUBLISH},
{ "id", 1, 0, OPT_ID},
{ "contact", 1, 0, OPT_CONTACT},
{ "realm", 1, 0, OPT_REALM},
@@ -479,6 +481,10 @@ static pj_status_t parse_args(int argc, char *argv[],
}
break;
+ case OPT_PUBLISH: /* publish */
+ cur_acc->publish_enabled = PJ_TRUE;
+ break;
+
case OPT_ID: /* id */
if (pjsua_verify_sip_url(pj_optarg) != 0) {
PJ_LOG(1,(THIS_FILE,