Dale R. Worley | 1 Dec 20:04 2006

Re: 400 Registration requests can't"Registration requests can't have To: tags", what is wrong?

On Thu, 2006-11-30 at 23:31 +0200, sipx <at> linkdevices.com wrote:
> Hello,
> 
> I use C++/CLI managed wrapper around the sipXtapi (.NET Framework
> 2.0). I can successfully REGISTER with registrar server (repro) but I
> can't unREGISTER. I receive message "400 Registration requests can't
> have To: tags". Please help me, what is wrong?
> 
> This is the some extraction from log:
> 
> 1) REGISTER Send
>
"2006-11-30T21:03:04.437000Z":155:OUTGOING:INFO:home-mce::00000000:sipXtapi:"SipUserAgent::sendUdp
UDP SIP User Agent sent message:\n----Remote Host:169.254.92.94---- Port: 5060----\nREGISTER
sip:127.0.0.1 SIP/2.0\r\nFrom: sip:room <at> 127.0.0.1;tag=15b16786\r\nTo:
sip:room <at> 127.0.0.1\r\nCall-Id: 7d9778d1a9300d69f9f35b79bcce0e77\r\nCseq: 101
REGISTER\r\nContact: <sip:room <at> 127.0.0.1:5092;LINEID=3351ecde1ce7>\r\nExpires:
3600\r\nDate: Thu, 30 Nov 2006 21:03:04 GMT\r\nMax-Forwards: 70\r\nUser-Agent: sipXcli ReceiveCall
Console Demo (C#) (WinNT)\r\nAccept-Language: \r\nSupported: replaces\r\nVia: SIP/2.0/UDP
127.0.0.1:5092;branch=z9hG4bK-d3d7d1e4397d;rport\r\nContent-Length: 0\r\n\r\n--------------------END--------------------\n"
> 
> 2) REGISTER Receive
>
"2006-11-30T21:03:04.453000Z":169:INCOMING:INFO:home-mce:SipClient-6:00000E74:sipXtapi:"Read
SIP message:\n----Remote Host:127.0.0.1---- Port: 5060----\nSIP/2.0 200 OK\r\nVia: SIP/2.0/UDP
127.0.0.1:5092;branch=z9hG4bK-d3d7d1e4397d;rport=5092\r\nContact:
<sip:room <at> 127.0.0.1:5092;LINEID=3351ecde1ce7>;expires=3600\r\nTo:
<sip:room <at> 127.0.0.1>;tag=8e1b1476\r\nFrom: <sip:room <at> 127.0.0.1>;tag=15b16786\r\nCall-ID:
7d9778d1a9300d69f9f35b79bcce0e77\r\nCSeq: 101 REGISTER\r\nContent-Length: 0\r\n\r\n====================END====================\n"
> 
(Continue reading)

b kumar | 2 Dec 13:55 2006
Picon

problem in sequential forking

Hi
i have been using sipxtapi (sipxezphone).for sequential forking sip stack need to send q value in contact header field. but i didnot found. is there any update.
regards
B.kumar
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev <at> list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
zamielia | 4 Dec 02:53 2006
Picon

SipXtapi.dll

