Страница 1 из 1

FreeSWITCH+Skype+Asterisk (Elastix v.4)

Добавлено: 15 авг 2016, 23:20
logdog
Добрый вечер!

Asterisk 11.21.0
FreeSWITCH 1.7.0
Skype 4.3.0.37-2

Прощу помощи, не могу настроить входящие через Skype -> FreeSWITCH на * .... исходящие работают нормально.

vars.xml

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

  <X-PRE-PROCESS cmd="set" data="domain=$${local_ip_v4}"/>
  <X-PRE-PROCESS cmd="set" data="domain_name=$${domain}"/>
  <X-PRE-PROCESS cmd="set" data="hold_music=local_stream://moh"/>
  <X-PRE-PROCESS cmd="set" data="use_profile=external"/>
  <!--
      Enable ZRTP globally you can override this on a per channel basis
  <X-PRE-PROCESS cmd="set" data="rtp_sdes_suites=AEAD_AES_256_GCM_8|AEAD_AES_128_GCM_8|AES_CM_256_HMAC_SHA1_80|AES_CM_192_HMAC_SHA1_80|AES_CM_128_HMAC_SHA1_$

      http://wiki.freeswitch.org/wiki/ZRTP (on how to enable zrtp)
  -->
  <X-PRE-PROCESS cmd="set" data="zrtp_secure_media=false"/>
  <X-PRE-PROCESS cmd="set" data="global_codec_prefs=G729,G722,OPUS,G711,PCMU,PCMA,VP8"/>
  <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G729,G722,OPUS,G711,PCMU,PCMA,VP8"/>
  <X-PRE-PROCESS cmd="set" data="codec_prefs=G711,PCMU,PCMA"/>

mod_skypopen

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

<configuration name="skypopen.conf" description="Skypopen Configuration">
  <global_settings>
    <param name="dialplan" value="XML"/>
    <param name="context" value="default"/>
    <param name="codec-prefs" value="alaw,ulaw"/>
    <param name="codec-rates" value="8000,16000"/>
    <param name="report_incoming_chatmessages" value="true"/>
    <param name="silent_mode" value="false"/>
    <param name="write_silence_when_idle" value="true"/>
    <param name="setsockopt" value="true"/>
  </global_settings>
  <!-- one entry here per each skypopen interface -->
  <per_interface_settings>
    <interface id="1" name="interface1">
    <param name="X11-display" value=":101"/>
    <param name="skype_user" value="alina-aud"/>
    <param name="destination" value="8889"/>
    </interface>
  </per_interface_settings>
</configuration>
/usr/local/freeswitch/conf/dialplan/default.xml

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

<extension name="skype_incoming">
    <condition field="destination_number" expression="^8889$">
    <action application="set" data="hangup_after_bridge=true"/>
    <action application="set" data="disable-transcoding=true"/>
    <action application="set" data="codec-prefs=PCMA,PCMU"/>
    <action application="set" data="effective_caller_id_name=${caller_id_name} (${caller_id_number})"/>
    <action application="set" data="effective_caller_id_number=${caller_id_number}"/>
    <action application="bridge" data="sofia/gateway/asterisk/104"/>
    <action application="hangup"/>
    </condition>
</extension>
/usr/local/freeswitch/conf/sip_profiles/external/asterisk.xml

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

<include>
    <gateway name="asterisk">
    <param name="username" value="freeswitch"/>
    <param name="realm" value="10.0.0.251"/>
    <param name="password" value="пароль"/>
    <param name="register" value="false"/>
    </gateway>
</include>
На сервере с Asterisk - транк
[freeswitch]
type=peer
host=10.0.0.251
username=freeswitch
port=5080
fromdomain=10.0.0.251
secret=пароль
qualify=yes
trustrpid=yes
sendrpid=yes
dtmfmode=inband
disallow=all
allow=alaw&ulaw

[8889]
context=from-internal
dtmfmode=inband

[104] - обычный внутренний SIP номер телефона cisco

Дебаг с FreeSWITCH

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

