No subject


Fri Jul 27 11:28:03 CEST 2007


when the call stayed blank, the debug message
"number is now 98" was not printed, meaning it did not get into that state.

Can someone please explain me when can this happen or am I missing something
in my code.

The snippet of my code is pasted below:

void RoamingDialog::onSessionStart(const AmSipRequest& req)
{
    DBG("RoamingDialog::onSessionStart");

    AmB2BCallerSession::onSessionStart(req);

    setInOut(&playlist, &playlist);
    addToPlaylist(RoamingFactory::InitialAnnouncement);

    setDtmfDetectionEnabled(true);
}

void RoamingDialog::onDtmf(int event, int duration) {
   playlist.close();

  switch (state) {
  case CC_Collecting_Number:
    if(event <10) {
      number +=int2str(event);
      DBG("number is now '%s'\n", number.c_str());
    } else {
      if (getCalleeStatus() == None) {
        state = CC_Dialing;
         connectCallee(number + " <sip:" +
number+RoamingFactory::ConnectSuffix + ">",
                      "sip:"+number+RoamingFactory::ConnectSuffix);
        addToPlaylist(RoamingFactory::Dialing);
      }
    }   break;
    case CC_Dialing:
    case CC_Connected:
  default: break;
  };
}



Thanks in advance,

w/regards,
Jayesh

------=_Part_12760_9955029.1189438936452
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi All,<br>I have modified the code of mycc application according to my requirements. Actually I did not require any pin authentication etc so I modified it and made a single file called roaming.cpp<br>I have a problem with consistent working of the code. The scenario is as follows:
<br>I dial an access number and enter sems invoking the application roaming.cpp which is very similar to mycc.cpp.<br>Then the hello.wav is played. After I start entering the dtmf and press the pound key the call goes sometimes and at other times it stays blank. I tried to debug this and found that sometimes the code just does not enter the CC_Collecting_number state.
<br><br>The debug when the call was successful:<br>(25185) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying to post event<br>(25185) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event posted<br>(25185) DEBUG: processEvents (
AmEventQueue.cpp:69): before processing event<br>(25185) DEBUG: process (Roaming.cpp:126): RoamingDialog::process<br>(25185) DEBUG: process (AmSession.cpp:419): AmSession::process<br>(25185) DEBUG: process (AmSession.cpp:437): Session received DTMF, event = 8, duration = 100
<br>(25185) DEBUG: onDtmf (Roaming.cpp:108): <span style="font-weight: bold;">number is now &#39;98&#39;</span><br>(25185) DEBUG: processEvents (AmEventQueue.cpp:71): event processed<br>(25185) DEBUG: run (AmSession.cpp:294): 
<a href="mailto:0f6b47ea0c8b3518126b1f2b6cf3ac98 at 207.251.84.111">0f6b47ea0c8b3518126b1f2b6cf3ac98 at 207.251.84.111</a> dlg.getUACTransPending() = 0<br><br>The debug when the call stayed blank:<br>(25185) DEBUG: postEvent (AmEventQueue.cpp
:48): AmEventQueue: trying to post event<br>(25185) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event posted<br>(25185) DEBUG: processEvents (AmEventQueue.cpp:69): before processing event<br>(25185) DEBUG: process (
Roaming.cpp:126): RoamingDialog::process<br>(25185) DEBUG: process (AmSession.cpp:419): AmSession::process<br>(25185) DEBUG: process (AmSession.cpp:437): Session received DTMF, event = 9, duration = 99<br>(25185) DEBUG: processEvents (
AmEventQueue.cpp:71): event processed<br>(25185) DEBUG: run (AmSession.cpp:294): <a href="mailto:385c512e16ac405d7581a00848ac9470 at 207.251.84.111">385c512e16ac405d7581a00848ac9470 at 207.251.84.111</a> dlg.getUACTransPending() = 0
<br><br><br>From my observation, the dtmf event is being processed in both the cases but when the call stayed blank, the debug message <br>&quot;number is now 98&quot; was not printed, meaning it did not get into that state.
<br><br>Can someone please explain me when can this happen or am I missing something in my code.<br><br>The snippet of my code is pasted below:<br><br>void RoamingDialog::onSessionStart(const AmSipRequest&amp; req)<br>{<br>
&nbsp;&nbsp;&nbsp; DBG(&quot;RoamingDialog::onSessionStart&quot;);<br><br>&nbsp;&nbsp;&nbsp; AmB2BCallerSession::onSessionStart(req);<br><br>&nbsp;&nbsp;&nbsp; setInOut(&amp;playlist, &amp;playlist);<br>&nbsp;&nbsp;&nbsp; addToPlaylist(RoamingFactory::InitialAnnouncement);<br>&nbsp;<br>
&nbsp;&nbsp;&nbsp; setDtmfDetectionEnabled(true);<br>}<br><br>void RoamingDialog::onDtmf(int event, int duration) {<br>&nbsp;&nbsp; playlist.close();<br><br>&nbsp; switch (state) {<br>&nbsp; case CC_Collecting_Number:<br>&nbsp;&nbsp;&nbsp; if(event &lt;10) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number +=int2str(event);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBG(&quot;number is now &#39;%s&#39;\n&quot;, number.c_str());<br>&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (getCalleeStatus() == None) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state = CC_Dialing;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connectCallee(number + &quot; &lt;sip:&quot; + number+RoamingFactory::ConnectSuffix + &quot;&gt;&quot;,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;sip:&quot;+number+RoamingFactory::ConnectSuffix);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addToPlaylist(RoamingFactory::Dialing);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; case CC_Dialing:<br>&nbsp;&nbsp;&nbsp; case CC_Connected:<br>&nbsp; default: break;
<br>&nbsp; };<br>}<br><br><br><br>Thanks in advance,<br><br>w/regards,<br>Jayesh<br>

------=_Part_12760_9955029.1189438936452--


More information about the Sems mailing list