在星号服务器中调用期间出错

时间:2013-09-16 11:57:31

标签: asterisk

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

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

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

1 个答案:

答案 0 :(得分: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 {