2016-08-15 22:55:03.667001 [NOTICE] switch_channel.c:1104 New Channel skypopen/interface1 [28422bc0-6322-11e6-bdc8-ad436ab46f73]
2016-08-15 22:55:03.667001 [INFO] mod_dialplan_xml.c:637 Processing Иван Валерьевич <ivan_valeryevich>->8889 in context default
2016-08-15 22:55:03.687005 [NOTICE] switch_channel.c:1104 New Channel sofia/external/104 [2842aec4-6322-11e6-bdd3-ad436ab46f73]
send 1123 bytes to udp/[10.0.0.251]:5060 at 22:55:03.688798:
   ------------------------------------------------------------------------
   INVITE sip:104@10.0.0.251 SIP/2.0
   Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK451mZ2Kt2BZpg
   Max-Forwards: 70
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=3gFa3KZ0UDgHD
   To: <sip:104@10.0.0.251>
   Call-ID: ffa11ac2-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309387 INVITE
   Contact: <sip:gw+asterisk@10.0.0.251:5080;transport=udp;gw=asterisk>
   User-Agent: FreeSWITCH-mod_sofia/1.7.0+git~20160806T164921Z~1e7b4a1301~64bit
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
   Supported: timer, path, replaces
   Allow-Events: talk, hold, conference, refer
   Content-Type: application/sdp
   Content-Disposition: session
   Content-Length: 221
   X-FS-Support: update_display,send_info
   Remote-Party-ID: "Иван Валерьевич (ivan_valeryevich)" <sip:ivan_valeryevich@10.0.0.251>;party=calling;screen=yes;privacy=off

   v=0
   o=FreeSWITCH 1471258997 1471258998 IN IP4 10.0.0.251
   s=FreeSWITCH
   c=IN IP4 10.0.0.251
   t=0 0
   m=audio 31906 RTP/AVP 102 101
   a=rtpmap:102 L16/16000
   a=rtpmap:101 telephone-event/16000
   a=fmtp:101 0-16
   a=ptime:20
   ------------------------------------------------------------------------
recv 586 bytes from udp/[10.0.0.251]:5060 at 22:55:03.689672:
   ------------------------------------------------------------------------
   SIP/2.0 401 Unauthorized
   Via: SIP/2.0/UDP 10.0.0.251:5080;branch=z9hG4bK451mZ2Kt2BZpg;received=10.0.0.251;rport=5080
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=3gFa3KZ0UDgHD
   To: <sip:104@10.0.0.251>;tag=as4e809f8f
   Call-ID: ffa11ac2-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309387 INVITE
   Server: Cisco-SIPGateway/IOS-12.x
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
   Supported: replaces, timer
   WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="0cb8b9b9"
   Content-Length: 0

   ------------------------------------------------------------------------
send 351 bytes to udp/[10.0.0.251]:5060 at 22:55:03.689811:
   ------------------------------------------------------------------------
   ACK sip:104@10.0.0.251 SIP/2.0
   Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK451mZ2Kt2BZpg
   Max-Forwards: 70
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=3gFa3KZ0UDgHD
   To: <sip:104@10.0.0.251>;tag=as4e809f8f
   Call-ID: ffa11ac2-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309387 ACK
   Content-Length: 0

   ------------------------------------------------------------------------
send 1290 bytes to udp/[10.0.0.251]:5060 at 22:55:03.690080:
   ------------------------------------------------------------------------
   INVITE sip:104@10.0.0.251 SIP/2.0
   Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK5eUD1X4XZmN9B
   Max-Forwards: 70
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=3gFa3KZ0UDgHD
   To: <sip:104@10.0.0.251>
   Call-ID: ffa11ac2-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309388 INVITE
   Contact: <sip:gw+asterisk@10.0.0.251:5080;transport=udp;gw=asterisk>
   User-Agent: FreeSWITCH-mod_sofia/1.7.0+git~20160806T164921Z~1e7b4a1301~64bit
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
   Supported: timer, path, replaces
   Allow-Events: talk, hold, conference, refer
   Authorization: Digest username="freeswitch", realm="asterisk", nonce="0cb8b9b9", algorithm=MD5, uri="sip:104@10.0.0.251", response="2002dd4bb25e7d70f226a8ac8bc4942e"
   Content-Type: application/sdp
   Content-Disposition: session
   Content-Length: 221
   X-FS-Support: update_display,send_info
   Remote-Party-ID: "Иван Валерьевич (ivan_valeryevich)" <sip:ivan_valeryevich@10.0.0.251>;party=calling;screen=yes;privacy=off

   v=0
   o=FreeSWITCH 1471258997 1471258998 IN IP4 10.0.0.251
   s=FreeSWITCH
   c=IN IP4 10.0.0.251
   t=0 0
   m=audio 31906 RTP/AVP 102 101
   a=rtpmap:102 L16/16000
   a=rtpmap:101 telephone-event/16000
   a=fmtp:101 0-16
   a=ptime:20
   ------------------------------------------------------------------------
