static int ami_registrations_aor(void *obj, void *arg, int flags) { struct ast_sip_aor *aor = obj; struct ast_sip_ami *ami = arg; int *count = ami->arg; RAII_VAR(struct ast_str *, buf, ast_sip_create_ami_event("InboundRegistrationDetail", ami), ast_free); if (!buf) { return -1; } ast_sip_sorcery_object_to_ami(aor, &buf); ast_str_append(&buf, 0, "Contacts: "); ast_sip_for_each_contact(aor, sip_contact_to_str, &buf); ast_str_append(&buf, 0, "\r\n"); astman_append(ami->s, "%s\r\n", ast_str_buffer(buf)); (*count)++; return 0; }
static int sip_transport_to_ami(const struct ast_sip_transport *transport, struct ast_str **buf) { return ast_sip_sorcery_object_to_ami(transport, buf); }
static int sip_auth_to_ami(const struct ast_sip_auth *auth, struct ast_str **buf) { return ast_sip_sorcery_object_to_ami(auth, buf); }