Thank you, Jaroslav!!!

I found an e mail sent by Alexander were he says that adding a new codec could 
take about two days or a week. then, i thought it was not much difficult.

The encoder and decoder are already implemented because i am using voice Age 
implementation. Then, i proceeded in a similar way as for GSM implementation 
creating MpeG729 and MpdG729 clases, and other modifications in SipXmediaLib.

After doing this, i cannot make it ito work, thats why i thought that maybe i 
am not modifying all the classes i should. 

Any help appreciated.

Regards,
Mariana.



----- Original Message ----
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, March 2, 2007 9:45:03 PM
Subject: sipxtapi-dev Digest, Vol 8, Issue 5

Send sipxtapi-dev mailing list submissions to
    [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
    https://list.sipfoundry.org/mailman/listinfo/sipxtapi-dev
or, via email, send a message with subject or body 'help' to
    [EMAIL PROTECTED]

You can reach the person managing the list at
    [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of sipxtapi-dev digest..."

[please change the subject line when replying]
Today's Topics:

   1. Re: 407 proxy authentication (logan)
   2. Re: leak+crash - SipRefreshMgr::rescheduleRequest timer isn't
      deleted ([EMAIL PROTECTED])
   3. Re: Crash in sipxInitialize (debug build)
      ([EMAIL PROTECTED])
   4. Re: leak+crash -    SipRefreshMgr::rescheduleRequest    timer isn't
      deleted (Dale R. Worley)
   5. Re: leak+crash - SipRefreshMgr::rescheduleRequest timer isn't
      deleted ([EMAIL PROTECTED])
   6. Help for G729 patch (Mariana Draper)
   7. How to use SipXtackLib as a SIP stack?? (Dien Ba Quang)
   8. Re: Help for G729 patch ([EMAIL PROTECTED])

Content-Transfer-Encoding: 7bit
From: "logan" <[EMAIL PROTECTED]>
Precedence: list
MIME-Version: 1.0
To: "Dale R. Worley" <[EMAIL PROTECTED]>,
    "Sipxtapi-Dev" <[email protected]>
References: <[EMAIL PROTECTED]>
    <[EMAIL PROTECTED]>
Date: Fri, 2 Mar 2007 23:40:28 +0530
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
    reply-type=original
Subject: Re: [sipxtapi-dev] 407 proxy authentication
Message: 1


Hello,

Yes, they are correct. Other UA's are able to register against the same 
server with the same credentials, I will send the traces of their successful 
registration later tonight.

Thanks,
Hitesh

----- Original Message ----- 
From: "Dale R. Worley" <[EMAIL PROTECTED]>
To: "Sipxtapi-Dev" <[email protected]>
Sent: Friday, March 02, 2007 9:24 PM
Subject: Re: [sipxtapi-dev] 407 proxy authentication


> On Fri, 2007-03-02 at 19:08 +0530, logan wrote:
>> sipXtapi fails to register against the servers which ask for a proxy
>> authentication (407 response). Attached is the Ethereal trace and logs
>> of one such atc. Does anyone has a fix for this?
>
> Have you provided registration credentials?  Are you sure that the
> credentials are considered valid by the proxy?
>
> Dale
>
>
> _______________________________________________
> sipxtapi-dev mailing list
> [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
> 



Content-Transfer-Encoding: 7bit
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Precedence: list
MIME-Version: 1.0
To: [email protected]
References: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
Date: Fri, 02 Mar 2007 19:40:30 +0100
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Subject: Re: [sipxtapi-dev] leak+crash - SipRefreshMgr::rescheduleRequest
    timer isn't deleted
Message: 2


[EMAIL PROTECTED] wrote:
> I have a problem with unitializing sipxtapi that occurs maybe 5% of the 
> time. It crashes in OsTimerTask.
>
> When we call destroyTimerTask in sipxtapi uninitialize, a message is 
> sent to timertask to shut it down. Before it is fully shut down, in 
> handlemessage we empty the timer queue, so the timers arent fired in the 
> OsTimerTask::run just before we exit the loop.
> This would work if at the time of sending shutdown message we were 
> blocked in receiveMessage in OsTimerTask.
>
> But it can occur, that due to processing of previous message we are just 
> about to fire timers. There shouldn't be any timers left at the time we 
> call destroyTimerTask, but unfortunately there is one left - the one(or 
> even more) created in SipRefreshMgr::rescheduleRequest which isn't 
> deleted at all and is in timer queue in OsTimerTask during call of 
> destroyTimerTask. Of course the message queue of these timers is invalid 
> and when we try to send a message to it, it crashes.
>
> I used __FUNCTION__ macro as OsTimer constructor parameter (and remember 
> the value inside timer) to track down these unruly timers.
>
> This bug is very bad, because it not only causes a crash, but also a 
> memory leak in SipXTackLib. In SipRefreshMgr::rescheduleRequest we 
> create new timer on the line
>
> // Make a copy for the timer
> SipMessage* timerRegisterMessage = new SipMessage(*request);
>
> OsTimer* timer = new OsTimer(&mIncomingQ, (int)timerRegisterMessage
> mpTimer = timer;
>
> but then we assign it to mpTimer which is a class member variable, thus 
> we lose pointer to old OsTimer if we use 2 or more lines. Since we have 
> no pointer to it we can't delete it, but we don't even delete the one 
> mpTimer we have in destructor.
>
> So this leaks not only 1 OsTimer instance per line, but also the 
> associated SipMessage copy. I was wondering where the leaked SipMessages 
> come from that show up at shutdown of my program, I thought they were 
> from singletons or something but it seems this is the reason, as I do 
> sipxreinitialize if I want to switch sip profile to register with 
> another provider.
>
>
> Jaroslav Libak
>
> _______________________________________________
> sipxtapi-dev mailing list
> [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
>
>   
To be more precise, the timer and message aren't deleted if the timer is 
never fired due to shutdown or sipxtapi reinitialization.
If timer fires and is received by handlemessage in SipRefreshMgr then it 
and the message are deleted.

I think it would be sufficient to store all the timers somewhere (minus 
those that got deleted in handlemessage) and delete them in destructor. 
What do you think?

I noticed there is also SipRefreshManager class that should replace this 
old buggy manager. When is that about to happen?


Content-Transfer-Encoding: 7bit
From: [EMAIL PROTECTED]
Precedence: list
To: [email protected]
Date: Fri, 2 Mar 2007 15:33:07
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain;
    charset="iso-8859-1"
Subject: Re: [sipxtapi-dev] Crash in sipxInitialize (debug build)
Message: 3


Hello,

> I don't use DirectX SDK, between where is it needed?
>From http://sipx-
wiki.calivia.com/index.php/SipXtapi_and_sipXezPhone_Build_Environment_for_Windows#Installing_Mi
crosoft_Visual_Studio 
"Microsoft DirectX is used for video support. In order to build sipXtacklib 
DirectX has to be installed 
even if building "Debug_NoVideo" (this is most likely a bug in the build 
system). The DirectX SDK can 
be downloaded from Microsoft for free." 

But I found my major source of problems. Something related to the "strdup" 
use... I'm solving lots of 
crashes by replacing strdup by malloc+strcpy.
Google it by "strdup _CrtIsValidHeapPointer"

Eg. UtlTokenizer.cpp module:

UtlTokenizer::UtlTokenizer(const UtlString& tokens)
{
//    m_tokens = (char *)strdup(tokens.data());
    m_tokens = (char *)malloc(strlen(tokens.data())+1);
    strcpy(m_tokens,tokens.data());
    m_tokenPosition = 0;
}

// Destructor
UtlTokenizer::~UtlTokenizer()
{
    free(m_tokens);
}

Thanks,
Evandro

>Hello,
>
>Yes, I use VS 2003. And, I don't use DirectX SDK, between where is it 
>needed?
>
>Thanks,
>Hitesh
>
    .





Content-Transfer-Encoding: 7bit
From: "Dale R. Worley" <[EMAIL PROTECTED]>
Precedence: list
MIME-Version: 1.0
To: Sipxtapi-Dev <[email protected]>
References: <[EMAIL PROTECTED]>  <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
Date: Fri, 02 Mar 2007 16:15:51 -0500
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain
Subject: Re: [sipxtapi-dev] leak+crash -
    SipRefreshMgr::rescheduleRequest    timer isn't deleted
Message: 4


On Fri, 2007-03-02 at 19:40 +0100, [EMAIL PROTECTED] wrote:
> [EMAIL PROTECTED] wrote:
> > I have a problem with unitializing sipxtapi that occurs maybe 5% of the 
> > time. It crashes in OsTimerTask.

Is sipXtapi's OsTimerTask the same as the one in the main sipX?  There
have been a lot of fixes to OsTimer over the last year.

Dale




From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Precedence: list
MIME-Version: 1.0
To: [email protected]
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
    <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
Date: Fri, 02 Mar 2007 22:50:10 +0100
Message-ID: <[EMAIL PROTECTED]>
Content-Type: multipart/mixed; boundary="------------010205040901080601020207"
Subject: Re: [sipxtapi-dev] leak+crash - SipRefreshMgr::rescheduleRequest
    timer isn't deleted
Message: 5


Dale R. Worley wrote:
> On Fri, 2007-03-02 at 19:40 +0100, [EMAIL PROTECTED] wrote:
>   
>> [EMAIL PROTECTED] wrote:
>>     
>>> I have a problem with unitializing sipxtapi that occurs maybe 5% of the 
>>> time. It crashes in OsTimerTask.
>>>       
>
> Is sipXtapi's OsTimerTask the same as the one in the main sipX?  There
> have been a lot of fixes to OsTimer over the last year.
>
> Dale
>
>
> _______________________________________________
> sipxtapi-dev mailing list
> [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
>
>   
Alexander Chemeris merged all available sipxportlib revisions into 
sipxtapi branch. Sipxtacklib isn't fully merged yet.
The problem isn't in OsTimerTask, but in SipRefreshMgr. I attached a 
patch that solves the problem.

Timers (+messages) that got fired were deleted but timers that werent 
fired because sipxreinitialize or uninitialize was called werent 
deleted. This patch puts all new timers into a UtlHashbag, and removes 
them from it once they fire.

 From what I have seen in SipRefreshManager.h it seems SipRefreshMgr 
will be replaced so this patch should be sufficient.


Jaroslav Libak


diff -ru old/sipXtackLib/include/net/SipRefreshMgr.h 
new/sipXtackLib/include/net/SipRefreshMgr.h
--- old/sipXtackLib/include/net/SipRefreshMgr.h    Fri Mar  2 20:12:03 2007
+++ new/sipXtackLib/include/net/SipRefreshMgr.h    Fri Mar  2 19:56:02 2007
@@ -138,12 +138,7 @@
     void dumpMessageLists(UtlString& results) ;
       //:Appends the message contents of both the mRegisterList and 
       // mSubscribeList
-
-    OsTimer* getTimer()
-    {
-        return mpTimer;
-    }
-    
+  
     virtual ~SipRefreshMgr();
 
     virtual UtlBoolean handleMessage( OsMsg& eventMessage );
@@ -311,7 +306,7 @@
     int mUdpPort;
     int mRestartCount;
     UtlRandom mRandomNumGenerator ;
-    OsTimer* mpTimer;
+    UtlHashBag mTimerBag;
 };
 
 #endif // SIPREFRESHMGR_H
diff -ru old/sipXtackLib/src/net/SipRefreshMgr.cpp 
new/sipXtackLib/src/net/SipRefreshMgr.cpp
--- old/sipXtackLib/src/net/SipRefreshMgr.cpp    Fri Mar  2 20:11:21 2007
+++ new/sipXtackLib/src/net/SipRefreshMgr.cpp    Fri Mar  2 19:56:22 2007
@@ -62,8 +62,7 @@
     mIsStarted(FALSE),
     mObserverMutex(OsRWMutex::Q_FIFO),
     mUAReadyMutex(OsRWMutex::Q_FIFO),
-    mMyUserAgent(NULL),
-    mpTimer(NULL)
+    mMyUserAgent(NULL)
 {
 }
 
@@ -83,6 +82,17 @@
         mMessageObservers.remove(pObserver) ;
         delete pObserver ;
     }
+
+    // delete all unfired timers and their SipMessages
+    UtlHashBagIterator timerIterator(mTimerBag) ;
+    while (OsTimer* pTimer = (OsTimer*) timerIterator())
+    {
+       SipMessage *pMessage = (SipMessage *)pTimer->getUserData();
+       // get rid of them
+       delete pMessage;
+       delete pTimer;
+    }
+    mTimerBag.removeAll();
 }
 
 /*===================================================================*/
@@ -799,8 +809,8 @@
         // Make a copy for the timer
         SipMessage* timerRegisterMessage = new SipMessage(*request);
 
-        OsTimer* timer = new OsTimer(&mIncomingQ, (int)timerRegisterMessage);
-        mpTimer = timer;
+        OsTimer* timer = new OsTimer(&mIncomingQ, (int)timerRegisterMessage);
+        mTimerBag.insert(timer);
 
         int maxSipTransactionTimeSecs = 
             (mMyUserAgent->getSipStateTransactionTimeout()/1000);
@@ -1443,6 +1453,8 @@
 
         if ( timer )
         {
+            // remove timer from mTimerBag
+            mTimerBag.removeReference(timer);
             delete timer;
             timer = NULL;
         }

From: Mariana Draper <[EMAIL PROTECTED]>
Precedence: list
MIME-Version: 1.0
To: [email protected]
Date: Fri, 2 Mar 2007 13:57:31 -0800 (PST)
Message-ID: <[EMAIL PROTECTED]>
Content-Type: multipart/alternative; boundary="0-1781436421-1172872651=:171"
Subject: [sipxtapi-dev] Help for G729 patch
Message: 6


Hi,

I am working on a patch for sipXezphone, adding support for g729 using the 
encoder and decoder from Voice Age. I have been trying but i still cannot make 
it to work..

My question is: does anyone know which clases of the sipXezPhone shuld I deal 
with? I am not very familiar with the whole project. Maybe someone knows some 
of the classes were i should modify something so as to add another codec.

Of course when i finish this implementation, i will send it to all of you :)

Thank you very much!
Mariana.





Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! 
Games.Content-Transfer-Encoding: 7bit
From: "Dien Ba Quang" <[EMAIL PROTECTED]>
Precedence: list
MIME-Version: 1.0
To: [email protected]
Date: Fri, 2 Mar 2007 16:17:51 -0600
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Subject: [sipxtapi-dev] How to use SipXtackLib as a SIP stack??
Message: 7


Hi all,

I'm  developing a soft phone with NET-BRICK as a SIP stack and using
sipXPBX as  server.

So I want to replace the NET-BRICK (sip stack) by a sipXtackLib.

I have some questions about using sipXtapi and sipXtackLib:

1. Could I use sipXtackLib as a SIP STACK? I have searched around, and
there is lack of information about using sipXtackLib.

2. I hope I could use sipXtapi for soft phone but I don't want to use
the media framework from sipXtapi. Could I using sipXtapi without
media framework? I want to control the media packets.

Thank you very much.

Regards,
DBQ.


Content-Transfer-Encoding: 7bit
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Precedence: list
MIME-Version: 1.0
To: [email protected]
References: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
Date: Sat, 03 Mar 2007 01:44:44 +0100
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Subject: Re: [sipxtapi-dev] Help for G729 patch
Message: 8


Mariana Draper wrote:
> Hi,
>
> I am working on a patch for sipXezphone, adding support for g729 using 
> the encoder and decoder from Voice Age. I have been trying but i still 
> cannot make it to work..
>
> My question is: does anyone know which clases of the sipXezPhone shuld 
> I deal with? I am not very familiar with the whole project. Maybe 
> someone knows some of the classes were i should modify something so as 
> to add another codec.
>
> Of course when i finish this implementation, i will send it to all of 
> you :)
>
> Thank you very much!
> Mariana.
>
> ------------------------------------------------------------------------
> <http://us.rd.yahoo.com/evt=49935/*http://games.yahoo.com>

Yay, this might not be so easy if you think it can be done by modifying 
sipXezphone. Alexander Chemeris wrote an email which is in the 
mailinglist maybe 2 months back about adding a new codec. You basically 
need to add a wrapper class for decoder + encoder for sipxmedialib + 
some more modifications.

I do not consider sipXezPhone worth adding any new features except maybe 
functional video (which maybe works partially in sipxmediaupdate 
branch), as its moreless only a demonstration that sipXtapi really works 
(on my PC it didnt work at all until I fixed some bugs). I have a 
functional softphone using sipXtapi that can actually be used as a 
softphone not only as a demonstration and might contribute it under GPL. 
It uses also wxWidgets but 2.8.2, user interface is made in 
dialogblocks, its loaded during runtime from XRC xml file so it supports 
basic skinning that xrc alllows (reorganization of positions and sizes 
of widgets, bitmaps on bitmapbuttons - i made a custom 
togglebitmapbutton, changins texts, adding new bitmaps, changing various 
icons), unfortunately full skinning is not possible as projects like 
wxSkin dont support the widgets I needed, it has call history, contact 
list with groups support, multiple sip profiles, multiple lines (lines 
are real sipXtapi lines, so you can have multiple calls on the same 
line, so to do an operation on a call you need to select a call not 
line), conference manager, multiple languages support basically all you 
need to use it as a softphone. SipXtapi functions that take too long to 
complete (initialization ,reinitialization, uninitialization, line 
registration) are called from another thread so you get no freezing 
during change of sip profile (I do sipxreinit as I do not consider 
sipxtapi stable enough to just unregister lines, change sipproxy and 
register lines).

There are still some serious bugs in sipxtapi or sipxcalllib that I need 
to fix until sipxtapi can be really considered reliable for me:
1.) Crashes during reinitialization of sipxtapi. Crash in select in 
SipClient while other thread does close on the same socket. If you have 
dual core processor the this is problematic. This crash is inside select 
winsock function, regardless of the version I use. Currently this is 
solved by my patch/hack not using blocking select, it uses 200ms 
timeout. But this is not acceptable. There are 2 more crashes related to 
reinitialization, which have been fixed by my patches (one is in 
previous post, and 2nd is in jira)
2.) Split on conference call does something to it and no more call 
events are received for it. This has to be fixed.
3.) Sometimes line registered event is missing, this has to be fixed.
4.) I need to have a look at audio during call, I think something is not 
ok here.
5.) There is no simple way to implement custom ringtones in sipxtapi. 
You can only play wav files in a call which is not good. If you have 
more calls and want to have custom ringtone, you have to play the 
ringtone on the call in focus, not on the call in alerting state 
(otherwise u dont hear anything).
6.) Is SRTP working in sipXtapi? Is it worth spending time to get it 
working or is it too buggy?

Jaroslav Libak



_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/






 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to