recv 517 bytes from udp/[10.0.0.251]:5060 at 22:55:03.690965:
   ------------------------------------------------------------------------
   SIP/2.0 488 Not acceptable here
   Via: SIP/2.0/UDP 10.0.0.251:5080;branch=z9hG4bK5eUD1X4XZmN9B;received=10.0.0.251;rport=5080
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=3gFa3KZ0UDgHD
   To: <sip:104@10.0.0.251>;tag=as4e809f8f
   Call-ID: ffa11ac2-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309388 INVITE
   Server: Cisco-SIPGateway/IOS-12.x
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
   Supported: replaces, timer
   Content-Length: 0

   ------------------------------------------------------------------------
send 351 bytes to udp/[10.0.0.251]:5060 at 22:55:03.691094:
   ------------------------------------------------------------------------
   ACK sip:104@10.0.0.251 SIP/2.0
   Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK5eUD1X4XZmN9B
   Max-Forwards: 70
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=3gFa3KZ0UDgHD
   To: <sip:104@10.0.0.251>;tag=as4e809f8f
   Call-ID: ffa11ac2-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309388 ACK
   Content-Length: 0

   ------------------------------------------------------------------------
2016-08-15 22:55:03.687005 [NOTICE] sofia.c:8023 Hangup sofia/external/104 [CS_CONSUME_MEDIA] [INCOMPATIBLE_DESTINATION]
2016-08-15 22:55:03.687005 [NOTICE] mod_skypopen.c:2779 Ring-Ready skypopen/interface1!
2016-08-15 22:55:03.707002 [NOTICE] switch_ivr.c:789 Ring Ready skypopen/interface1!
2016-08-15 22:55:03.707002 [NOTICE] switch_core_session.c:1665 Session 8 (sofia/external/104) Ended
2016-08-15 22:55:03.707002 [NOTICE] switch_core_session.c:1669 Close Channel sofia/external/104 [CS_DESTROY]
2016-08-15 22:55:03.707002 [INFO] mod_dptools.c:3401 Originate Failed.  Cause: INCOMPATIBLE_DESTINATION
2016-08-15 22:55:03.707002 [NOTICE] switch_channel.c:4820 Hangup skypopen/interface1 [CS_EXECUTE] [INCOMPATIBLE_DESTINATION]
2016-08-15 22:55:03.707002 [NOTICE] switch_core_session.c:1665 Session 7 (skypopen/interface1) Ended
2016-08-15 22:55:03.707002 [NOTICE] switch_core_session.c:1669 Close Channel skypopen/interface1 [CS_DESTROY]
2016-08-15 22:55:03.827009 [NOTICE] switch_channel.c:1104 New Channel skypopen/interface1 [28584bbc-6322-11e6-bdd7-ad436ab46f73]
2016-08-15 22:55:03.827009 [INFO] mod_dialplan_xml.c:637 Processing Иван Валерьевич <ivan_valeryevich>->8889 in context default
2016-08-15 22:55:03.827009 [NOTICE] switch_channel.c:1104 New Channel sofia/external/104 [2858a922-6322-11e6-bde2-ad436ab46f73]
send 1123 bytes to udp/[10.0.0.251]:5060 at 22:55:03.832486:
   ------------------------------------------------------------------------
   INVITE sip:104@10.0.0.251 SIP/2.0
   Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK6Qm62rN1vXBvQ
   Max-Forwards: 70
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=4S824eg4rp63r
   To: <sip:104@10.0.0.251>
   Call-ID: ffb708f6-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309387 INVITE
   Contact: <sip:gw+asterisk@10.0.0.251:5080;transport=udp;gw=asterisk>
   User-Agent: FreeSWITCH-mod_sofia/1.7.0+git~20160806T164921Z~1e7b4a1301~64bit
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
   Supported: timer, path, replaces
   Allow-Events: talk, hold, conference, refer
   Content-Type: application/sdp
   Content-Disposition: session
   Content-Length: 221
   X-FS-Support: update_display,send_info
   Remote-Party-ID: "Иван Валерьевич (ivan_valeryevich)" <sip:ivan_valeryevich@10.0.0.251>;party=calling;screen=yes;privacy=off

   v=0
   o=FreeSWITCH 1471260061 1471260062 IN IP4 10.0.0.251
   s=FreeSWITCH
   c=IN IP4 10.0.0.251
   t=0 0
   m=audio 30842 RTP/AVP 102 101
   a=rtpmap:102 L16/16000
   a=rtpmap:101 telephone-event/16000
   a=fmtp:101 0-16
   a=ptime:20
   ------------------------------------------------------------------------
