【问题标题】:Error raised during calls in asterisk server在星号服务器中调用期间引发的错误
【发布时间】:2013-09-16 20:09:46
【问题描述】:

今天我的星号暂时无法接听电话。当我检查星号日志时,在此期间出现以下错误。

Purely numeric hostname (1002), and not a peer--rejecting!

重新启动星号后,问题解决了。 有什么问题?

【问题讨论】:

标签: asterisk


【解决方案1】:

这很可能意味着您的 dns 服务器无法正常工作。使用本地 dns 缓存服务器或多个 dns 服务器。

其他可能的情况 - 你调用了像 SIP/1234 这样的东西,它不在你的 sip.conf 中。

这里是相关的源码部分,有说明:

peer = sip_find_peer(peername, NULL, TRUE, FINDPEERS, FALSE, 0);

    if (peer) {
            int res;
            if (newdialog) {
                    set_socket_transport(&dialog->socket, 0);
            }
            res = create_addr_from_peer(dialog, peer);
            dialog->relatedpeer = sip_ref_peer(peer, "create_addr: setting dialog's relatedpeer pointer");
            sip_unref_peer(peer, "create_addr: unref peer from sip_find_peer hashtab lookup");
            return res;
    } else if (ast_check_digits(peername)) {
            /* Although an IPv4 hostname *could* be represented as a 32-bit integer, it is uncommon and
             * it makes dialing SIP/${EXTEN} for a peer that isn't defined resolve to an IP that is
             * almost certainly not intended. It is much better to just reject purely numeric hostnames */
            ast_log(LOG_WARNING, "Purely numeric hostname (%s), and not a peer--rejecting!\n", peername);
            return -1;
    } else {

【讨论】:

  • 我的 Dns 服务器是 Microsoft Dns 服务器。那么为什么当我重新启动星号时问题解决了?
  • 是否也与此错误有关-->无法创建“SIP”类型的通道(原因 20 - 未知)
  • 我怎么知道?也许你使用实时并且没有连接到数据库或类似的东西。我只是可以签入代码并为您提供最可能的变体。下次遇到这种情况,需要在重启前检查一下。
猜你喜欢
  • 2015-12-03
  • 2012-10-03
  • 2016-02-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多