Hello guys, I have a lua script that does an outbound call through my external sip gateways… The problem is that sometimes the call is lost and I don’t know why, this is the complete log of that call: 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.349227 [NOTICE] switch_channel.c:1091 New Channel sofia/external/8008000800 [813d53c0-0733-40af-9562-922ea19a7f5b] 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.349227 [DEBUG] mod_sofia.c:4776 (sofia/external/8008000800) State Change CS_NEW -> CS_INIT 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_core_state_machine.c:473 (sofia/external/8008000800) Running State Change CS_INIT 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_core_state_machine.c:516 (sofia/external/8008000800) State INIT 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] mod_sofia.c:88 sofia/external/8008000800 SOFIA INIT 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] sofia_glue.c:1257 sofia/external/8008000800 sending invite version: 1.7.0 git 222eff1 2015-12-17 22:32:55Z 64bit 813d53c0-0733-40af-9562-922ea19a7f5b Local SDP: 813d53c0-0733-40af-9562-922ea19a7f5b v=0 813d53c0-0733-40af-9562-922ea19a7f5b o=FreeSWITCH 1471968528 1471968529 IN IP4 208.115.55.11 813d53c0-0733-40af-9562-922ea19a7f5b s=FreeSWITCH 813d53c0-0733-40af-9562-922ea19a7f5b c=IN IP4 208.115.55.11 813d53c0-0733-40af-9562-922ea19a7f5b t=0 0 813d53c0-0733-40af-9562-922ea19a7f5b m=audio 22422 RTP/AVP 102 9 0 8 104 101 813d53c0-0733-40af-9562-922ea19a7f5b a=rtpmap:102 opus/48000/2 813d53c0-0733-40af-9562-922ea19a7f5b a=fmtp:102 useinbandfec=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40 813d53c0-0733-40af-9562-922ea19a7f5b a=rtpmap:9 G722/8000 813d53c0-0733-40af-9562-922ea19a7f5b a=rtpmap:0 PCMU/8000 813d53c0-0733-40af-9562-922ea19a7f5b a=rtpmap:8 PCMA/8000 813d53c0-0733-40af-9562-922ea19a7f5b a=rtpmap:104 telephone-event/48000 813d53c0-0733-40af-9562-922ea19a7f5b a=fmtp:104 0-16 813d53c0-0733-40af-9562-922ea19a7f5b a=rtpmap:101 telephone-event/8000 813d53c0-0733-40af-9562-922ea19a7f5b a=fmtp:101 0-16 813d53c0-0733-40af-9562-922ea19a7f5b a=ptime:20 813d53c0-0733-40af-9562-922ea19a7f5b a=sendrecv 813d53c0-0733-40af-9562-922ea19a7f5b m=video 26230 RTP/AVP 103 813d53c0-0733-40af-9562-922ea19a7f5b a=rtpmap:103 VP8/90000 813d53c0-0733-40af-9562-922ea19a7f5b b=AS:1024 813d53c0-0733-40af-9562-922ea19a7f5b a=rtcp-fb:103 ccm fir 813d53c0-0733-40af-9562-922ea19a7f5b a=rtcp-fb:103 ccm tmmbr 813d53c0-0733-40af-9562-922ea19a7f5b a=rtcp-fb:103 nack 813d53c0-0733-40af-9562-922ea19a7f5b a=rtcp-fb:103 nack pli 813d53c0-0733-40af-9562-922ea19a7f5b 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_core_state_machine.c:40 sofia/external/8008000800 Standard INIT 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_core_state_machine.c:48 (sofia/external/8008000800) State Change CS_INIT -> CS_ROUTING 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_core_state_machine.c:516 (sofia/external/8008000800) State INIT going to sleep 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_core_state_machine.c:473 (sofia/external/8008000800) Running State Change CS_ROUTING 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_core_state_machine.c:532 (sofia/external/8008000800) State ROUTING 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] mod_sofia.c:141 sofia/external/8008000800 SOFIA ROUTING 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_ivr_originate.c:67 (sofia/external/8008000800) State Change CS_ROUTING -> CS_CONSUME_MEDIA 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_core_state_machine.c:532 (sofia/external/8008000800) State ROUTING going to sleep 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.390583 [DEBUG] switch_core_state_machine.c:473 (sofia/external/8008000800) Running State Change CS_CONSUME_MEDIA 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.410024 [DEBUG] switch_core_state_machine.c:551 (sofia/external/8008000800) State CONSUME_MEDIA 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.410024 [DEBUG] switch_core_state_machine.c:551 (sofia/external/8008000800) State CONSUME_MEDIA going to sleep 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:30.429866 [DEBUG] sofia.c:6756 Channel sofia/external/8008000800 entering state [calling][0] 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] sofia.c:6756 Channel sofia/external/8008000800 entering state [proceeding][183] 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] sofia.c:6766 Remote SDP: 813d53c0-0733-40af-9562-922ea19a7f5b v=0 813d53c0-0733-40af-9562-922ea19a7f5b o=BroadWorks 931492917 1 IN IP4 208.73.144.71 813d53c0-0733-40af-9562-922ea19a7f5b s=- 813d53c0-0733-40af-9562-922ea19a7f5b c=IN IP4 208.73.144.71 813d53c0-0733-40af-9562-922ea19a7f5b t=0 0 813d53c0-0733-40af-9562-922ea19a7f5b m=audio 17916 RTP/AVP 0 101 813d53c0-0733-40af-9562-922ea19a7f5b a=rtpmap:0 PCMU/8000 813d53c0-0733-40af-9562-922ea19a7f5b a=rtpmap:101 telephone-event/8000 813d53c0-0733-40af-9562-922ea19a7f5b a=fmtp:101 0-15 813d53c0-0733-40af-9562-922ea19a7f5b a=maxptime:20 813d53c0-0733-40af-9562-922ea19a7f5b m=video 0 RTP/AVP 103 813d53c0-0733-40af-9562-922ea19a7f5b b=AS:1024 813d53c0-0733-40af-9562-922ea19a7f5b 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:4153 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[opus:116:48000:20:0:1] 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:4153 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G722:9:8000:20:64000:1] 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:4153 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1] 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:4208 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:4153 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1] 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:4069 Set telephone-event payload to 101@8000 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:2898 Set Codec sofia/external/8008000800 PCMU/8000 20 ms 160 samples 64000 bits 1 channels 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_codec.c:111 sofia/external/8008000800 Original read codec set to PCMU:0 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:4417 Set telephone-event payload to 101@8000 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:4473 sofia/external/8008000800 Set 2833 dtmf send payload to 101 recv payload to 101 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:6027 AUDIO RTP [sofia/external/8008000800] 208.115.55.11 port 22422 -> 208.73.144.71 port 17916 codec: 0 ms: 20 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_rtp.c:3793 Starting timer [soft] 160 bytes per 20ms 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:6326 sofia/external/8008000800 Set 2833 dtmf send payload to 101 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:6333 sofia/external/8008000800 Set 2833 dtmf receive payload to 101 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_core_media.c:6356 sofia/external/8008000800 Set rtp dtmf delay to 40 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [NOTICE] sofia_media.c:92 Pre-Answer sofia/external/8008000800! 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.788096 [DEBUG] switch_channel.c:3461 (sofia/external/8008000800) Callstate Change DOWN -> EARLY 813d53c0-0733-40af-9562-922ea19a7f5b 2016-08-23 18:22:33.828095 [DEBUG] switch_cpp.cpp:625 (sofia/external/8008000800) State Change CS_CONSUME_MEDIA -> CS_SOFT_EXECUTE After that nothing happens and this is my Lua command to start this call: local new_session = freeswitch.Session("[origination_caller_id_name=‘9009000900',origination_caller_id_number=‘9009000900']sofia/gateway/14_RINGCENTRAL/8008000800", session); Do you know what I can do to avoid this problem? Thank you, Leo