recv 586 bytes from udp/[10.0.0.251]:5060 at 22:55:03.833063:
   ------------------------------------------------------------------------
   SIP/2.0 401 Unauthorized
   Via: SIP/2.0/UDP 10.0.0.251:5080;branch=z9hG4bK6Qm62rN1vXBvQ;received=10.0.0.251;rport=5080
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=4S824eg4rp63r
   To: <sip:104@10.0.0.251>;tag=as04928f53
   Call-ID: ffb708f6-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309387 INVITE
   Server: Cisco-SIPGateway/IOS-12.x
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
   Supported: replaces, timer
   WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="67a261d6"
   Content-Length: 0

   ------------------------------------------------------------------------
send 351 bytes to udp/[10.0.0.251]:5060 at 22:55:03.833157:
   ------------------------------------------------------------------------
   ACK sip:104@10.0.0.251 SIP/2.0
   Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK6Qm62rN1vXBvQ
   Max-Forwards: 70
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=4S824eg4rp63r
   To: <sip:104@10.0.0.251>;tag=as04928f53
   Call-ID: ffb708f6-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309387 ACK
   Content-Length: 0

   ------------------------------------------------------------------------
send 1290 bytes to udp/[10.0.0.251]:5060 at 22:55:03.833384:
   ------------------------------------------------------------------------
   INVITE sip:104@10.0.0.251 SIP/2.0
   Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK70DZ4K64S61eK
   Max-Forwards: 70
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=4S824eg4rp63r
   To: <sip:104@10.0.0.251>
   Call-ID: ffb708f6-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309388 INVITE
   Contact: <sip:gw+asterisk@10.0.0.251:5080;transport=udp;gw=asterisk>
   User-Agent: FreeSWITCH-mod_sofia/1.7.0+git~20160806T164921Z~1e7b4a1301~64bit
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
   Supported: timer, path, replaces
   Allow-Events: talk, hold, conference, refer
   Authorization: Digest username="freeswitch", realm="asterisk", nonce="67a261d6", algorithm=MD5, uri="sip:104@10.0.0.251", response="41e467a485f982d66cf364df3dc961a8"
   Content-Type: application/sdp
   Content-Disposition: session
   Content-Length: 221
   X-FS-Support: update_display,send_info
   Remote-Party-ID: "Иван Валерьевич (ivan_valeryevich)" <sip:ivan_valeryevich@10.0.0.251>;party=calling;screen=yes;privacy=off

   v=0
   o=FreeSWITCH 1471260061 1471260062 IN IP4 10.0.0.251
   s=FreeSWITCH
   c=IN IP4 10.0.0.251
   t=0 0
   m=audio 30842 RTP/AVP 102 101
   a=rtpmap:102 L16/16000
   a=rtpmap:101 telephone-event/16000
   a=fmtp:101 0-16
   a=ptime:20
   ------------------------------------------------------------------------
recv 517 bytes from udp/[10.0.0.251]:5060 at 22:55:03.834199:
   ------------------------------------------------------------------------
   SIP/2.0 488 Not acceptable here
   Via: SIP/2.0/UDP 10.0.0.251:5080;branch=z9hG4bK70DZ4K64S61eK;received=10.0.0.251;rport=5080
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=4S824eg4rp63r
   To: <sip:104@10.0.0.251>;tag=as04928f53
   Call-ID: ffb708f6-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309388 INVITE
   Server: Cisco-SIPGateway/IOS-12.x
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
   Supported: replaces, timer
   Content-Length: 0

   ------------------------------------------------------------------------
send 351 bytes to udp/[10.0.0.251]:5060 at 22:55:03.834294:
   ------------------------------------------------------------------------
   ACK sip:104@10.0.0.251 SIP/2.0
   Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK70DZ4K64S61eK
   Max-Forwards: 70
   From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=4S824eg4rp63r
   To: <sip:104@10.0.0.251>;tag=as04928f53
   Call-ID: ffb708f6-ddc4-1234-62af-408d5cc7b450
   CSeq: 95309388 ACK
   Content-Length: 0

   ------------------------------------------------------------------------
