VIDEOCHAT  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

Asterisk FreePBX в связке с Sugar CRM

Новичком считается только что прочитавший «Астериск - будущее телефонии»
http://asterisk.ru/knowledgebase/books
и пытающийся сделать большее

Модераторы: april22, Zavr2008

Ответить
sazanof
Сообщения: 3
Зарегистрирован: 13 апр 2016, 18:11

Asterisk FreePBX в связке с Sugar CRM

Сообщение sazanof »

Доброе утро.
Итак, сборка астера, которую я установил:
Asterisk free pbx STABLE – 10.13.66
Release Date: 2016
FreePBX 13 • Linux 6.6 • Asterisk 13
Установлено в локальной сети за kerio control
IP 10.0.0.13

Есть провайдер Задарма с телефонным номером 8(495). Произвел настройку транка, как описвыается у них в инструкции.
Создал exten 1002 и 1001
Для проверки работоспособности транка установил x-lite, указал настройки для подключения
Пробую совершить звонок - работает. Звонил с 1001 на мобильный номер.

Теперь поставил дистриб Sugar crm 6.4
Установил коннектор и настроил по мануалу, найденном в интернете на хабре, кажется...
Проверил работоспособность - запустил asteriskLogger.php - все ок

Далее попытался из sugar crm из контактов совершить звонок и был огорчен, вылетел алерт со следующим содержимым
Asterisk Call Manager 2.8.0
Message: Auth accepted
Response: Success

Originate response: Responce: Error
Message: Originate failed

В логах Астера появляется следующее:
2016-04-14_12-16-30.jpg
manager.conf

Код: Выделить всё


[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
displayconnects=no ;only effects 1.6+


[admin]
secret = 123
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
writetimeout = 5000

[sugar]
secret = 123
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read=all
write=originate,system,call

sip.conf и extensions.conf - изменения не вносил
Почему не проходят звонки?
Судя по логам отклоняется хост который состоит только из чисел=)
Буду рад любой подсказке по моей проблеме. Спасибо.

ЗЫ: не знаю точно, быть может необходимо соответствующим образом настроить extentions.conf sip.conf, исходя из обычных мануалов на http://asterisk-pbx.ru, но я третий день изучаю статьи и все-таки решился написать сюда. Надеюсь и уповаю=)
sazanof
Сообщения: 3
Зарегистрирован: 13 апр 2016, 18:11

Re: Asterisk FreePBX в связке с Sugar CRM

Сообщение sazanof »

Прочитал, что Астер через PJSIP/#### сейчас работает. Исправил в настройках коннектора sugar crm
Dialout Channel - PJSIP/####
Dialpattern for inbound/outbound matching - ^(pjsip\/[1-9][0-9][0-9][0-9]?[0-9]?-|Local)
Ситуация в логах изменилась

Код: Выделить всё

