Skip to content

Commit

Permalink
use "receiver" instead of "recipient" in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Zengwen Yuan committed Oct 6, 2019
1 parent 582daaf commit f5cb6c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rcs-client-demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def add_arguments(self):
dest='receiver',
default="+19876543210",
# action='store_true',
help="Recipient number (in MSISDN format) for SIP conversation")
help="Receiver number (in MSISDN format) for SIP conversation")

self.parser.add_argument('--imei',
dest='imei',
Expand Down Expand Up @@ -260,8 +260,8 @@ def set_c_seq(self, c_seq, method):
def set_from(self, tag = uuid.uuid4()):
return "From: <tel:{username}>;tag={tag}\r\n".format(username = self._username, tag = tag)

def set_to(self, recipient):
return "To: <tel:{to}>\r\n".format(to = recipient)
def set_to(self, receiver):
return "To: <tel:{to}>\r\n".format(to = receiver)

def set_via(self, branch = secrets.token_urlsafe(10), options="keep;server-keep;rport"):
return "Via: SIP/{sip_ver}/{transport} {ip}:{port};branch={branch_prefix}{branch};{options}\r\n".format(
Expand Down Expand Up @@ -617,9 +617,9 @@ def args_handler(args):
try:
assert re.match(regex_msisdn, str(args.receiver)) is not None
except AssertionError as ae:
print("No recipient provided or illegal format in the recipient provided.")
print("No receiver provided or illegal format in the receiver provided.")
print("Using toy username instead.")
args.recipient = "+19876543210"
args.receiver = "+19876543210"

try:
# assert re.match(regex_imei, str(args.imei)) is not None
Expand Down

0 comments on commit f5cb6c2

Please sign in to comment.