2016-08-15 22:55:03.827009 [NOTICE] sofia.c:8023 Hangup sofia/external/104 [CS_CONSUME_MEDIA] [INCOMPATIBLE_DESTINATION]
2016-08-15 22:55:03.827009 [NOTICE] mod_skypopen.c:2779 Ring-Ready skypopen/interface1!
2016-08-15 22:55:03.847019 [NOTICE] switch_ivr.c:789 Ring Ready skypopen/interface1!
2016-08-15 22:55:03.847019 [NOTICE] switch_core_session.c:1665 Session 10 (sofia/external/104) Ended
2016-08-15 22:55:03.847019 [NOTICE] switch_core_session.c:1669 Close Channel sofia/external/104 [CS_DESTROY]
2016-08-15 22:55:03.847019 [INFO] mod_dptools.c:3401 Originate Failed.  Cause: INCOMPATIBLE_DESTINATION
2016-08-15 22:55:03.847019 [NOTICE] switch_channel.c:4820 Hangup skypopen/interface1 [CS_EXECUTE] [INCOMPATIBLE_DESTINATION]
2016-08-15 22:55:03.847019 [NOTICE] switch_core_session.c:1665 Session 9 (skypopen/interface1) Ended
2016-08-15 22:55:03.847019 [NOTICE] switch_core_session.c:1669 Close Channel skypopen/interface1 [CS_DESTROY]

Дебаг с *

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

<--- SIP read from UDP:10.0.0.251:5080 --->
INVITE sip:104@10.0.0.251 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK896Q6eQ8pFr1e
Max-Forwards: 70
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=6BUm84HBK8j9F
To: <sip:104@10.0.0.251>
Call-ID: 1b3a2ec7-ddc5-1234-62af-408d5cc7b450
CSeq: 95309410 INVITE
Contact: <sip:gw+asterisk@10.0.0.251:5080;transport=udp;gw=asterisk>
User-Agent: FreeSWITCH-mod_sofia/1.7.0+git~20160806T164921Z~1e7b4a1301~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 221
X-FS-Support: update_display,send_info
Remote-Party-ID: "Иван Валерьевич (ivan_valeryevich)" <sip:ivan_valeryevich@10.0.0.251>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1471268839 1471268840 IN IP4 10.0.0.251
s=FreeSWITCH
c=IN IP4 10.0.0.251
t=0 0
m=audio 22110 RTP/AVP 102 101
a=rtpmap:102 L16/16000
a=rtpmap:101 telephone-event/16000
a=fmtp:101 0-16
a=ptime:20
<------------->
--- (17 headers 10 lines) ---
Sending to 10.0.0.251:5080 (NAT)
Sending to 10.0.0.251:5080 (NAT)
Using INVITE request as basis request - 1b3a2ec7-ddc5-1234-62af-408d5cc7b450
Found peer 'freeswitch' for 'freeswitch' from 10.0.0.251:5080

<--- Reliably Transmitting (NAT) to 10.0.0.251:5080 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.0.251:5080;branch=z9hG4bK896Q6eQ8pFr1e;received=10.0.0.251;rport=5080
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=6BUm84HBK8j9F
To: <sip:104@10.0.0.251>;tag=as7892a45b
Call-ID: 1b3a2ec7-ddc5-1234-62af-408d5cc7b450
CSeq: 95309410 INVITE
Server: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="7a0084b4"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '1b3a2ec7-ddc5-1234-62af-408d5cc7b450' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:10.0.0.251:5080 --->
ACK sip:104@10.0.0.251 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK896Q6eQ8pFr1e
Max-Forwards: 70
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=6BUm84HBK8j9F
To: <sip:104@10.0.0.251>;tag=as7892a45b
Call-ID: 1b3a2ec7-ddc5-1234-62af-408d5cc7b450
CSeq: 95309410 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:10.0.0.251:5080 --->
INVITE sip:104@10.0.0.251 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK9j0g897Bmrema
Max-Forwards: 70
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=6BUm84HBK8j9F
To: <sip:104@10.0.0.251>
Call-ID: 1b3a2ec7-ddc5-1234-62af-408d5cc7b450
CSeq: 95309411 INVITE
Contact: <sip:gw+asterisk@10.0.0.251:5080;transport=udp;gw=asterisk>
User-Agent: FreeSWITCH-mod_sofia/1.7.0+git~20160806T164921Z~1e7b4a1301~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Authorization: Digest username="freeswitch", realm="asterisk", nonce="7a0084b4", algorithm=MD5, uri="sip:104@10.0.0.251", response="81071f5c9b3382d79c6f90099a0de940"
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 221
X-FS-Support: update_display,send_info
Remote-Party-ID: "Иван Валерьевич (ivan_valeryevich)" <sip:ivan_valeryevich@10.0.0.251>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1471268839 1471268840 IN IP4 10.0.0.251
s=FreeSWITCH
c=IN IP4 10.0.0.251
t=0 0
m=audio 22110 RTP/AVP 102 101
a=rtpmap:102 L16/16000
a=rtpmap:101 telephone-event/16000
a=fmtp:101 0-16
a=ptime:20
<------------->
--- (18 headers 10 lines) ---
Sending to 10.0.0.251:5080 (NAT)
Using INVITE request as basis request - 1b3a2ec7-ddc5-1234-62af-408d5cc7b450
Found peer 'freeswitch' for 'freeswitch' from 10.0.0.251:5080
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Found RTP audio format 102
Found RTP audio format 101
Found audio description format L16 for ID 102
Found unknown media description format telephone-event for ID 101