[2016-04-14 14:37:39] ERROR[26143] res_pjsip.c: Could not create dialog to endpoint '1002' as URI '1002' is not valid
[2016-04-14 14:37:39] ERROR[26143] chan_pjsip.c: Failed to create outgoing session to endpoint '1002'
[2016-04-14 14:37:49] DEBUG[27434] manager.c: Running action 'Logoff'
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Allocating new SIP dialog for 4058ebd92fc2bcf53936f79145ecad9b@[::1] - REGISTER (No RTP)
[2016-04-14 14:37:51] DEBUG[4596] acl.c: For destination '185.45.152.174', our source address is '10.0.0.13'.
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Target address 185.45.152.174:5060 is not local, substituting externaddr
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Setting AST_TRANSPORT_UDP with address 10.0.0.13:5061
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Scheduled a registration timeout for sip.zadarma.com id #15
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Initializing initreq for method REGISTER - callid 4058ebd92fc2bcf53936f79145ecad9b@[::1]
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: REGISTER attempt 1 to 438969@sip.zadarma.com
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Trying to put 'REGISTER si' onto UDP socket destined for 185.45.152.174:5060
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Allocating new SIP dialog for 1b374dbb0af5291c0b06ae54411aa16b@[::1]:5061 - OPTIONS (No RTP)
[2016-04-14 14:37:51] DEBUG[4596] acl.c: For destination '185.45.152.174', our source address is '10.0.0.13'.
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Target address 185.45.152.174:5060 is not local, substituting externaddr
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Setting AST_TRANSPORT_UDP with address 10.0.0.13:5061
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: SIP call-id changed from '1b374dbb0af5291c0b06ae54411aa16b@[::1]:5061' to '1063bd8e6464937a6fccb9a34cc721f2@10.0.0.13:5061'
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Initializing initreq for method OPTIONS - callid 1063bd8e6464937a6fccb9a34cc721f2@10.0.0.13:5061
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Trying to put 'OPTIONS sip' onto UDP socket destined for 185.45.152.174:5060
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Stopping retransmission on '4058ebd92fc2bcf53936f79145ecad9b@[::1]' of Request 124: Match Found
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Registration successful
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Cancelling timeout 15
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Destroying SIP dialog 4058ebd92fc2bcf53936f79145ecad9b@[::1]
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Stopping retransmission on '1063bd8e6464937a6fccb9a34cc721f2@10.0.0.13:5061' of Request 102: Match Found
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Destroying SIP dialog 1063bd8e6464937a6fccb9a34cc721f2@10.0.0.13:5061
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Allocating new SIP dialog for 708cae9932d9b5644f6d2c2f5c4f7fe4@[::1]:5061 - OPTIONS (No RTP)
[2016-04-14 14:37:51] DEBUG[4596] acl.c: For destination '185.45.152.174', our source address is '10.0.0.13'.
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Target address 185.45.152.174:5060 is not local, substituting externaddr
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Setting AST_TRANSPORT_UDP with address 10.0.0.13:5061
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: SIP call-id changed from '708cae9932d9b5644f6d2c2f5c4f7fe4@[::1]:5061' to '75d343761bce18775daf269a6ab5b49a@10.0.0.13:5061'
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Initializing initreq for method OPTIONS - callid 75d343761bce18775daf269a6ab5b49a@10.0.0.13:5061
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Trying to put 'OPTIONS sip' onto UDP socket destined for 185.45.152.174:5060
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Stopping retransmission on '75d343761bce18775daf269a6ab5b49a@10.0.0.13:5061' of Request 102: Match Found
[2016-04-14 14:37:51] DEBUG[4596] chan_sip.c: Destroying SIP dialog 75d343761bce18775daf269a6ab5b49a@10.0.0.13:5061
[2016-04-14 14:37:57] DEBUG[4596] acl.c: For destination '185.45.152.174', our source address is '10.0.0.13'.
[2016-04-14 14:37:57] DEBUG[4596] chan_sip.c: Target address 185.45.152.174:5060 is not local, substituting externaddr
[2016-04-14 14:37:57] DEBUG[4596] chan_sip.c: Setting AST_TRANSPORT_UDP with address 10.0.0.13:5061
[2016-04-14 14:37:57] DEBUG[4596] chan_sip.c: Allocating new SIP dialog for 5b76b8f4-a5485bc3-5352653@185.45.152.174 - OPTIONS (No RTP)
[2016-04-14 14:37:57] DEBUG[4596] chan_sip.c: **** Received OPTIONS (3) - Command in SIP OPTIONS
[2016-04-14 14:37:57] DEBUG[4596] chan_sip.c: Trying to put 'SIP/2.0 200' onto UDP socket destined for 185.45.152.174:5060
[2016-04-14 14:37:59] DEBUG[4596] chan_sip.c: Auto destroying SIP dialog '5b76b8f4-fe875bc3-7152653@185.45.152.174'
[2016-04-14 14:37:59] DEBUG[4596] chan_sip.c: Destroying SIP dialog 5b76b8f4-fe875bc3-7152653@185.45.152.174
[2016-04-14 14:38:02] DEBUG[27454] manager.c: Running action 'Login'
[2016-04-14 14:38:02] DEBUG[27455] manager.c: Running action 'Login'
[2016-04-14 14:38:05] DEBUG[26143] config.c: extract int from [3] in [-2147483648, 2147483647] gives [3](0)
[2016-04-14 14:38:05] DEBUG[26143] config.c: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[2016-04-14 14:38:05] DEBUG[26143] config.c: extract int from [2] in [-2147483648, 2147483647] gives [2](0)
[2016-04-14 14:38:05] DEBUG[26143] res_pjsip.c: 0x7f2f80639f08: Wrapper created
[2016-04-14 14:38:05] DEBUG[26143] res_pjsip.c: 0x7f2f80639f08: Set timer to 3000 msec
[2016-04-14 14:38:05] DEBUG[26143] res_pjsip_multihomed.c: Re-wrote Contact URI host/port to 10.0.0.13:5060
[2016-04-14 14:38:05] VERBOSE[26143] res_pjsip_logger.c: <--- Transmitting SIP request (466 bytes) to UDP:172.26.215.81:54538 --->
OPTIONS sip:1001@172.26.215.81:54538;rinstance=822d814edce6e2f5 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.13:5060;rport;branch=z9hG4bKPjLZnGv5WmObNzYCumqN8yun8zfHDgHxIN
From: <sip:asterisk@10.0.0.13>;tag=A1oAPI1Fb64lnFtOy5D9ilnz3ND.LtrQ
To: <sip:1001@172.26.215.81;rinstance=822d814edce6e2f5>
Contact: <sip:asterisk@10.0.0.13:5060>
Call-ID: 5VGSehbdf9UwBZDMzybySCxGLfFohBLj
CSeq: 22365 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-13.0.101(13.7.2)
Content-Length: 0


