Почему то не могу сделать вызов на определенный номер. Что не так написал в диалплане?
1,GotoIf($["${CALLERID(num)}" = "мой_номер_сотового"]?4)
2,BUSY()
3,Hangup()
4,Dial(SIP/номер_телефона_куда_делаю_вызов@sip.zadarma.com,60,rT)
5,Hangup()
Jul 27 10:12:33 asterisk[1348]: NOTICE[1389]: chansip.c:19377 in handleresponse_invite: Failed to authenticate on INVITE to '"79012688004" ;tag=as2d6d3003'
Jul 27 10:12:33 asterisk[1348]: NOTICE[1389]: chansip.c:19377 in handleresponse_invite: Failed to authenticate on INVITE to '"79012688004" ;tag=as07c790a0'
Так это не правильно? то что ты пишешь - это регистрация
SIP/TRUNK_NAME/NUMBER
проверь
dig zadarma.com
И кинь сюда конфиг пира задарма
У меня всё работает как ты хочешь
username=2708х
type=friend
secret=ххх
nat=yes
insecure=invite,port
host=sip.zadarma.com
fromuser=2708х
context=from-pstn
canreinvite=no
dtmfmode=rfc2833
Посмотри имя трунка sip show peers
и делай вызов не SIP/номертелефонакудаделаювызов@sip.zadarma.com
а SIP/номер@трунк-как-в аскозии
пример SIP-PROVIDER-1045016844d9
Failed to authenticate on INVITE to '"79012688004"
По моему проблема в юзере, и добавь там в доп. настр. insecure=invite
Если делать вызов не через приложение а простым набором номера с софтофона то вызов отлично проходит.
На сколько я понимаю всему мешает NAT? https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions Что то еще можно предпринять?
4,Dial(SIP/Zadarma/номер_телефона_куда_делаю_вызов,60,rT)
Jul 27 10:23:48 asterisk[1358]: ERROR[1608]: netsock2.c:245 in astsockaddrresolve: getaddrinfo("Zadarma", "(null)", ...): Name or service not known
Jul 27 10:23:48 asterisk[1358]: WARNING[1608]: chansip.c:5202 in createaddr: No such host: Zadarma
Jul 27 10:23:48 asterisk[1358]: WARNING[1608]: acl.c:708 in ast_ouraddrfor: Cannot connect
Jul 27 10:23:48 asterisk[1358]: WARNING[1608]: chansip.c:3259 in _sipxmit: sipxmit of 0x850dbb8 (len 911) to (null) returned -1: Invalid argument
Jul 27 10:23:49 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850dbb8 (len 911) to (null) returned -1: Invalid argument
Jul 27 10:23:50 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850dbb8 (len 911) to (null) returned -1: Invalid argument
Jul 27 10:23:52 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850dbb8 (len 911) to (null) returned -1: Invalid argument
Jul 27 10:23:56 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850dbb8 (len 911) to (null) returned -1: Invalid argument
Jul 27 10:24:04 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850dbb8 (len 911) to (null) returned -1: Invalid argument
Jul 27 10:24:20 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850dbb8 (len 911) to (null) returned -1: Invalid argument
Jul 27 10:24:20 asterisk[1358]: WARNING[1389]: chansip.c:3530 in retranspkt: Retransmission timeout reached on transmission 3f6b0c4b6c07ef50382e002970d7a4c3@192.168.0.1:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/dis
Jul 27 10:24:20 asterisk[1358]: WARNING[1389]: chansip.c:3559 in retranspkt: Hanging up call 3f6b0c4b6c07ef50382e002970d7a4c3@192.168.0.1:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
Jul 27 10:24:20 asterisk[1358]: ERROR[1608]: netsock2.c:245 in astsockaddrresolve: getaddrinfo("Zadarma", "(null)", ...): Name or service not known
Jul 27 10:24:20 asterisk[1358]: WARNING[1608]: chansip.c:5202 in createaddr: No such host: Zadarma
Jul 27 10:24:20 asterisk[1358]: WARNING[1608]: acl.c:708 in ast_ouraddrfor: Cannot connect
Jul 27 10:24:20 asterisk[1358]: WARNING[1608]: chansip.c:3259 in _sipxmit: sipxmit of 0x850ce18 (len 913) to (null) returned -1: Invalid argument
Jul 27 10:24:21 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850ce18 (len 913) to (null) returned -1: Invalid argument
Jul 27 10:24:22 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850ce18 (len 913) to (null) returned -1: Invalid argument
Jul 27 10:24:24 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850ce18 (len 913) to (null) returned -1: Invalid argument
Jul 27 10:24:28 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850ce18 (len 913) to (null) returned -1: Invalid argument
Jul 27 10:24:36 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x850ce18 (len 913) to (null) returned -1: Invalid argument
4,Dial(SIP/SIP-PROVIDER-12285395574e2/79026343625,60,rT)
Jul 27 12:12:32 asterisk[1358]: ERROR[3612]: netsock2.c:245 in astsockaddrresolve: getaddrinfo("SIP-PROVIDER-12285395574e2", "(null)", ...): Name or service not known
Jul 27 12:12:32 asterisk[1358]: WARNING[3612]: chansip.c:5202 in createaddr: No such host: SIP-PROVIDER-12285395574e2
Jul 27 12:12:32 asterisk[1358]: WARNING[3612]: acl.c:708 in ast_ouraddrfor: Cannot connect
Jul 27 12:12:32 asterisk[1358]: WARNING[3612]: chansip.c:3259 in _sipxmit: sipxmit of 0x851a618 (len 949) to (null) returned -1: Invalid argument
Jul 27 12:12:33 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x851a618 (len 949) to (null) returned -1: Invalid argument
Jul 27 12:12:34 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x851a618 (len 949) to (null) returned -1: Invalid argument
Jul 27 12:12:36 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x851a618 (len 949) to (null) returned -1: Invalid argument
Jul 27 12:12:40 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x851a618 (len 949) to (null) returned -1: Invalid argument
Jul 27 12:12:48 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x851a618 (len 949) to (null) returned -1: Invalid argument
Jul 27 12:13:04 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x851a618 (len 949) to (null) returned -1: Invalid argument
Jul 27 12:13:04 asterisk[1358]: WARNING[1389]: chansip.c:3530 in retranspkt: Retransmission timeout reached on transmission 17074a3a5fe6afdd0f712a2b754015c3@192.168.0.1:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/dis
ul 27 12:13:04 asterisk[1358]: WARNING[1389]: chansip.c:3559 in retranspkt: Hanging up call 17074a3a5fe6afdd0f712a2b754015c3@192.168.0.1:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
Jul 27 12:13:04 asterisk[1358]: ERROR[3612]: netsock2.c:245 in astsockaddrresolve: getaddrinfo("SIP-PROVIDER-12285395574e2", "(null)", ...): Name or service not known
Jul 27 12:13:04 asterisk[1358]: WARNING[3612]: chansip.c:5202 in createaddr: No such host: SIP-PROVIDER-12285395574e2
Jul 27 12:13:04 asterisk[1358]: WARNING[3612]: acl.c:708 in ast_ouraddrfor: Cannot connect
Jul 27 12:13:04 asterisk[1358]: WARNING[3612]: chansip.c:3259 in _sipxmit: sipxmit of 0x8513108 (len 951) to (null) returned -1: Invalid argument
Jul 27 12:13:05 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x8513108 (len 951) to (null) returned -1: Invalid argument
Jul 27 12:13:06 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x8513108 (len 951) to (null) returned -1: Invalid argument
Jul 27 12:13:08 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x8513108 (len 951) to (null) returned -1: Invalid argument
Jul 27 12:13:12 asterisk[1358]: WARNING[1389]: chansip.c:3259 in _sipxmit: sipxmit of 0x8513108 (len 951) to (null) returned -1: Invalid argument
Проблема была в маршрутизаторе. Виноват NAT. Решил здесь. Большое всем спасибо за помощь.
Задан: 2011-07-27 09:58:55 +0400
Просмотрен: 2,125 раз
Обновлен: Aug 07 '11
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании
Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией
GNU GPL.