<--- Reliably Transmitting (NAT) to 10.0.0.251:5080 --->
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP 10.0.0.251:5080;branch=z9hG4bK9j0g897Bmrema;received=10.0.0.251;rport=5080
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=6BUm84HBK8j9F
To: <sip:104@10.0.0.251>;tag=as7892a45b
Call-ID: 1b3a2ec7-ddc5-1234-62af-408d5cc7b450
CSeq: 95309411 INVITE
Server: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '1b3a2ec7-ddc5-1234-62af-408d5cc7b450' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:10.0.0.251:5080 --->
ACK sip:104@10.0.0.251 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bK9j0g897Bmrema
Max-Forwards: 70
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=6BUm84HBK8j9F
To: <sip:104@10.0.0.251>;tag=as7892a45b
Call-ID: 1b3a2ec7-ddc5-1234-62af-408d5cc7b450
CSeq: 95309411 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:10.0.0.251:5080 --->
INVITE sip:104@10.0.0.251 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bKavS994rFH146N
Max-Forwards: 70
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=7mmDa02egH9UB
To: <sip:104@10.0.0.251>
Call-ID: 1b4ff0f5-ddc5-1234-62af-408d5cc7b450
CSeq: 95309411 INVITE
Contact: <sip:gw+asterisk@10.0.0.251:5080;transport=udp;gw=asterisk>
User-Agent: FreeSWITCH-mod_sofia/1.7.0+git~20160806T164921Z~1e7b4a1301~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 221
X-FS-Support: update_display,send_info
Remote-Party-ID: "Иван Валерьевич (ivan_valeryevich)" <sip:ivan_valeryevich@10.0.0.251>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1471263142 1471263143 IN IP4 10.0.0.251
s=FreeSWITCH
c=IN IP4 10.0.0.251
t=0 0
m=audio 27808 RTP/AVP 102 101
a=rtpmap:102 L16/16000
a=rtpmap:101 telephone-event/16000
a=fmtp:101 0-16
a=ptime:20
<------------->
--- (17 headers 10 lines) ---
Sending to 10.0.0.251:5080 (NAT)
Sending to 10.0.0.251:5080 (NAT)
Using INVITE request as basis request - 1b4ff0f5-ddc5-1234-62af-408d5cc7b450
Found peer 'freeswitch' for 'freeswitch' from 10.0.0.251:5080

