[Freeswitch-users] Fwd: mod_opal - call charged before H.225 connect
Georgiewskiy Yuriy
bottleman at icf.org.ru
Fri Oct 23 08:17:47 PDT 2009
On 2009-10-23 16:57 +0200, Tihomir Culjaga wrote freeswitch-users at lists.fre...:
i have question to developers about one proce in fs
src/switch_ivr_originate.c
static switch_status_t originate_on_consume_media_transmit(switch_core_session_t *session)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
if (!switch_channel_test_flag(channel, CF_PROXY_MODE)) {
while (switch_channel_get_state(channel) == CS_CONSUME_MEDIA && !switch_channel_test_flag(chann
if (!switch_channel_media_ready(channel)) {
switch_yield(10000);
} else {
switch_ivr_sleep(session, 10, SWITCH_FALSE, NULL);
}
}
}
switch_channel_clear_state_handler(channel, &originate_state_handlers);
return SWITCH_STATUS_FALSE;
}
what exacly it do?
call scheme like this sip->fs->h323->gk->h323(on same fs)->fs(same too) and there i have no audio issues.
if bridge connect while it sleep i have audio, if it not sleep while bridge connect i have no audio.
TC>a solution to H323 endpoint => FS => SIP user no audio issue
TC>
TC>is to disable a wait for tx Audio ... for case
TC>SWITCH_MESSAGE_INDICATE_ANSWER:{
TC>
TC>//m_txAudioOpened.Wait();
TC>
TC>
TC> case SWITCH_MESSAGE_INDICATE_ANSWER:{
TC>
TC> switch_log_printf(SWITCH_CHANNEL_LOG,
TC>SWITCH_LOG_CONSOLE, "ANSWER: we got Answer event\n");
TC>
TC> if (switch_channel_test_flag(channel, CF_OUTBOUND))
TC>{
TC>
TC> switch_log_printf(SWITCH_CHANNEL_LOG,
TC>SWITCH_LOG_CONSOLE, "ANSWER: we got Answer event - CF_OUTBOUND
TC>\n");
TC> return SWITCH_STATUS_FALSE;
TC> }
TC> AnsweringCall(H323Connection::AnswerCallNow);
TC>
TC> switch_log_printf(SWITCH_CHANNEL_LOG,
TC>SWITCH_LOG_CONSOLE, "ANSWER: suppose the call is Answered Now\n");
TC> PTRACE(4, "mod_h323\tMedia started on connection "
TC><< *this);
TC>
TC> // test
TC> //switch_channel_mark_answered(m_fsChannel);
TC>
TC> m_rxAudioOpened.Wait();
TC> switch_log_printf(SWITCH_CHANNEL_LOG,
TC>SWITCH_LOG_CONSOLE, "ANSWER: wait for m_rxAudioOpened\n");
TC> //m_txAudioOpened.Wait();
TC> switch_log_printf(SWITCH_CHANNEL_LOG,
TC>SWITCH_LOG_CONSOLE, "ANSWER: we disable wait for m_txAudioOpened\n");
TC>
TC> switch_log_printf(SWITCH_CHANNEL_LOG,
TC>SWITCH_LOG_CONSOLE, "ANSWER: were waiting for rx/tx AudioOpen\n");
TC>
TC> if (!switch_channel_test_flag(m_fsChannel,
TC>CF_EARLY_MEDIA)) {
TC>
TC> switch_log_printf(SWITCH_CHANNEL_LOG,
TC>SWITCH_LOG_CONSOLE, "ANSWER: we have early media\n");
TC>
TC> PTRACE(4,
TC>"mod_h323\t-------------------->switch_channel_mark_answered(m_fsChannel) "
TC><< *this);
TC> switch_channel_mark_answered(m_fsChannel);
TC> switch_log_printf(SWITCH_CHANNEL_LOG,
TC>SWITCH_LOG_CONSOLE, "ANSWER: answered in early Media\n");
TC> }
TC> break;
TC> }
TC>
TC>
TC>Now, I'm able to both originate and terminate cals with 2-way audio...
TC>the signaling looks correct...
TC>
TC>
TC>
TC>outgoing:
TC>
TC>1369.425046 10.4.62.7 -> 10.4.62.89 SIP/SDP Request: INVITE
TC>sip:1001 at 10.4.62.89 <sip%3A1001 at 10.4.62.89>;transport=udp, with session
TC>description
TC>1369.426255 10.4.62.7 -> 10.4.62.31 H.225.0 CS: alerting
TC>1369.435950 10.4.62.89 -> 10.4.62.7 SIP Status: 100 Trying
TC>1369.449065 10.4.62.89 -> 10.4.62.7 SIP Status: 180 Ringing
TC>1369.605109 10.4.62.7 -> 10.4.62.31 H.225.0 CS: progress
TC>OpenLogicalChannel
TC>1369.609788 10.4.62.31 -> 10.4.62.7 H.225.0/H.245 CS: facility
TC>terminalCapabilitySet
TC>1369.610489 10.4.62.31 -> 10.4.62.7 H.225.0/H.245 CS: facility
TC>masterSlaveDetermination
TC>1369.619071 10.4.62.7 -> 10.4.62.31 H.225.0/H.245 CS: empty
TC>terminalCapabilitySet
TC>1369.620349 10.4.62.7 -> 10.4.62.31 H.225.0/H.245 CS: empty
TC>terminalCapabilitySetAck
TC>1369.623215 10.4.62.31 -> 10.4.62.7 H.225.0/H.245 CS: facility
TC>terminalCapabilitySetAck
TC>1369.625591 10.4.62.7 -> 10.4.62.31 H.225.0/H.245 CS: empty
TC>masterSlaveDeterminationAck
TC>1369.628174 10.4.62.31 -> 10.4.62.7 H.225.0/H.245 CS: facility
TC>masterSlaveDeterminationAck
TC>1370.966958 10.4.62.89 -> 10.4.62.7 SIP/SDP Status: 200 OK, with
TC>session description
TC>1370.967431 10.4.62.7 -> 10.4.62.89 SIP Request: ACK
TC>sip:1001 at 10.4.62.89 <sip%3A1001 at 10.4.62.89>;transport=udp
TC>1370.975172 10.4.62.7 -> 10.4.62.31 H.225.0 CS: connect
TC>1372.354383 10.4.62.89 -> 10.4.62.7 SIP Request: BYE
TC>sip:mod_sofia at 10.4.62.7:5060
TC>1372.355147 10.4.62.7 -> 10.4.62.89 SIP Status: 200 OK
TC>1372.392904 10.4.62.7 -> 10.4.62.31 H.225.0/H.245 CS: releaseComplete
TC>endSessionCommand
TC>1372.397302 10.4.62.31 -> 10.4.62.7 H.225.0 CS: releaseComplete
TC>
TC>
TC>incoming:
TC>
TC>
TC>1502.817154 10.4.62.31 -> 10.4.62.7 H.225.0 CS: setup
TC>OpenLogicalChannel
TC>1502.833732 10.4.62.7 -> 10.4.62.31 H.225.0 CS: callProceeding
TC>1502.850909 10.4.62.7 -> 10.4.62.89 SIP/SDP Request: INVITE
TC>sip:1001 at 10.4.62.89 <sip%3A1001 at 10.4.62.89>;transport=udp, with session
TC>description
TC>1502.851758 10.4.62.7 -> 10.4.62.31 H.225.0 CS: alerting
TC>1502.861828 10.4.62.89 -> 10.4.62.7 SIP Status: 100 Trying
TC>1502.875127 10.4.62.89 -> 10.4.62.7 SIP Status: 180 Ringing
TC>1503.033258 10.4.62.7 -> 10.4.62.31 H.225.0 CS: progress
TC>OpenLogicalChannel
TC>1503.037908 10.4.62.31 -> 10.4.62.7 H.225.0/H.245 CS: facility
TC>terminalCapabilitySet
TC>1503.038608 10.4.62.31 -> 10.4.62.7 H.225.0/H.245 CS: facility
TC>masterSlaveDetermination
TC>1503.050154 10.4.62.7 -> 10.4.62.31 H.225.0/H.245 CS: empty
TC>terminalCapabilitySet
TC>1503.051381 10.4.62.7 -> 10.4.62.31 H.225.0/H.245 CS: empty
TC>terminalCapabilitySetAck
TC>1503.054297 10.4.62.31 -> 10.4.62.7 H.225.0/H.245 CS: facility
TC>terminalCapabilitySetAck
TC>1503.054917 10.4.62.7 -> 10.4.62.31 H.225.0/H.245 CS: empty
TC>masterSlaveDeterminationAck
TC>1503.057933 10.4.62.31 -> 10.4.62.7 H.225.0/H.245 CS: facility
TC>masterSlaveDeterminationAck
TC>1505.485493 10.4.62.89 -> 10.4.62.7 SIP/SDP Status: 200 OK, with
TC>session description
TC>1505.486018 10.4.62.7 -> 10.4.62.89 SIP Request: ACK
TC>sip:1001 at 10.4.62.89 <sip%3A1001 at 10.4.62.89>;transport=udp
TC>1505.493611 10.4.62.7 -> 10.4.62.31 H.225.0 CS: connect
TC>1509.565959 10.4.62.89 -> 10.4.62.7 SIP Request: BYE
TC>sip:mod_sofia at 10.4.62.7:5060
TC>1509.566722 10.4.62.7 -> 10.4.62.89 SIP Status: 200 OK
TC>1509.577435 10.4.62.7 -> 10.4.62.31 H.225.0/H.245 CS: releaseComplete
TC>endSessionCommand
TC>1509.582066 10.4.62.31 -> 10.4.62.7 H.225.0 CS: releaseComplete
TC>
TC>
TC>
TC>... i still need to check the CDRs as well but here we are :)
TC>
can you send a diff? in you call scheme call from h323 endpoint to fs is not have RAS?,
because i don't have no audio issues in transit from h323 to sip, but my calls a going
thorough GK and fs is regitered on them, my call scheme is h323ep-RAS->GK-RAS->fs.
C уважением With Best Regards
Георгиевский Юрий. Georgiewskiy Yuriy
+7 4872 711666 +7 4872 711666
факс +7 4872 711143 fax +7 4872 711143
Компания ООО "Ай Ти Сервис" IT Service Ltd
http://nkoort.ru http://nkoort.ru
JID: GHhost at jabber.tula-ix.net.ru JID: GHhost at jabber.tula-ix.net.ru
YG129-RIPE YG129-RIPE
More information about the FreeSWITCH-users
mailing list