asterisk + usb E1550
Все настроено и работает, GSM через dongle
Но есть проблема, периодически при звонках длительностью 1м40с и выше, связь обрывается. Как можно решить данную проблему?
| Код: |
| > dongle show devices ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number dongle0 0 Free 15 3 3 Beeline E1550 11.608.12.00.143 3519......4361 250......829 Unknown |
конфиг донгла
| Код: |
| # cat dongle.conf [general] interval=15 ; Number of seconds between trying to connect to devices [defaults] context=mobile ; context for incoming calls group=0 ; calling group rxgain=0 ; increase the incoming volume; may be negative txgain=0 ; increase the outgoint volume; may be negative autodeletesms=yes ; auto delete incoming sms resetdongle=yes ; reset dongle during initialization with ATZ command u2diag=-1 ; set ^U2DIAG parameter on device (0 = disable everything except modem function) ; -1 not use ^U2DIAG command usecallingpres=yes ; use the caller ID presentation or not callingpres=allowed_passed_screen ; set caller ID presentation by default use default network settings mindtmfgap=0 mindtmfduration=0 mindtmfinterval=100 exten=9629....79 dtmf=relax [dongle0] rxgain=5 txgain=-2 audio=/dev/ttyUSB1 ; tty port for audio connection; no default value data=/dev/ttyUSB2 ; tty port for AT commands; no default value imei=3519......4361 imsi=2500......02452 |
скинуть вывод консоли:
asterisk -vr
| Код: |
| [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:8566 find_call: = Looking for Call ID: 60096ea64f9dc1fa58c3241d3d474516@91.xx.xx.30:5060 (Checking To) --From tag as6b38c790 --To-tag 637617939 [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:4335 __sip_ack: Acked pending invite 102 [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:4373 __sip_ack: Stopping retransmission on '60096ea64f9dc1fa58c3241d3d474516@91.xxx.xx.30:5060' of Request 102: Match Found [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:20830 handle_response_invite: SIP response 200 to standard invite [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9364 process_sdp: Processing session-level SDP v=0... UNSUPPORTED OR FAILED. [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9364 process_sdp: Processing session-level SDP o=32-Cw.102 5014 76 IN IP4 10.10.10.36... OK. [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9364 process_sdp: Processing session-level SDP s=Mapping... UNSUPPORTED OR FAILED. [Aug 11 10:59:18] DEBUG[1125]: netsock2.c:138 ast_sockaddr_split_hostport: Splitting '10.10.10.36' into... [Aug 11 10:59:18] DEBUG[1125]: netsock2.c:192 ast_sockaddr_split_hostport: ...host '10.10.10.36' and port ''. [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9364 process_sdp: Processing session-level SDP c=IN IP4 10.10.10.36... OK. [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9364 process_sdp: Processing session-level SDP t=0 0... UNSUPPORTED OR FAILED. Found RTP audio format 0 [Aug 11 10:59:18] DEBUG[1125]: rtp_engine.c:541 ast_rtp_codecs_payloads_set_m_type: Setting payload 0 based on m type on 0xb3d0bd64 Found RTP audio format 101 [Aug 11 10:59:18] DEBUG[1125]: rtp_engine.c:541 ast_rtp_codecs_payloads_set_m_type: Setting payload 101 based on m type on 0xb3d0bd64 Found audio description format PCMU for ID 0 [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9639 process_sdp: Processing media-level (audio) SDP a=rtpmap:0 PCMU/8000... OK. Found audio description format telephone-event for ID 101 [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9639 process_sdp: Processing media-level (audio) SDP a=rtpmap:101 telephone-event/8000... OK. [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9639 process_sdp: Processing media-level (audio) SDP a=fmtp:101 0-16... UNSUPPORTED OR FAILED. [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9639 process_sdp: Processing media-level (audio) SDP a=sendrecv... OK. [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9639 process_sdp: Processing media-level (audio) SDP a=ptime:20... OK. [Aug 11 10:59:18] DEBUG[1125]: rtp_engine.c:644 ast_rtp_codecs_payload_formats: Incorporating payload 0 on 0xb3d0bd64 [Aug 11 10:59:18] DEBUG[1125]: rtp_engine.c:644 ast_rtp_codecs_payload_formats: Incorporating payload 101 on 0xb3d0bd64 Capabilities: us - 0x80000008160e (gsm|ulaw|alaw|speex|ilbc|g722|h263|testlaw), peer - audio=0x4 (ulaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (ulaw) Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|) [Aug 11 10:59:18] DEBUG[1125]: res_rtp_asterisk.c:2604 ast_rtp_remote_address_set: Setting RTCP address on RTP instance '0xb6e35f08' Peer audio RTP is at port 10.10.10.36:5014 [Aug 11 10:59:18] DEBUG[1125]: rtp_engine.c:522 ast_rtp_codecs_payloads_copy: Copying payload 0 from 0xb3d0bd64 to 0xb6e360b4 [Aug 11 10:59:18] DEBUG[1125]: rtp_engine.c:522 ast_rtp_codecs_payloads_copy: Copying payload 101 from 0xb3d0bd64 to 0xb6e360b4 [Aug 11 10:59:18] DEBUG[1125]: res_rtp_asterisk.c:2530 ast_rtp_prop_set: Ignoring duplicate RTCP property on RTP instance '0xb6e35f08' [Aug 11 10:59:18] DEBUG[1125]: res_rtp_asterisk.c:2604 ast_rtp_remote_address_set: Setting RTCP address on RTP instance '0xb6e34170' Peer doesn't provide video [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9893 process_sdp: We're settling with these formats: 0x4 (ulaw) [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:9898 process_sdp: We have an owner, now see if we need to change this call [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:6304 update_call_counter: Updating call counter for outgoing call [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:14932 build_route: build_route: Contact hop: list_route: hop: [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:10890 reqprep: Strict routing enforced for session 60096ea64f9dc1fa58c3241d3d474516@91.xxx.xx.30:5060 set_destination: Parsing for address/port to send to [Aug 11 10:59:18] DEBUG[1125]: netsock2.c:138 ast_sockaddr_split_hostport: Splitting '10.10.10.36:5060' into... [Aug 11 10:59:18] DEBUG[1125]: netsock2.c:192 ast_sockaddr_split_hostport: ...host '10.10.10.36' and port '5060'. set_destination: set destination to 10.10.10.36:5060 Transmitting (NAT) to 10.10.10.36:5060: ACK sip:32-Cw.102@10.10.10.36:5060 SIP/2.0 Via: SIP/2.0/UDP 91.xxx.xx.30:5060;branch=z9hG4bK59f43314;rport Max-Forwards: 70 From: "dongle0" ;tag=as6b38c790 To: ;tag=637617939 Contact: Call-ID: 60096ea64f9dc1fa58c3241d3d474516@91.xxx.xx.30:5060 CSeq: 102 ACK User-Agent: VirtualPBX Content-Length: 0 --- [Aug 11 10:59:18] DEBUG[1125]: chan_sip.c:3689 __sip_xmit: Trying to put 'ACK sip:32-' onto UDP socket destined for 10.10.10.36:5060 [Aug 11 10:59:18] DEBUG[14703]: channel.c:953 channel_indicate: [Dongle/dongle0-0100000033] Requested indication 22 [Aug 11 10:59:18] WARNING[14703]: channel.c:982 channel_indicate: [Dongle/dongle0-0100000033] Don't know how to indicate condition 22 -- SIP/32-Cw.102-00000267 answered Dongle/dongle0-0100000033 [Aug 11 10:59:18] DEBUG[1055]: devicestate.c:344 _ast_device_state: No provider found, checking channel drivers for SIP - 32-Cw.102 [Aug 11 10:59:18] DEBUG[1055]: chan_sip.c:27352 sip_devicestate: Checking device state for peer 32-Cw.102 [Aug 11 10:59:18] DEBUG[14703]: channel.c:953 channel_indicate: [Dongle/dongle0-0100000033] Requested indication -1 [Aug 11 10:59:18] DEBUG[14703]: channel.c:3572 ast_settimeout_full: Scheduling timer at (0 requested / 0 actual) timer ticks per second [Aug 11 10:59:18] DEBUG[14703]: channel.c:5278 set_format: Set channel Dongle/dongle0-0100000033 to read format slin [Aug 11 10:59:18] DEBUG[14703]: channel.c:5278 set_format: Set channel SIP/32-Cw.102-00000267 to write format slin [Aug 11 10:59:18] DEBUG[14703]: channel.c:5278 set_format: Set channel SIP/32-Cw.102-00000267 to read format slin [Aug 11 10:59:18] DEBUG[14703]: features.c:4075 ast_bridge_call: bridge answer set, chan answer set [Aug 11 10:59:18] DEBUG[14703]: features.c:3896 clear_dialed_interfaces: Removing dialed interfaces datastore on SIP/32-Cw.102-00000267 since we're bridging [Aug 11 10:59:18] DEBUG[14703]: channel.c:953 channel_indicate: [Dongle/dongle0-0100000033] Requested indication 20 [Aug 11 10:59:18] DEBUG[14703]: res_rtp_asterisk.c:866 ast_rtp_update_source: Setting the marker bit due to a source update [Aug 11 10:59:18] DEBUG[1055]: res_config_odbc.c:93 custom_prepare: Skip: 0; SQL: SELECT * FROM VPBX_SIPPEERS WHERE name = ? AND host = ? [Aug 11 10:59:18] DEBUG[1055]: res_config_odbc.c:109 custom_prepare: Parameter 1 ('name') = '32-Cw.102' [Aug 11 10:59:18] DEBUG[1055]: res_config_odbc.c:109 custom_prepare: Parameter 2 ('host') = 'dynamic' [Aug 11 10:59:18] DEBUG[1055]: res_odbc.c:1059 odbc_release_obj2: odbc_release_obj2(0x8e97908) called (obj->txf = (nil)) [Aug 11 10:59:18] DEBUG[1055]: chan_sip.c:28243 build_peer: -REALTIME- peer built. Name: 32-Cw.102. Peer objects: 3836 [Aug 11 10:59:18] DEBUG[1055]: netsock2.c:138 ast_sockaddr_split_hostport: Splitting '10.10.10.36' into... [Aug 11 10:59:18] DEBUG[1055]: netsock2.c:192 ast_sockaddr_split_hostport: ...host '10.10.10.36' and port ''. [Aug 11 10:59:18] DEBUG[1055]: chan_sip.c:28788 build_peer: Not an IPv4 nor IPv6 address, cannot get port. [Aug 11 10:59:18] DEBUG[1055]: chan_sip.c:28791 build_peer: Not an IPv4 nor IPv6 address, cannot set port. [Aug 11 10:59:18] DEBUG[1055]: chan_sip.c:5354 realtime_peer: -REALTIME- loading peer from database to memory. Name: 32-Cw.102. Peer objects: 3836 [Aug 11 10:59:18] DEBUG[1055]: chan_sip.c:4984 sip_destroy_peer: Destroying SIP peer 32-Cw.102 [Aug 11 10:59:18] DEBUG[1055]: chan_sip.c:5021 sip_destroy_peer: -REALTIME- peer Destroyed. Name: 32-Cw.102. Realtime Peer objects: 3835 [Aug 11 10:59:18] DEBUG[1055]: devicestate.c:467 do_state_change: Changing state for SIP/32-Cw.102 - state 1 (Not in use) [Aug 11 10:59:18] DEBUG[1055]: devicestate.c:442 devstate_event: device 'SIP/32-XOtpM0q-EsA72zurEp6RCw.102' state '1' [Aug 11 10:59:18] DEBUG[14703]: res_rtp_asterisk.c:1378 ast_rtp_write: Ooh, format changed from unknown to ulaw [Aug 11 10:59:18] DEBUG[14703]: res_rtp_asterisk.c:1409 ast_rtp_write: Created smoother: format: ulaw ms: 20 len: 160 [Aug 11 10:59:18] DEBUG[14703]: res_rtp_asterisk.c:1274 ast_rtp_raw_write: Starting RTCP transmission on RTP instance '0xb6e35f08' [Aug 11 10:59:26] DEBUG[10408]: at_read.c:83 at_read: [dongle0] receive 20 byte, used 20, free 2028, read 0, write 20 [Aug 11 10:59:26] DEBUG[10408]: at_read.c:98 at_read: [dongle0] [ ^CEND:2,0,104,31 ] [Aug 11 10:59:26] DEBUG[10408]: at_queue.c:129 at_queue_add: [dongle0] insert task with 1 commands begin with 'AT+CLCC' expected response 'OK' after head of queue [Aug 11 10:59:26] DEBUG[10408]: at_queue.c:249 at_queue_run: [dongle0] write command 'AT+CLCC' expected response 'OK' length 8 ]Aug 11 10:59:26] DEBUG[10408]: at_queue.c:194 at_write: [dongle0] [AT+CLCC [Aug 11 10:59:26] DEBUG[10408]: at_response.c:740 at_response_cend: [dongle0] CEND: call_index 2 duration 0 end_status 104 cc_cause 31 Line disconnected [Aug 11 10:59:26] DEBUG[10408]: at_read.c:83 at_read: [dongle0] receive 45 byte, used 45, free 2003, read 0, write 45 [Aug 11 10:59:26] DEBUG[10408]: at_read.c:98 at_read: [dongle0] [ +CLCC: 1,1,0,0,0,"+7xxxx373134",145 OK ] [Aug 11 10:59:26] DEBUG[10408]: at_response.c:904 at_response_clcc: [dongle0] CLCC callidx 1 dir 1 state 0 mode 0 mpty 0 number +7xxxx373134 type 145 [Aug 11 10:59:26] DEBUG[10408]: at_response.c:145 at_response_ok: [dongle0] AT+CLCC sent successfully [Aug 11 10:59:26] DEBUG[10408]: at_queue.c:224 at_queue_remove_cmd: [dongle0] remove command 'AT+CLCC' expected response 'OK' real 'OK' cmd 1/1 flags 0x01 from queue [Aug 11 10:59:26] DEBUG[10408]: at_queue.c:72 at_queue_remove: [dongle0] remove task with 1 command(s) begin with 'AT+CLCC' expected response 'OK' from queue [Aug 11 10:59:28] DEBUG[10408]: at_read.c:83 at_read: [dongle0] receive 27 byte, used 27, free 2021, read 0, write 27 [Aug 11 10:59:28] DEBUG[10408]: at_read.c:98 at_read: [dongle0] [ ^BOOT:49194361,0,0,0,87 ] [Aug 11 10:59:38] DEBUG[10408]: at_queue.c:129 at_queue_add: [dongle0] insert task with 1 commands begin with 'AT' expected response 'OK' after head of queue [Aug 11 10:59:38] DEBUG[10408]: at_queue.c:249 at_queue_run: [dongle0] write command 'AT' expected response 'OK' length 3 ]Aug 11 10:59:38] DEBUG[10408]: at_queue.c:194 at_write: [dongle0] [AT [Aug 11 10:59:38] DEBUG[10408]: at_read.c:83 at_read: [dongle0] receive 6 byte, used 6, free 2042, read 0, write 6 [Aug 11 10:59:38] DEBUG[10408]: at_read.c:98 at_read: [dongle0] [ OK ] [Aug 11 10:59:38] DEBUG[10408]: at_response.c:145 at_response_ok: [dongle0] AT sent successfully [Aug 11 10:59:38] DEBUG[10408]: at_queue.c:224 at_queue_remove_cmd: [dongle0] remove command 'AT' expected response 'OK' real 'OK' cmd 1/1 flags 0x03 from queue [Aug 11 10:59:38] DEBUG[10408]: at_queue.c:72 at_queue_remove: [dongle0] remove task with 1 command(s) begin with 'AT' expected response 'OK' from queue |
Уже начинает надоедать такое поведение.
При входящем звонке на сотовый номер через USB модем, связь может пропасть через 1-2-5 минут, хотя время идет и ни я ни абонент друг друга не слышим.
Пока я пользовался этим номером на мобильном, проблем с номером и связью не наблюдал.
Что есть:
есть сервер на centos на нем виртуалка и в нем астерикс.
доступ к модему сделан для виртуалки. Но были случаи когда виртуалка теряет USB, помогает ребут виртуалки.
Проблема так и есть с падением звонка через модем.
В логах заметил кучу таких еще записей:
[0K[May 11 09:41:13] [1;32mDEBUG[0m[29662]: [1;37maudiohook.c[0m:[1;37m233[0m [1;37maudiohook_read_frame_both[0m: Read factory 0x9509cb8 and write factory 0x950a6e0 both fail to provide 160 samples
[0K[May 11 09:41:13] [1;32mDEBUG[0m[29662]: [1;37maudiohook.c[0m:[1;37m245[0m [1;37maudiohook_read_frame_both[0m: Read factory 0x9509cb8 was pretty quick last time, waiting for them.
[0K[May 11 09:41:13] [1;32mDEBUG[0m[29662]: [1;37maudiohook.c[0m:[1;37m233[0m [1;37maudiohook_read_frame_both[0m: Read factory 0x9509cb8 and write factory 0x950a6e0 both fail to provide 160 samples
[0K[May 11 09:41:13] [1;32mDEBUG[0m[29662]: [1;37maudiohook.c[0m:[1;37m245[0m [1;37maudiohook_read_frame_both[0m: Read factory 0x9509cb8 was pretty quick last time, waiting for them.