<--- Reliably Transmitting (NAT) to 10.0.0.251:5080 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.0.251:5080;branch=z9hG4bKavS994rFH146N;received=10.0.0.251;rport=5080
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=7mmDa02egH9UB
To: <sip:104@10.0.0.251>;tag=as073414c9
Call-ID: 1b4ff0f5-ddc5-1234-62af-408d5cc7b450
CSeq: 95309411 INVITE
Server: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="69324177"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '1b4ff0f5-ddc5-1234-62af-408d5cc7b450' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:10.0.0.251:5080 --->
ACK sip:104@10.0.0.251 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bKavS994rFH146N
Max-Forwards: 70
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=7mmDa02egH9UB
To: <sip:104@10.0.0.251>;tag=as073414c9
Call-ID: 1b4ff0f5-ddc5-1234-62af-408d5cc7b450
CSeq: 95309411 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:10.0.0.251:5080 --->
INVITE sip:104@10.0.0.251 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bKB5j2B09jeaUSH
Max-Forwards: 70
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=7mmDa02egH9UB
To: <sip:104@10.0.0.251>
Call-ID: 1b4ff0f5-ddc5-1234-62af-408d5cc7b450
CSeq: 95309412 INVITE
Contact: <sip:gw+asterisk@10.0.0.251:5080;transport=udp;gw=asterisk>
User-Agent: FreeSWITCH-mod_sofia/1.7.0+git~20160806T164921Z~1e7b4a1301~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Authorization: Digest username="freeswitch", realm="asterisk", nonce="69324177", algorithm=MD5, uri="sip:104@10.0.0.251", response="22cfd6e727bac2c4e11f3389749b3116"
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 221
X-FS-Support: update_display,send_info
Remote-Party-ID: "Иван Валерьевич (ivan_valeryevich)" <sip:ivan_valeryevich@10.0.0.251>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1471263142 1471263143 IN IP4 10.0.0.251
s=FreeSWITCH
c=IN IP4 10.0.0.251
t=0 0
m=audio 27808 RTP/AVP 102 101
a=rtpmap:102 L16/16000
a=rtpmap:101 telephone-event/16000
a=fmtp:101 0-16
a=ptime:20
<------------->
--- (18 headers 10 lines) ---
Sending to 10.0.0.251:5080 (NAT)
Using INVITE request as basis request - 1b4ff0f5-ddc5-1234-62af-408d5cc7b450
Found peer 'freeswitch' for 'freeswitch' from 10.0.0.251:5080
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Found RTP audio format 102
Found RTP audio format 101
Found audio description format L16 for ID 102
Found unknown media description format telephone-event for ID 101

<--- Reliably Transmitting (NAT) to 10.0.0.251:5080 --->
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP 10.0.0.251:5080;branch=z9hG4bKB5j2B09jeaUSH;received=10.0.0.251;rport=5080
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=7mmDa02egH9UB
To: <sip:104@10.0.0.251>;tag=as073414c9
Call-ID: 1b4ff0f5-ddc5-1234-62af-408d5cc7b450
CSeq: 95309412 INVITE
Server: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '1b4ff0f5-ddc5-1234-62af-408d5cc7b450' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:10.0.0.251:5080 --->
ACK sip:104@10.0.0.251 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.251:5080;rport;branch=z9hG4bKB5j2B09jeaUSH
Max-Forwards: 70
From: "Иван Валерьевич (ivan_valeryevich)" <sip:freeswitch@10.0.0.251>;tag=7mmDa02egH9UB
To: <sip:104@10.0.0.251>;tag=as073414c9
Call-ID: 1b4ff0f5-ddc5-1234-62af-408d5cc7b450
CSeq: 95309412 ACK
Content-Length: 0

1. Если в default.xml прописывать строчку
<action application="set" data="proxy_media=true"/>
То звонки идут на номер [104], но при поднятии трубки обрываются =(
2. Пробовал разные кодеки в vars.xml
3. Буду очень признателен за рабочие конфиги.

Заранее спасибо за помощь!

Re: FreeSWITCH+Skype+Asterisk (Elastix v.4)

Добавлено: 16 авг 2016, 00:45
ded
Слишком разные кодеки пробуете. Это не должен быть метод случайных проб и ошибок. Ваш freeswitch делает вызов только в очень экстравагантоном кодеке L16

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

v=0
   o=FreeSWITCH 1471258997 1471258998 IN IP4 10.0.0.251
   s=FreeSWITCH
   c=IN IP4 10.0.0.251
   t=0 0
   m=audio 31906 RTP/AVP 102 101
   a=rtpmap:102 L16/16000
   a=rtpmap:101 telephone-event/16000
   a=fmtp:101 0-16
   a=ptime:20
L16/8000 and L16/16000 is traditional Shoretel codec we used in earlier releases that has that “amazing call quality,
Пробуйте в традиционных alaw & ulaw для начала.
Кроме того, при получении dtmf event 101 c частотой квантитизации 16000

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

a=rtpmap:101 telephone-event/16000
a=fmtp:101 0-16
a=ptime:20
Астериск не понимает 16000,
Found unknown media description format telephone-event for ID 101
потому что обычно получает a=rtpmap:101 telephone-event/8000

И, если Freeswitch и Астериск в одной внутренней подсети, не заморачивайтесь с аутентификацией SIP запрососв. Усложнить вы всегда успеете.

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

Sending to 10.0.0.251:5080 (NAT)
это вот там прямо ещё и НАТ?
А что такое Server: Cisco-SIPGateway/IOS-12.x ? Откуда такой запрос?

Re: FreeSWITCH+Skype+Asterisk (Elastix v.4)

Добавлено: 16 авг 2016, 01:26
logdog
ded писал(а): А что такое Server: Cisco-SIPGateway/IOS-12.x ? Откуда такой запрос?
Это когда-то давно для sipnet.ru стояло... так и стоит useragent :)
ded писал(а): Пробуйте в традиционных alaw & ulaw для начала.
И, если Freeswitch и Астериск в одной внутренней подсети, не заморачивайтесь с аутентификацией SIP запрососв. Усложнить вы всегда успеете.

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

