[英]Simple python script to configure multiple numbers to a SIP Trunk
I have a huge port-in request at Twilio and need to assign 200+ numbers to our SIP trunk.我在 Twilio 有一个巨大的端口输入请求,需要为我们的 SIP 中继分配 200 多个号码。 The following (redacted) simple python script works for one number.以下(已编辑)简单的 python 脚本适用于一个号码。 Is there a simple way I can pipe in a.txt file with the 200 +1XXXXXXXXXX numbers and update the SIP trunk for each?有没有一种简单的方法可以在 a.txt 文件中使用 200 +1XXXXXXXXXX 号码 pipe 并为每个号码更新 SIP 中继?
account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
incoming_phone_number = client \
.incoming_phone_numbers('PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.update(
trunk_sid='TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
)
print(incoming_phone_number.friendly_name)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.