summaryrefslogtreecommitdiffstats
path: root/src/sip/main.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2021-03-21 13:33:01 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2021-03-21 13:33:01 +0100
commit91fd188a92e55d5463b6e7ece3a9910fc3c5d7f5 (patch)
tree16e1fcea8b867606b2536e00d0ccd4fb85215368 /src/sip/main.c
parentada147349f673e5459cc80696c9c071a7aa08b27 (diff)
Fixed incoming (remote-to-local) registration procedure
Diffstat (limited to 'src/sip/main.c')
-rw-r--r--src/sip/main.c7
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) {