<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Brian,<br>
<br>
Thank you for the response, here is my test log and lua scripts:<br>
<br>
FS log:<br>
<br>
TEST 1 with USER_BUSY:<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:47.703732
[NOTICE] switch_channel.c:1050 New Channel
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.222.111.123:5060">sofia/external/011336444555555@199.222.111.123:5060</a>
[7638b7e2-e94c-4c34-95f1-10182919647a]<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:47.703732
[DEBUG] sofia_glue.c:2744
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.222.111.123:5060">sofia/external/011336444555555@199.222.111.123:5060</a> sending invite
version: 1.2.23 git 8821638 2014-05-06 19:06:11Z 64bit<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.323734
[DEBUG] sofia_glue.c:5282 Audio Codec Compare
[PCMU:0:8000:20:64000]/[PCMU:0:8000:20:64000]<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.323734
[DEBUG] sofia_glue.c:3190 Set Codec
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.222.111.123:5060">sofia/external/011336444555555@199.222.111.123:5060</a> PCMU/8000 20 ms
160 samples 64000 bits<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.323734
[DEBUG] sofia_glue.c:5442 Set 2833 dtmf send payload to 101<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.323734
[DEBUG] sofia_glue.c:3449 AUDIO RTP
[<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.222.111.123:5060">sofia/external/011336444555555@199.222.111.123:5060</a>] 202.60.204.225
port 31008 -> 209.58.46.132 port 11182 codec: 0 ms: 20<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.323734
[DEBUG] switch_rtp.c:2040 Starting timer [soft] 160 bytes per 20ms<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.323734
[DEBUG] sofia_glue.c:3716 Set 2833 dtmf send payload to 101<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.323734
[DEBUG] sofia_glue.c:3722 Set 2833 dtmf receive payload to 101<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.323734
[DEBUG] sofia_glue.c:3749
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.222.111.123:5060">sofia/external/011336444555555@199.222.111.123:5060</a> Set rtp dtmf
delay to 40<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.323734
[NOTICE] sofia_glue.c:4360 Pre-Answer
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.222.111.123:5060">sofia/external/011336444555555@199.222.111.123:5060</a>!<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.343734
[NOTICE] mod_dptools.c:2037 Enabling tone detection ring 400,440,480<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:49.403732
[DEBUG] switch_rtp.c:3757 Correct ip/port confirmed.<br>
2014-05-22 11:06:50.363734 [INFO] switch_cpp.cpp:1288 validate 1
mediaReady 0 336444555555<br>
2014-05-22 11:06:51.403733 [INFO] switch_cpp.cpp:1288 validate 1
mediaReady 1 336444555555<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:51.743733
[NOTICE] sofia.c:6681 Hangup
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.222.111.123:5060">sofia/external/011336444555555@199.222.111.123:5060</a>
[CS_SOFT_EXECUTE] [USER_BUSY]<br>
2014-05-22 11:06:51.763734 [INFO] switch_cpp.cpp:1288 validate 1
myHangupHook: SUCCESS<br>
2014-05-22 11:06:51.763734 [INFO] switch_cpp.cpp:1288 validate 1
mediaReadyNOT 2 336444555555<br>
2014-05-22 11:06:51.763734 [INFO] switch_cpp.cpp:1288 validate 1
After While SUCCESS 336444555555<br>
2014-05-22 11:06:51.763734 [INFO] switch_cpp.cpp:1288 validate 1
in_not_ready SUCCESS 336444555555<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:51.763734
[NOTICE] switch_core_session.c:1577 Session 1376
(<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.222.111.123:5060">sofia/external/011336444555555@199.222.111.123:5060</a>) Ended<br>
7638b7e2-e94c-4c34-95f1-10182919647a 2014-05-22 11:06:51.763734
[NOTICE] switch_core_session.c:1581 Close Channel
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.222.111.123:5060">sofia/external/011336444555555@199.222.111.123:5060</a> [CS_DESTROY]<br>
<br>
<br>
TEST 2 with USER_BUSY:<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:28.463733
[NOTICE] switch_channel.c:1050 New Channel
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.232.41.196:5060">sofia/external/011336444555555@199.232.41.196:5060</a>
[2f7fc23b-e31a-438c-89bd-562934c8ee18]<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:28.463733
[DEBUG] sofia_glue.c:2744
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.232.41.196:5060">sofia/external/011336444555555@199.232.41.196:5060</a> sending invite
version: 1.2.23 git 8821638 2014-05-06 19:06:11Z 64bit<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[DEBUG] sofia_glue.c:5282 Audio Codec Compare
[PCMU:0:8000:20:64000]/[PCMU:0:8000:20:64000]<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[DEBUG] sofia_glue.c:3190 Set Codec
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.232.41.196:5060">sofia/external/011336444555555@199.232.41.196:5060</a> PCMU/8000 20 ms
160 samples 64000 bits<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[DEBUG] sofia_glue.c:5442 Set 2833 dtmf send payload to 101<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[DEBUG] sofia_glue.c:3449 AUDIO RTP
[<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.232.41.196:5060">sofia/external/011336444555555@199.232.41.196:5060</a>] 202.60.204.225
port 21282 -> 209.58.46.132 port 21748 codec: 0 ms: 20<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[DEBUG] switch_rtp.c:2040 Starting timer [soft] 160 bytes per 20ms<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[DEBUG] sofia_glue.c:3716 Set 2833 dtmf send payload to 101<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[DEBUG] sofia_glue.c:3722 Set 2833 dtmf receive payload to 101<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[DEBUG] sofia_glue.c:3749
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.232.41.196:5060">sofia/external/011336444555555@199.232.41.196:5060</a> Set rtp dtmf
delay to 40<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[NOTICE] sofia_glue.c:4360 Pre-Answer
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.232.41.196:5060">sofia/external/011336444555555@199.232.41.196:5060</a>!<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:29.943733
[NOTICE] mod_dptools.c:2037 Enabling tone detection ring 400,440,480<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:30.003731
[DEBUG] switch_rtp.c:3757 Correct ip/port confirmed.<br>
2014-05-21 12:01:30.983705 [INFO] switch_cpp.cpp:1288 validate 1
mediaReady 0 336444555555<br>
2014-05-21 12:01:32.003733 [INFO] switch_cpp.cpp:1288 validate 1
mediaReady 1 336444555555<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:32.283734
[NOTICE] sofia.c:6681 Hangup
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.232.41.196:5060">sofia/external/011336444555555@199.232.41.196:5060</a> [CS_SOFT_EXECUTE]
[USER_BUSY]<br>
2014-05-21 12:01:32.303735 [INFO] switch_cpp.cpp:1288 validate 1
mediaReadyNOT 2 336444555555<br>
2014-05-21 12:01:32.303735 [INFO] switch_cpp.cpp:1288 validate 1
After While SUCCESS 336444555555<br>
2014-05-21 12:01:32.303735 [INFO] switch_cpp.cpp:1288 validate 1
in_not_ready SUCCESS 336444555555<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:32.303735
[NOTICE] switch_core_session.c:1577 Session 1310
(<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.232.41.196:5060">sofia/external/011336444555555@199.232.41.196:5060</a>) Ended<br>
2f7fc23b-e31a-438c-89bd-562934c8ee18 2014-05-21 12:01:32.303735
[NOTICE] switch_core_session.c:1581 Close Channel
<a class="moz-txt-link-abbreviated" href="mailto:sofia/external/011336444555555@199.232.41.196:5060">sofia/external/011336444555555@199.232.41.196:5060</a> [CS_DESTROY]<br>
<br>
<br>
Lua script:<br>
<br>
new_session =
freeswitch.Session("{origination_caller_id_number=anonymous,ignore_early_media=false}sofia/external/011"..dest.."@199.222.111.123:5060");<br>
uuid = new_session:get_uuid();<br>
new_session:execute("tone_detect", "ring 400,440,480 r
+10000 hangup 'normal_unspecified' 2");<br>
<br>
new_session:execute("sched_hangup", "+5 alloted_timeout");<br>
local test = "setHC";<br>
new_session:setHangupHook("myHangupHook", "test")<br>
<br>
i = 0;<br>
while(new_session:ready() == true) do <br>
new_session:sleep(500);<br>
if(new_session:mediaReady() == true) then<br>
new_session:sleep(500);<br>
mylog("mediaReady "..i.." "..dest);<br>
else<br>
mylog("mediaReadyNOT "..i.." "..dest);<br>
end<br>
if(new_session:answered() == true) then<br>
new_session:hangup();<br>
new_session:destroy();<br>
mylog("answered "..new_session:hangupCause().."
"..dest);<br>
break;<br>
end<br>
i = i + 1;<br>
end<br>
mylog("After While "..new_session:hangupCause().." "..dest);<br>
<br>
if(new_session:ready() == true) then<br>
new_session:hangup();<br>
new_session:destroy();<br>
mylog("in_ready "..new_session:hangupCause().."
"..dest);<br>
valid = 2;<br>
else<br>
local obCause = new_session:hangupCause();<br>
mylog("in_not_ready "..obCause.." "..dest);<br>
<br>
<br>
function myHangupHook(s, status, arg)<br>
hangupCause = s:hangupCause();<br>
mylog("myHangupHook: " .. hangupCause)<br>
error();<br>
end<br>
<br>
function mylog(s)<br>
freeswitch.consoleLog("info", "validate "..gid.." " .. s.."\n");<br>
end<br>
<br>
<br>
Regards,<br>
Ashou Han<br>
<br>
<br>
<div class="moz-cite-prefix">On 6/26/2014 5:57 PM, Brian West wrote:<br>
</div>
<blockquote
cite="mid:4DA08D1A-3784-41AF-A12D-C611F74D1639@freeswitch.org"
type="cite">Then it may not even be a bug, How are you doing this
first what methods and what not are you using to make these calls,
can you post us a sample script?<br>
<div>--<br>
Brian West<br>
<a moz-do-not-send="true" href="mailto:brian@freeswitch.org">brian@freeswitch.org</a><br>
<br>
<span><img apple-inline="yes"
id="DD110BB3-4FA4-4C0A-B156-7B366653ED23" apple-width="yes"
apple-height="yes"
src="cid:part2.01000901.04000502@mobile-sphere.com"
height="73" width="240"></span><br>
<br>
Twitter: @FreeSWITCH , @briankwest<br>
<a class="moz-txt-link-freetext" href="http://www.freeswitchbook.com">http://www.freeswitchbook.com</a><br>
<a class="moz-txt-link-freetext" href="http://www.freeswitchcookbook.com">http://www.freeswitchcookbook.com</a><br>
<br>
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST<br>
iNUM: +883 5100 1420 9001<br>
ISN: 410*543<br>
<a class="moz-txt-link-freetext" href="Skype:briankwest">Skype:briankwest</a><br>
PGP Key: <a class="moz-txt-link-freetext" href="http://www.bkw.org/key.txt">http://www.bkw.org/key.txt</a> (AB93356707C76CED)<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
<br>
On Jun 26, 2014, at 2:46 PM, Ashou Han <<a
moz-do-not-send="true" href="mailto:ashou@mobile-sphere.com">ashou@mobile-sphere.com</a>>
wrote:<br>
<br>
<blockquote type="cite">Hi there,<br>
<br>
There is a bug for Lua, that the hangup cause not updated once <br>
originated the call.<br>
<br>
I originated a call to my opensips proxy with a 183 back, lua <br>
hangupCause return SUCCESS, but few seconds later the far end
carrier <br>
return USER_BUSY (see this in the DEBUG log). But
session:hangupCause() <br>
still return SUCCESS, not the updated cause: USER_BUSY.<br>
<br>
FS version:<br>
<br>
FreeSWITCH Version 1.2.22+git~20140309T154101Z~455941d369~64bit
(git <br>
455941d 2014-03-09 15:41:01Z 64bit)<br>
<br>
FreeSWITCH Version 1.2.23+git~20140506T190611Z~88216387e0~64bit
(git <br>
8821638 2014-05-06 19:06:11Z 64bit)<br>
<br>
FreeSWITCH Version 1.2.10+git~20130628T211259Z~e29731d673 (git
e29731d <br>
2013-06-28 21:12:59Z)<br>
<br>
All have the same bug!<br>
<br>
Thanks,<br>
Ashou Han<br>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
<br>
</body>
</html>