[Freeswitch-dev] freetdm + sangoma analog card A400,hangup problem

openser openser at yeah.net
Wed Oct 23 20:39:26 MSD 2013


Hi all,
recently, I use sangoma A400 analog  for outgoing call, the flow is internal sip phone-> FXO->pstn.
but, when the pstn side hangup first, the sip phone never be hangup, i search here and there, i also try use 
tone_detect app in dialplan , but ,still it can not detect busy tone,  below is my dialplan:


 <action application="set" data="sip_h_X-accountcode=${accountcode}" />
  5         <action application="pre_answer"/>
  7         <action application="tone_detect" data="busy 450 r 0 hangup 'normal_clearing'  4"/>
  8        <action application="set" data="sip_h_X-Tag=" />
  9        <action application="set" data="call_direction=outbound" />
 10        <action application="set" data="hangup_after_bridge=true" />
 11        <action application="set" data="inherit_codec=true" />
 12        <action application="set" data="continue_on_fail=true" />
 13        <action application="bridge" data="freetdm/FXO/a/$1" /> 


my country busy tone frequency is 450, i never see detect busy tone in freeswitch log,  what's  more, when pstn side (modile )
hangup, the sip softphone will play  DEFTONES continuly( filer rtp with wirshark, i cant play DEFTONES ) , but the call session never clear and no hangup signal got in freeswitch log.


i check ftdm_io.c ,in function ftdm_channel_process_media, it will detect tone, but from freeswitch log, i can only see Dial tone be 
detect, below is code snap:
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_PROGRESS_DETECT) && !ftdm_channel_test_feature(ftdmchan, FTDM_CHANNEL_FEATURE_PROGRESS)) {
uint32_t i;


for (i = 1; i < FTDM_TONEMAP_INVALID; i++) {
if (ftdmchan->span->tone_finder[i].tone_count) {
if (ftdmchan->needed_tones[i] && teletone_multi_tone_detect(&ftdmchan->span->tone_finder[i], sln, (int)slen)) {
if (++ftdmchan->detected_tones[i]) {
ftdmchan->needed_tones[i] = 0;
ftdmchan->detected_tones[0]++;
}
}
}
}
}


I know that , in asterisk , the zaptel have several option in deal with disconect surpervision, but it seems little in freetdm.


any  prompt is grateful!
thanks.
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20131024/b2451727/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-dev mailing list