Asterisk 1.8.10.1~dfsg-1ubuntu1 на ubuntu 12.04
Asterisk находится за NAT, на роутере к нему проброшены порты 5060 и 10000-20000. На самом сервере в iptables всё разрешено.
sip.conf
extensions.confКод: Выделить всё
[general] localnet=192.168.1.0/255.255.255.0 nat=yes canreinvite=no context=incoming_calls alwaysauthreject = yes allowoverlap = no videosupport = no bindport = 5060 udpbindaddr = 0.0.0.0 transport=udp srvlookup = yes dtmfmode = rfc2833 dtmfmode =inband disallow = all allow = alaw allow = ulaw allow = gsm allow = g723.1 allow = g729 allow = h263 allow = h263p allow = h264 allow = h261 register => 70641:pvCjY5kb96@sip.zadarma.com/70641 [zadarma] type = friend username = 70641 secret = ####### fromuser = 70641 fromdomain = sip1.zadarma.com nat = yes insecure = port,invite context = outgoing_calls canreinvite = no promiscredir=yes [101] type=friend context=phones host=dynamic secret=### qualify=10000 nat=no [102] type=friend context=phones host=dynamic secret=### qualify=10000 nat=no
debug во время исходящего звонкаКод: Выделить всё
[globals] [general] autofallthrough=yes [default] exten => s,1,Answer() exten => s,n,Wait(1) exten => s,n,Hangup() [incoming_calls] exten => 70641.,1,NoOp() exten => 70641.,n,Dial(SIP/102) [outgoing_calls] exten => _7.,1,NoOp() exten => _7.,n,Dial(SIP/zadarma/${EXTEN}) exten => 4444,1,NoOp() exten => 4444,n,Dial(SIP/zadarma/${EXTEN}) [internal] exten => 101,1,Answer() exten => 101,n,Dial(SIP/101,30) exten => 101,n,Hangup() exten => 102,1,Answer() exten => 102,n,Dial(SIP/102,30) exten => 102,n,Hangup() [phones] include => internal include => outgoing_calls
Может кто подскажет в чем проблема?Код: Выделить всё
[Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:8088 find_call: = Looking for Call ID: 1551000842 (Checking From) --From tag 2080552178 --To-tag [Apr 11 22:19:31] DEBUG[1601]: acl.c:728 ast_ouraddrfor: For destination '192.168.1.34', our source address is '192.168.1.36'. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:3498 ast_sip_ouraddrfor: Setting SIP_TRANSPORT_UDP with address 192.168.1.36:5060 [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:7768 sip_alloc: Allocating new SIP dialog for 1551000842 - INVITE (No RTP) [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:25045 handle_incoming: **** Received INVITE (5) - Command in SIP INVITE [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:134 ast_sockaddr_split_hostport: Splitting '192.168.1.34:5060' into... [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:188 ast_sockaddr_split_hostport: ...host '192.168.1.34' and port '5060'. [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:134 ast_sockaddr_split_hostport: Splitting '192.168.1.36' into... [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:188 ast_sockaddr_split_hostport: ...host '192.168.1.36' and port ''. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:3344 __sip_xmit: Trying to put 'SIP/2.0 401' onto UDP socket destined for 192.168.1.34:5060 [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:8088 find_call: = Looking for Call ID: 1551000842 (Checking From) --From tag 2080552178 --To-tag as79f84cb6 [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:25045 handle_incoming: **** Received ACK (6) - Command in SIP ACK [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:4029 __sip_ack: Stopping retransmission on '1551000842' of Response 20: Match Found [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:8088 find_call: = Looking for Call ID: 1551000842 (Checking From) --From tag 2080552178 --To-tag [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:134 ast_sockaddr_split_hostport: Splitting '192.168.1.36' into... [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:188 ast_sockaddr_split_hostport: ...host '192.168.1.36' and port ''. [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:134 ast_sockaddr_split_hostport: Splitting '192.168.1.36' into... [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:188 ast_sockaddr_split_hostport: ...host '192.168.1.36' and port ''. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:25045 handle_incoming: **** Received INVITE (5) - Command in SIP INVITE [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:134 ast_sockaddr_split_hostport: Splitting '192.168.1.34:5060' into... [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:188 ast_sockaddr_split_hostport: ...host '192.168.1.34' and port '5060'. [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:134 ast_sockaddr_split_hostport: Splitting '192.168.1.36' into... [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:188 ast_sockaddr_split_hostport: ...host '192.168.1.36' and port ''. [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:346 ast_rtp_instance_new: Using engine 'asterisk' for RTP instance '0xb7008620' [Apr 11 22:19:31] DEBUG[1601]: res_rtp_asterisk.c:556 ast_rtp_new: Allocated port 19240 for RTP instance '0xb7008620' [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:355 ast_rtp_instance_new: RTP instance '0xb7008620' is setup and ready to go [Apr 11 22:19:31] DEBUG[1601]: res_rtp_asterisk.c:2516 ast_rtp_prop_set: Setup RTCP on RTP instance '0xb7008620' == Using SIP RTP CoS mark 5 [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:5092 do_setnat: Setting NAT on RTP to On [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:8890 process_sdp: Processing session-level SDP v=0... UNSUPPORTED. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:8890 process_sdp: Processing session-level SDP o=102 123456 654321 IN IP4 192.168.1.34... UNSUPPORTED. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:8890 process_sdp: Processing session-level SDP s=A conversation... UNSUPPORTED. [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:134 ast_sockaddr_split_hostport: Splitting '192.168.1.34' into... [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:188 ast_sockaddr_split_hostport: ...host '192.168.1.34' and port ''. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:8890 process_sdp: Processing session-level SDP c=IN IP4 192.168.1.34... OK. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:8890 process_sdp: Processing session-level SDP t=0 0... UNSUPPORTED. [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:537 ast_rtp_codecs_payloads_set_m_type: Setting payload 112 based on m type on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:537 ast_rtp_codecs_payloads_set_m_type: Setting payload 111 based on m type on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:537 ast_rtp_codecs_payloads_set_m_type: Setting payload 110 based on m type on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:537 ast_rtp_codecs_payloads_set_m_type: Setting payload 3 based on m type on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:537 ast_rtp_codecs_payloads_set_m_type: Setting payload 0 based on m type on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:537 ast_rtp_codecs_payloads_set_m_type: Setting payload 8 based on m type on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:537 ast_rtp_codecs_payloads_set_m_type: Setting payload 101 based on m type on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:604 ast_rtp_codecs_payloads_unset: Unsetting payload 112 on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=rtpmap:112 speex/32000/1... UNSUPPORTED. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=fmtp:112 vbr=on... UNSUPPORTED. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=rtpmap:111 speex/16000/1... OK. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=fmtp:111 vbr=on... UNSUPPORTED. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=rtpmap:110 speex/8000/1... OK. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=fmtp:110 vbr=on... UNSUPPORTED. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=rtpmap:3 GSM/8000/1... OK. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=rtpmap:0 PCMU/8000/1... OK. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=rtpmap:8 PCMA/8000/1... OK. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=rtpmap:101 telephone-event/8000/1... OK. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9109 process_sdp: Processing media-level (audio) SDP a=fmtp:101 0-11... UNSUPPORTED. [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:640 ast_rtp_codecs_payload_formats: Incorporating payload 0 on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:640 ast_rtp_codecs_payload_formats: Incorporating payload 3 on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:640 ast_rtp_codecs_payload_formats: Incorporating payload 8 on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:640 ast_rtp_codecs_payload_formats: Incorporating payload 101 on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:640 ast_rtp_codecs_payload_formats: Incorporating payload 110 on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:640 ast_rtp_codecs_payload_formats: Incorporating payload 111 on 0xb4c77dd4 [Apr 11 22:19:31] DEBUG[1601]: res_rtp_asterisk.c:2556 ast_rtp_remote_address_set: Setting RTCP address on RTP instance '0xb7008620' [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:518 ast_rtp_codecs_payloads_copy: Copying payload 0 from 0xb4c77dd4 to 0xb70087cc [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:518 ast_rtp_codecs_payloads_copy: Copying payload 3 from 0xb4c77dd4 to 0xb70087cc [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:518 ast_rtp_codecs_payloads_copy: Copying payload 8 from 0xb4c77dd4 to 0xb70087cc [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:518 ast_rtp_codecs_payloads_copy: Copying payload 101 from 0xb4c77dd4 to 0xb70087cc [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:518 ast_rtp_codecs_payloads_copy: Copying payload 110 from 0xb4c77dd4 to 0xb70087cc [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:518 ast_rtp_codecs_payloads_copy: Copying payload 111 from 0xb4c77dd4 to 0xb70087cc [Apr 11 22:19:31] DEBUG[1601]: res_rtp_asterisk.c:2482 ast_rtp_prop_set: Ignoring duplicate RTCP property on RTP instance '0xb7008620' [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:9353 process_sdp: We're settling with these formats: 0xe (gsm|ulaw|alaw) [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:22575 handle_request_invite: Checking SIP call limits for device 102 [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:5900 update_call_counter: Updating call counter for incoming call [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:134 ast_sockaddr_split_hostport: Splitting '192.168.1.36' into... [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:188 ast_sockaddr_split_hostport: ...host '192.168.1.36' and port ''. [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:134 ast_sockaddr_split_hostport: Splitting '192.168.1.36' into... [Apr 11 22:19:31] DEBUG[1601]: netsock2.c:188 ast_sockaddr_split_hostport: ...host '192.168.1.36' and port ''. [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:7070 sip_new: *** Our native formats are 0x8 (alaw) [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:7071 sip_new: *** Joint capabilities are 0xe (gsm|ulaw|alaw) [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:7072 sip_new: *** Our capabilities are 0x8000003c010f (g723|gsm|ulaw|alaw|g729|h261|h263|h263p|h264|testlaw) [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:7073 sip_new: *** AST_CODEC_CHOOSE formats are 0x8 (alaw) [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:7103 sip_new: This channel will not be able to handle video. [Apr 11 22:19:31] DEBUG[1601]: dsp.c:471 ast_tone_detect_init: Setup tone 1100 Hz, 500 ms, block_size=160, hits_required=21 [Apr 11 22:19:31] DEBUG[1601]: dsp.c:471 ast_tone_detect_init: Setup tone 2100 Hz, 2600 ms, block_size=160, hits_required=116 [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:14243 build_route: build_route: Contact hop: <sip:102@192.168.1.34> [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:22874 handle_request_invite: SIP/102-00000008: New call is still down.... Trying... [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:3344 __sip_xmit: Trying to put 'SIP/2.0 100' onto UDP socket destined for 192.168.1.34:5060 [Apr 11 22:19:31] DEBUG[1568]: devicestate.c:340 _ast_device_state: No provider found, checking channel drivers for SIP - 102 [Apr 11 22:19:31] DEBUG[1568]: chan_sip.c:26313 sip_devicestate: Checking device state for peer 102 [Apr 11 22:19:31] DEBUG[1568]: devicestate.c:458 do_state_change: Changing state for SIP/102 - state 1 (Not in use) [Apr 11 22:19:31] DEBUG[1568]: devicestate.c:438 devstate_event: device 'SIP/102' state '1' [Apr 11 22:19:31] DEBUG[1869]: pbx.c:4230 pbx_extension_helper: Launching 'NoOp' -- Executing [79657369756@phones:1] NoOp("SIP/102-00000008", "") in new stack [Apr 11 22:19:31] DEBUG[1869]: pbx.c:3239 ast_str_retrieve_variable: Result of 'EXTEN' is '79657369756' [Apr 11 22:19:31] DEBUG[1869]: pbx.c:4230 pbx_extension_helper: Launching 'Dial' -- Executing [79657369756@phones:2] Dial("SIP/102-00000008", "SIP/zadarma/79657369756") in new stack [Apr 11 22:19:31] DEBUG[1869]: chan_sip.c:26415 sip_request_call: Asked to create a SIP channel with formats: 0x8 (alaw) [Apr 11 22:19:31] DEBUG[1869]: chan_sip.c:7768 sip_alloc: Allocating new SIP dialog for 06495afa7bec7e6139d0a54a67b66216@127.0.1.1:5060 - INVITE (No RTP) [Apr 11 22:19:31] DEBUG[1869]: chan_sip.c:26523 sip_request_call: Cant create SIP call - target device not registered [Apr 11 22:19:31] DEBUG[1869]: chan_sip.c:6048 sip_destroy: Destroying SIP dialog 06495afa7bec7e6139d0a54a67b66216@127.0.1.1:5060 [Apr 11 22:19:31] WARNING[1869]: app_dial.c:2218 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown) == Everyone is busy/congested at this time (1:0/0/1) [Apr 11 22:19:31] DEBUG[1869]: app_dial.c:2901 dial_exec_full: Exiting with DIALSTATUS=CHANUNAVAIL. -- Auto fallthrough, channel 'SIP/102-00000008' status is 'CHANUNAVAIL' [Apr 11 22:19:31] DEBUG[1869]: chan_sip.c:3344 __sip_xmit: Trying to put 'SIP/2.0 503' onto UDP socket destined for 192.168.1.34:5060 [Apr 11 22:19:31] DEBUG[1869]: chan_sip.c:3086 sip_alreadygone: Setting SIP_ALREADYGONE on dialog 1551000842 [Apr 11 22:19:31] DEBUG[1869]: channel.c:2680 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/102-00000008' [Apr 11 22:19:31] DEBUG[1869]: channel.c:2680 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/102-00000008' [Apr 11 22:19:31] DEBUG[1869]: channel.c:2820 ast_hangup: Hanging up channel 'SIP/102-00000008' [Apr 11 22:19:31] DEBUG[1869]: chan_sip.c:6271 sip_hangup: Hanging up zombie call. Be scared. [Apr 11 22:19:31] DEBUG[1869]: res_rtp_asterisk.c:2556 ast_rtp_remote_address_set: Setting RTCP address on RTP instance '0xb7008620' [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:8088 find_call: = Looking for Call ID: 1551000842 (Checking From) --From tag 2080552178 --To-tag as7ed9b82d [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:25045 handle_incoming: **** Received ACK (6) - Command in SIP ACK [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:4029 __sip_ack: Stopping retransmission on '1551000842' of Response 21: Match Found [Apr 11 22:19:31] DEBUG[1601]: chan_sip.c:6048 sip_destroy: Destroying SIP dialog 1551000842 [Apr 11 22:19:31] DEBUG[1601]: rtp_engine.c:294 instance_destructor: Destroyed RTP instance '0xb7008620' [Apr 11 22:19:31] DEBUG[1568]: devicestate.c:340 _ast_device_state: No provider found, checking channel drivers for SIP - 102 [Apr 11 22:19:31] DEBUG[1568]: chan_sip.c:26313 sip_devicestate: Checking device state for peer 102 [Apr 11 22:19:31] DEBUG[1568]: devicestate.c:458 do_state_change: Changing state for SIP/102 - state 1 (Not in use) [Apr 11 22:19:31] DEBUG[1568]: devicestate.c:438 devstate_event: device 'SIP/102' state '1' [Apr 11 22:19:31] DEBUG[1568]: devicestate.c:340 _ast_device_state: No provider found, checking channel drivers for SIP - 102 [Apr 11 22:19:31] DEBUG[1568]: chan_sip.c:26313 sip_devicestate: Checking device state for peer 102 [Apr 11 22:19:31] DEBUG[1568]: devicestate.c:458 do_state_change: Changing state for SIP/102 - state 1 (Not in use) [Apr 11 22:19:31] DEBUG[1568]: devicestate.c:438 devstate_event: device 'SIP/102' state '1' [Apr 11 22:19:31] DEBUG[1624]: app_queue.c:1487 handle_statechange: Device 'SIP/102' changed to state '1' (Not in use) but we don't care because they're not a member of any queue. [Apr 11 22:19:31] DEBUG[1624]: app_queue.c:1487 handle_statechange: Device 'SIP/102' changed to state '1' (Not in use) but we don't care because they're not a member of any queue. [Apr 11 22:19:31] DEBUG[1624]: app_queue.c:1487 handle_statechange: Device 'SIP/102' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.