Have been trying to sort these problems for quite some times
:(.

I have problem regarding sipXtapi.dll(976KB). The version of
dll  i'm using right now is 2.9.0.0 (I try to replace it
with 2.9.1.0 but it produces more errors.)This dll is
obtained when I compiled sipezphone sometime ago(of version
6274 if i'm not mistaken).I developed a softphone from
scratch and used that particular dll to run my softphone. 

The problem are as follows:

1. Speaker and microphone volume. I wrote the code below.
Slider can be scrolled properly. But when I add the 2
codes;sipxAudioSetGain(g_hInst,
nPos),sipxAudioSetVolume(g_hInst, SPEAKER, nPos) , as I try
to scroll the volume it produces assertion error.

       if ((CSliderCtrl *)pScrollBar == &m_Slider1)
        {
            sipxAudioSetGain(g_hInst, nPos);
        }
        else if ((CSliderCtrl *)pScrollBar == &m_Slider2)
        {
            sipxAudioSetVolume(g_hInst, SPEAKER, nPos) ;
        }
        CDialog::OnHScroll(nSBCode, nPos, pScrollBar);

2.  Reinitilize configuration. I tried to use
sipxReInitialize(&hInst, iSipPort, iSipPort, 5061, iRtpPort,
16 ) to restart phone registration. But the line produces
error and cannot be compiled. What I do now is when I change
my setting(eg: realm, identity, password, server ip), I have
to stop my program and restart the program again. How can I
make the program reinitialize it setting without having me
to stop and restart the program.

3. DTMF Tone 
I'm not sure on how to make the buttons produce tone(DTMF)
when there is no call connection as the code to start tone
is 

sipxCallStartTone(g_hCall,ID_DTMF_3, true, false) ;

I'm able to hear the button tone only if I press the button
when there is a phone connection between caller and
recipient. What if the g_hCall value is 0?. How can I deploy
the line when g_hCall is 0, and make the button being
pressed produces its tone. 

Please advise. Thank you.
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev <at> list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

张霁 | 4 Dec 10:04 2006

The interval between offering and alerting status.

sipxtapi-dev:

From the sdk docs , i get this:
in the offering status,  user can accept, reject or redirect the incoming call.
if user accept the call, it go into the alerting status.
if user reject, redirect the call,  it go into the disconnected status.
but I found, if user do nothing and just wait for a while, the call will go into the disconnected status automatically.

So there is a problem disturbing me:
if the user want to redirect the call, he must do there things  quickly while the call is still in the affering status.
the there things is:
- read the notification that a call comes.
- decide and input the third call num to be redirected.
- press the REDIRECT button.
I think the users will kill me for this demands.  

 				
              jzhang <at> ydl-tech.com
                 2006-12-04

_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev <at> list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
Piotr Szymanek | 4 Dec 11:14 2006
Picon

sipXtapi fatal error LNK1181: cannot open input file 'ccvt.lib'

Hello
Where can I get this lib ?
what I have to download and/or compile ??
I'm compiling without SIPX_VIDEO

Thanks 
Piotr Szymanek
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev <at> list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

yuhang | 4 Dec 13:31 2006

getAllLocalHostIps() // an old bug need a new fix

Hi,

It is an old bug: assign >=2 ip addresses to one adapter under Win32.
media-update branch tries to fix it, but the fix is not complete. The new problem is a missing
(numAddresses<maxAddresses) check in the inner loop. That's why VS2005 complains about stack
corruption round local variable "const char* szAdapters[1] ;" when sipxInitialize() returns.

=========== the code in media-update branch at version 8187 =========
bool getAllLocalHostIps(const HostAdapterAddress* localHostAddresses[], int &numAddresses)
{
    bool rc = false;

#ifdef _WIN32
    if (loadIPHelperAPI())
    {
        PIP_ADAPTER_INFO pIpAdapterInfo = (PIP_ADAPTER_INFO)malloc(sizeof(IP_ADAPTER_INFO) * MAX_IP_ADDRESSES);
        unsigned long outBufLen = sizeof(IP_ADAPTER_INFO) * MAX_IP_ADDRESSES;

        DWORD dwResult = GetAdaptersInfo(pIpAdapterInfo, &outBufLen);

        if (ERROR_SUCCESS == dwResult)
        {
            int maxAddresses = numAddresses;
            rc = true;
            numAddresses = 0;

            PIP_ADAPTER_INFO pNextInfoRecord = pIpAdapterInfo;

            unsigned int adapterId = 0;
            char szAdapterId[MAX_IP_ADDRESSES];
            while (pNextInfoRecord && (numAddresses<maxAddresses))
            {
                sprintf(szAdapterId, "eth%u", adapterId);
                PIP_ADDR_STRING pNextAddress = &pNextInfoRecord->IpAddressList;
                while (pNextAddress)
                {
                    const char *szAddr = pNextAddress->IpAddress.String;
                    // ignore the loopback address
                    if (!( strcmp(szAddr, "127.0.0.1") == 0 || strcmp(szAddr, "0.0.0.0") == 0 ||
						   strncmp("169.154", szAddr, 7) == 0 || strncmp("0.", szAddr, 2) == 0) )
                    {
                        localHostAddresses[numAddresses] = new HostAdapterAddress(szAdapterId, szAddr);
                        numAddresses++;
                    }
                    pNextAddress = pNextAddress->Next;
                }
                adapterId++;
                pNextInfoRecord = pNextInfoRecord->Next;
            }
        }
        free((void*)pIpAdapterInfo);
    }                
 #else
    rc = false;
 #endif    
    return rc;
}
============== my suggested fix =============================
bool getAllLocalHostIps(const HostAdapterAddress* localHostAddresses[], int &numAddresses)
{
    bool rc = false;

#ifdef _WIN32
    if (loadIPHelperAPI())
    {
        PIP_ADAPTER_INFO pIpAdapterInfo = (PIP_ADAPTER_INFO)malloc(sizeof(IP_ADAPTER_INFO) * MAX_IP_ADDRESSES);
        unsigned long outBufLen = sizeof(IP_ADAPTER_INFO) * MAX_IP_ADDRESSES;

        DWORD dwResult = GetAdaptersInfo(pIpAdapterInfo, &outBufLen);

        if (ERROR_SUCCESS == dwResult)
        {
            int maxAddresses = numAddresses;
            rc = true;
            numAddresses = 0;

            PIP_ADAPTER_INFO pNextInfoRecord = pIpAdapterInfo;

            unsigned int adapterId = 0;
            char szAdapterId[MAX_IP_ADDRESSES];
            while (pNextInfoRecord && (numAddresses<maxAddresses))
            {
                sprintf(szAdapterId, "eth%u", adapterId);
                PIP_ADDR_STRING pNextAddr = &pNextInfoRecord->IpAddressList;
                do {
                    const char *szAddr = pNextAddr->IpAddress.String;
                    // ignore the loopback address
                    if (strcmp(szAddr, "127.0.0.1")
                        && strcmp(szAddr, "0.0.0.0")
                        && strncmp("169.154", szAddr, 7)
                        && strncmp("0.", szAddr, 2))
                    {
                        localHostAddresses[numAddresses] = new HostAdapterAddress(szAdapterId, szAddr);
                        numAddresses++;
                    }
                    pNextAddr = pNextAddr->Next;
                } while (pNextAddr && (numAddresses<maxAddresses));
                adapterId++;
                pNextInfoRecord = pNextInfoRecord->Next;
            }
        }
        free((void*)pIpAdapterInfo);
    }                
 #else
    rc = false;
 #endif    
    return rc;
}
================================================

_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev <at> list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Alexander Chemeris | 4 Dec 13:56 2006
Picon

Re: sipXtapi fatal error LNK1181: cannot open input file 'ccvt.lib'

Hello,

On 12/4/06, Piotr Szymanek <p.szymanek <at> wasko.pl> wrote:
> Where can I get this lib ?
> what I have to download and/or compile ??
> I'm compiling without SIPX_VIDEO
Update to latest svn version and use Debug_NoVideo configuration
for solution. Or just remove this file from library input files.

--

-- 
Regards,
Alexander Chemeris.
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev <at> list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Alexander Chemeris | 4 Dec 14:29 2006
Picon

Re: getAllLocalHostIps() // an old bug need a new fix

Hello,

On 12/4/06, yuhang <micro-yu <at> 163.com> wrote:
> It is an old bug: assign >=2 ip addresses to one adapter under Win32.
> media-update branch tries to fix it, but the fix is not complete. The new problem
> is a missing (numAddresses<maxAddresses) check in the inner loop. That's
> why VS2005 complains about stack corruption round local variable "const char*
> szAdapters[1] ;" when sipxInitialize() returns.
Looks good.
But is there any reason to change while() {} to do {} while()? I think we should
check pNextAddr && (numAddresses<maxAddresses) right after we have got
first pNextAddr:
PIP_ADDR_STRING pNextAddr = &pNextInfoRecord->IpAddressList;

--

-- 
Regards,
Alexander Chemeris.
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev <at> list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

??? | 4 Dec 15:41 2006

Logout function in SipXtapi

Hi, everyone. I’m just new here.

Recently, I want to use SipXtapi to develop a SIP client software.

After study the api doc, I know how to do a login to a server, how to place a call, and so on.

The problem is with which function in SipXtapi I can do a logout.

Thanks!

 

_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev <at> list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
yuhang | 5 Dec 02:42 2006

Re: getAllLocalHostIps() // an old bug need a new fix

Hello, Alexander

======= 2006-12-04 21:29:06 Alexander wrote =======
>But is there any reason to change while() {} to do {} while()? I think we should
>check pNextAddr && (numAddresses<maxAddresses) right after we have got
>first pNextAddr:
>PIP_ADDR_STRING pNextAddr = &pNextInfoRecord->IpAddressList;
= = = = = = = = = = = = = = = = = = = =

Generally speeking, while(){} is safer than do {} while() and while() {} will certainly work in this case.

Well, in this case, while(){} and do{}while() do the same thing. I can prove that.
Right after "PIP_ADDR_STRING pNextAddr = &pNextInfoRecord->IpAddressList;" and just before entering
the inner loop, (numAddresses<maxAddresses) is always true, since it has been checked in the outer loop:
while (pNextInfoRecord && (numAddresses<maxAddresses)). And the address of
(pNextInfoRecord->IpAddressList) is not NULL. So pNextAddr must NOT be NULL. It then follows that
(pNextAddr && (numAddresses<maxAddresses)) is always true when we first enter the inner loop, thus
concludes that while(){} and do{}while() do the same thing in this case.

The reason why i preffer do{}while() than while(){} is that usually compiler may generate one more
conditional jump instruction if while(){} is used. But in this case, we won't see the difference in
performance whether we use do{}while() or we use while(). Both will work well.

_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev <at> list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/


Gmane