diff --git a/doc/Readme.registrar_client b/doc/Readme.registrar_client new file mode 100644 index 00000000..928605d9 --- /dev/null +++ b/doc/Readme.registrar_client @@ -0,0 +1,66 @@ +Readme for registrar_client component + +This component registers on behalf of some application at a +SIP registrar. Registrations are refreshed until they are +explicitely removed via "removeRegistration". + +It is invoked via DI API. + +API functions: +============= + +createRegistration +------------------ +args: + CStr domain : domain for te registration + CStr user : user """ + CStr name : display name """ + CStr auth_user : authentication user """ + CStr pwd : password + CStr sess_link : local tag of session or name of factory that receives + events about the status of the registration + +returns: CStr handle : used to remove the registration or correlate events + +removeRegistration +------------------ +args: CStr handle +returns: - + +Events: +====== +SIPRegistrationEvent as in ampi/SIPRegistrarClientAPI.h + + +example code +============ + string domain, user, display_name, auth_user, passwd, sess_link; + string handle; +// assign some values + ... + +// + AmDynInvokeFactory* di_f = AmPlugIn::instance()-> + getFactory4Di("registrar_client"); + if (di_f == NULL) { + DBG("unable to get a registrar_client\n"); + } else { + AmDynInvoke* uac_auth_i = di_f->getInstance(); + if (uac_auth_i!=NULL) { + AmDynInvokeFactory* di_f = AmPlugIn::instance()-> + getFactory4Di("registrar_client"); + + AmArgArray di_args,ret; + di_args.push(domain.c_str()); + di_args.push(user.c_str()); + di_args.push(display_name.c_str()); // display name + di_args.push(auth_user.c_str()); // auth_user + di_args.push(passwd.c_str()); // pwd + di_args.push(sess_link.c_str()); // + + uac_auth_i->invoke("createRegistration", di_args, ret); + + handle = ret.get(0).asCStr(); + } + } +