Sending to 10.0.0.251:5080 (NAT)
это вот там прямо ещё и НАТ?
Ната там нет, так как оба сервиса установлены на 1 машине. И я не знаю, откуда он вытаскивает этот кодек L16, если стоит Ulaw.
Точнее, даже почему 1 кодек, если я ставил set - минимум два в skypopen.xml и в vars.xml глобально 7 кодеков.
Неправильное место указания кодеков для входящих на * ?

freeswitch@elastix.lana.local> sofia status

Name Type Data State
=================================================================================================
external profile sip:mod_sofia@10.0.0.251:5080 RUNNING (0)
external::example.com gateway sip:joeuser@example.com NOREG
external::asterisk gateway sip:freeswitch@10.0.0.251 NOREG
10.0.0.251 alias internal ALIASED
internal profile sip:mod_sofia@10.0.0.251:5070 RUNNING (0)

freeswitch@elastix.lana.local> sofia status profile internal

=================================================================================================
Name internal
Domain Name N/A
Auto-NAT false
DBName sofia_reg_internal
Pres Hosts 10.0.0.251,10.0.0.251
Dialplan XML
Context public
Challenge Realm auto_from
RTP-IP 10.0.0.251
SIP-IP 10.0.0.251
URL sip:mod_sofia@10.0.0.251:5070
BIND-URL sip:mod_sofia@10.0.0.251:5070;transport=udp,tcp
WS-BIND-URL sip:mod_sofia@10.0.0.251:5066;transport=ws
WSS-BIND-URL sips:mod_sofia@10.0.0.251:7443;transport=wss
HOLD-MUSIC local_stream://moh
OUTBOUND-PROXY N/A
CODECS IN PCMU
CODECS OUT PCMU
TEL-EVENT 101
DTMF-MODE rfc2833
CNG 13
SESSION-TO 0
MAX-DIALOG 0
NOMEDIA false
LATE-NEG true
PROXY-MEDIA false
ZRTP-PASSTHRU true
AGGRESSIVENAT false
CALLS-IN 0
FAILED-CALLS-IN 0
CALLS-OUT 0
FAILED-CALLS-OUT 0
REGISTRATIONS 0

freeswitch@elastix.lana.local> sofia status profile external

=================================================================================================
Name external
Domain Name N/A
Auto-NAT false
DBName sofia_reg_external
Pres Hosts
Dialplan XML
Context public
Challenge Realm auto_to
RTP-IP 10.0.0.251
SIP-IP 10.0.0.251
URL sip:mod_sofia@10.0.0.251:5080
BIND-URL sip:mod_sofia@10.0.0.251:5080;transport=udp,tcp
HOLD-MUSIC local_stream://moh
OUTBOUND-PROXY N/A
CODECS IN PCMU
CODECS OUT PCMU
TEL-EVENT 101
DTMF-MODE rfc2833
CNG 13
SESSION-TO 0
MAX-DIALOG 0
NOMEDIA false
LATE-NEG true
PROXY-MEDIA false
ZRTP-PASSTHRU true
AGGRESSIVENAT false
CALLS-IN 0
FAILED-CALLS-IN 0
CALLS-OUT 16
FAILED-CALLS-OUT 1
REGISTRATIONS 0

Re: FreeSWITCH+Skype+Asterisk (Elastix v.4)

Добавлено: 16 авг 2016, 06:39
awsswa
<action application="bridge" data="sofia/gateway/asterisk/104"/>

<action application="bridge" data="{absolute_codec_string=PCMA}sofia/gateway/asterisk/104"/>

https://wiki.freeswitch.org/wiki/Variab ... dec_string

по памяти вроде так
если будете делать без авторизации, лучше вообще иметь отдельный профиль

Re: FreeSWITCH+Skype+Asterisk (Elastix v.4)

Добавлено: 16 авг 2016, 13:59
logdog
Cпасибо всем огромное, именно этого для удачного входящего звонка мне и не хватало.
<action application="bridge" data="{absolute_codec_string=PCMA}sofia/gateway/asterisk/104"/>