1

我们将配置我们的 restcomm 实例来处理短信。但我们想在开发过程中使用 sip 聊天消息测试此功能

是否可以从 sip 电话向特定的注册 sip 号码发送消息?

我们是否有另一种方式“发送”短信到 sip 号码而无需发送真正的短信?也许一些 resp api 可以帮助我们解决这个问题。

谢谢,

4

1 回答 1

1

您可以使用 Linphone 或其他 SIP 客户端从 RestComm 发送/接收 SMS。

从 RestComm 发送短信:

  • 在 RVD 中设计 SMS 应用程序并为其分配启用sms 的 DID
  • 在您的 SMS 应用程序中,在“To”部分,输入您要发送 SMS 的 SIP 地址(例如:sip:user@sip.linphone.org)
  • 在您的 SIP 客户端中注册
  • 在您的 sip 客户端中输入绑定到您的 SMS 应用程序的号码(SMS 应用程序必须使用启用 SMS 的 DID 才能发送/接收 SMS)
  • 拨打与您的申请相关的号码
  • user@sip.linphone.org 应该已经收到短信

在这里,您是 RestComm 文档页面上关于如何向 SIP 电话发送 SMS 的有用帖子http://docs.telestax.com/restcomm-send-sms-to-a-sip-phone/

如果您想从 SIP 客户端发送 SMS 到 RestComm 应用程序,您可以执行以下操作:

  • 在您的 SIP 客户端中注册
  • 输入在 Restcomm 中注册并与 SMS 应用关联的 SIP 号码
  • 右键点击应用号,选择发送短信
  • 输入您的信息并点击发送按钮

要检查是否已在管理 UI 中从 Restcomm 收到 SMS,请转到Logs -> Messages

以下是从 SIP 客户端(在本例中为 Linphone)接收到的消息的日志如下所示:

在此处输入图像描述

下面是使用 API 发送 SMS 的示例:

curl -X POST http://ACae6e420f425248d6a26948c17a9e2acf:MyPassword@192.168.1.3:8080/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/SMS/Messages -d "To=7777" -d "From=6666" -d "Body=This is a SMS Restcomm test"   

    <RestcommResponse>
    <SMSMessage>
    <Sid>SMde6b385aaba548b889a678a8357cea7f</Sid>
    <DateCreated>Thu, 6 Aug 2015 07:55:25 -0600</DateCreated>
    <DateUpdated>Thu, 6 Aug 2015 07:55:25 -0600</DateUpdated>
    <DateSent/>
    <AccountSid>ACae6e420f425248d6a26948c17a9e2acf</AccountSid>
    <From>6666</From>
    <To>7777</To>
    <Body>This is a SMS Restcomm test</Body>
    <Status>sending</Status>
    <Direction>outbound-api</Direction>
    <Price>0</Price>
    <PriceUnit>USD</PriceUnit>
    <ApiVersion>2012-04-24</ApiVersion>
    <Uri>/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/SMS/Messages/SMde6b385aaba548b889a678a8357cea7f</Uri>
  </SMSMessage>
</RestcommResponse>[user@localhost configuration]$

“收件人”必须是在 Restcomm 注册的号码,用于收听 SMS 应用程序

于 2015-08-10T12:39:44.913 回答