diff options
Diffstat (limited to 'src/sip/main.c')
-rw-r--r-- | src/sip/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sip/main.c b/src/sip/main.c index 8b470be..17ae8a9 100644 --- a/src/sip/main.c +++ b/src/sip/main.c @@ -329,11 +329,16 @@ int main(int argc, char *argv[]) goto error; } - if (!remote_peer) { + if (!remote_peer && !local_register) { PDEBUG(DSIP, DEBUG_ERROR, "You must specify remote SIP peer!\n"); goto error; } + if (!auth_user && local_auth) { + PDEBUG(DSIP, DEBUG_ERROR, "You must specify authentication parameters!\n"); + goto error; + } + if (!cc_argc || !!strncasecmp(cc_argv[0], "help", 4)) { sip_ep = sip_endpoint_create(user_agent, send_no_ringing_after_progress, receive_no_ringing_after_progress, name, local_user, local_peer, remote_user, remote_peer, asserted_id, local_register, remote_register, register_user, register_peer, local_auth, remote_auth, auth_user, auth_password, auth_realm, public_ip, stun_server, register_interval, options_interval, stun_interval, expires); if (!sip_ep) { |