# HG changeset patch # User Mychaela Falconia # Date 1664490070 28800 # Node ID 5dc0190a624ea3ad770218ca9419ff2f97357280 # Parent c62d0f28da6f30ff3d32a7be08f8dd65d317657b sip-manual-out: add -r option for testing 100rel diff -r c62d0f28da6f -r 5dc0190a624e sip-manual-out/main.c --- a/sip-manual-out/main.c Thu Sep 29 14:13:43 2022 -0800 +++ b/sip-manual-out/main.c Thu Sep 29 14:21:10 2022 -0800 @@ -26,6 +26,7 @@ char from_uri[128], to_uri[128], call_id[128]; struct timeval cur_event_time; unsigned max_forwards = 70; +int declare_100rel_supp; send_invite_req() { @@ -44,6 +45,11 @@ rc = add_contact_header(&msg); if (rc < 0) goto msg_size_err; + if (declare_100rel_supp) { + rc = out_msg_add_header(&msg, "Supported", "100rel"); + if (rc < 0) + goto msg_size_err; + } rc = out_msg_add_header(&msg, "Content-Type", "application/sdp"); if (rc < 0) goto msg_size_err; @@ -69,7 +75,7 @@ int opt, rc; logfile = 0; - while ((opt = getopt(argc, argv, "l:m:")) != EOF) { + while ((opt = getopt(argc, argv, "l:m:r")) != EOF) { switch (opt) { case 'l': logfile = optarg; @@ -77,6 +83,9 @@ case 'm': max_forwards = atoi(optarg); continue; + case 'r': + declare_100rel_supp = 1; + continue; default: usage: fprintf(stderr,