SPRINT(interface_error, "Error in %s (line %d): SIP not compiled in.\n", filename, line);
return(-1);
#else
- char *p;
+ char *p, *q;
if (!interface->sip) {
SPRINT(interface_error, "Error in %s (line %d): This is not a SIP interface.\n", filename, line);
SPRINT(interface_error, "Error in %s (line %d): Missing SIP password.\n", filename, line);
return(-1);
}
+ q = get_seperated(p);
SCPY(interface->sip_auth_user, value);
SCPY(interface->sip_auth_password, p);
+ if (q[0])
+ SCPY(interface->sip_auth_realm, q);
return(0);
#endif
{"register", &inter_register, "<user> <host> [options-interval]",
"Registers to given SIP registrar.\n"
"Optionally give SIP timer to send OPTIONS messages to keepalive REGISTER sessions."},
- {"authenticate", &inter_authenticate, "<user> <password>",
- "Defines SIP user and password for authentication."},
+ {"authenticate", &inter_authenticate, "<user> <password> [realm]",
+ "Defines SIP user and password for authentication.\n"
+ "If no remote IP was give, we are SIP gateway, so realm must be given also."},
{"options-interval", &options_interval, "<interval> | 0",
"Defines SIP timer to send OPTIONS messages to keepalive INVITE sessions."},
{"asserted-id", &options_asserted_id, "<caller-id>",