[2016-04-14 14:38:05] VERBOSE[4506] res_pjsip_logger.c: <--- Received SIP response (582 bytes) from UDP:172.26.215.81:54538 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.13:5060;rport=5060;branch=z9hG4bKPjLZnGv5WmObNzYCumqN8yun8zfHDgHxIN
Contact: <sip:172.26.215.81:54538>
To: <sip:1001@172.26.215.81;rinstance=822d814edce6e2f5>;tag=89912c3f
From: <sip:asterisk@10.0.0.13>;tag=A1oAPI1Fb64lnFtOy5D9ilnz3ND.LtrQ
Call-ID: 5VGSehbdf9UwBZDMzybySCxGLfFohBLj
CSeq: 22365 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS
Supported: replaces
User-Agent: X-Lite release 4.9.3 stamp 79961
Allow-Events: talk, hold
Content-Length: 0


[2016-04-14 14:38:05] DEBUG[26143] res_pjsip.c: 0x7f2f80639f08: PJSIP tsx response received
[2016-04-14 14:38:05] DEBUG[26143] res_pjsip.c: 0x7f2f80639f08: Cancelling timer
[2016-04-14 14:38:05] DEBUG[26143] res_pjsip.c: 0x7f2f80639f08: Timer cancelled
[2016-04-14 14:38:05] DEBUG[26143] config.c: extract int from [3] in [-2147483648, 2147483647] gives [3](0)
[2016-04-14 14:38:05] DEBUG[26143] config.c: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[2016-04-14 14:38:05] DEBUG[26143] config.c: extract int from [2] in [-2147483648, 2147483647] gives [2](0)
[2016-04-14 14:38:05] DEBUG[26143] res_pjsip.c: 0x7f2f80639f08: Callbacks executed
[2016-04-14 14:38:05] DEBUG[26143] res_pjsip.c: 0x7f2f80639f08: wrapper destroyed
[2016-04-14 14:38:05] DEBUG[23232] res_pjsip/pjsip_configuration.c: Contact 1001/sip:1001@172.26.215.81:54538;rinstance=822d814edce6e2f5 status didn't change: Reachable, RTT: 13.737 msec
[2016-04-14 14:38:06] DEBUG[27471] manager.c: Running action 'Login'
[2016-04-14 14:38:07] DEBUG[27471] manager.c: Running action 'DPMALicenseStatus'
[2016-04-14 14:38:07] DEBUG[27479] manager.c: Running action 'Login'
[2016-04-14 14:38:07] DEBUG[27480] manager.c: Running action 'Login'
[2016-04-14 14:38:08] DEBUG[27480] manager.c: Running action 'DPMALicenseStatus'
'
Понимаю, что URI должен иметь формат 1001@10.0.0.13, но я прописал его в pjsip.aor_custom.conf ничего не поменялось?В какой конфигурационный файл необходимо внести изменения?
Вложения
2016-04-14_14-13-10.jpg
2016-04-14_14-13-10.jpg (8 КБ) 6434 просмотра
ded
Сообщения: 15688
Зарегистрирован: 26 авг 2010, 19:00

Re: Asterisk FreePBX в связке с Sugar CRM

Сообщение ded »

sazanof писал(а):третий день изучаю статьи и все-таки решился написать сюда.
соглашение при регистрации:
Если Вы регистрируетесь тут, чтобы первым делом написать

"Я в Астериске - нуб", или

"Я новичок, уже третий день бьюсь, не пинайте сильно!"

то воздержитесь от регистрации либо размещайте Ваше сообщение

только в разделе "Бизнес".
sazanof
Сообщения: 3
Зарегистрирован: 13 апр 2016, 18:11

Re: Asterisk FreePBX в связке с Sugar CRM

Сообщение sazanof »

:D
awsswa
Сообщения: 2390
Зарегистрирован: 09 июн 2012, 10:52
Откуда: Россия, Пермь skype: yarick_perm

Re: Asterisk FreePBX в связке с Sugar CRM

Сообщение awsswa »

Судя по этому - логин и пароль верный
Asterisk Call Manager 2.8.0
Message: Auth accepted
Response: Success


Судя по этому - звонок хотел - но не смог
Originate response: Responce: Error
Message: Originate failed

Ответ в логах
платный суппорт по мере возможностей
Ответить
© 2008 — 2025 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH