What is The PlaceCall Process
2008-07-01 02:21:12 GMT
_______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
_______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
Hello,
Below is a code snipped from a client application I'm trying to develop. I've gotten it to compile and run, but the problem is that all of the sipx functions return success, even though the sipX server isn't actually running and I'm using dummy addresses.
SIPX_RESULT r;
r = sipxInitialize(&g_hInst, DEFAULT_UDP_PORT, DEFAULT_TCP_PORT, DEFAULT_TLS_PORT,
DEFAULT_RTP_START_PORT, DEFAULT_CONNECTIONS,
"my_sip_user_id", "sipx_server_ip_address");
fprintf(stdout, "sipxInitialize() returned %d\n", r);
r = sipxEventListenerAdd(g_hInst, EventCallbackProc, NULL);
fprintf(stdout, "sipxEventListenerAdd() returned %d\n", r);
r = sipxLineAdd(g_hInst, "sip:my_sip_user_id <at> my_sip_domain", &g_hLine);
fprintf(stdout, "sipxLineAdd() returned %d\n", r);
r = sipxLineAddCredential(g_hLine, "my_sip_user_id", "my_sip_password", "my_sip_domain");
fprintf(stdout, "sipxLineAddCredential() returned %d\n", r);
r = sipxCallCreate(g_hInst, g_hLine, &g_hCall);
fprintf(stdout, "sipxCallCreate() returned %d\n", r);
r = sipxCallConnect(g_hCall, "sip:some_other_user <at> some_other_domain");
fprintf(stdout, "sipxCallConnect() returned %d\n", r);
The callback procedure is defined as:
bool SIPX_CALLING_CONVENTION EventCallbackProc(SIPX_EVENT_CATEGORY category,
void *pInfo, void *pUserData)
{
return false;
}
Each function call returns 0, which is success, but there's obviously no connection made to the server, or call to the remote user, as the server isn't even running. Any ideas as to what I'm doing wrong?
Thanks,
Joe
_______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
_______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
On Sun, 2008-07-06 at 20:18 -0500, Joe Huddleston wrote: > Each function call returns 0, which is success, but there's obviously > no connection made to the server, or call to the remote user, as the > server isn't even running. Any ideas as to what I'm doing wrong? I'm not an expert, but I think that you have to monitor the events that are sent to the callback function to know whether the call succeeds or fails -- almost all the interesting processing in sipxtapi is asynchronous. Dale _______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
I'm not an expert, but I think that you have to monitor the events that
are sent to the callback function to know whether the call succeeds or
fails -- almost all the interesting processing in sipxtapi is
asynchronous.
_______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
I'm trying to write a simple test client app, and I'm having trouble getting the app to make a call. Here's the setup:
1. I have sipXecs running in a CentOS VM under VirtualBox.
2. I have an X-Lite client set up to receive the call.
3. I have a small Visual C++ app with which I'm trying to make the call.
Both the X-Line client and my VC++ app register successfully with the sipX server. However, when the VC++ app calls sipxCallConnect, my callback procedure gets a DISCONNECTED event, with a SMIME_FAILURE cause (after a pause).
The pertinent VC++ app code is below:
char *sipxServer = "server_ip_address";
char *sipxUser = "vc_app_id";
char *sipPassword = "vc_app_pwd";
char *sipUri = "sip:vc_app_id <at> server_ip_address";
char *sipRealm = "sipdomain.com";
sipxInitialize(&(m_sipInfo.instance), DEFAULT_UDP_PORT, DEFAULT_TCP_PORT, DEFAULT_TLS_PORT, DEFAULT_RTP_START_PORT, DEFAULT_CONNECTIONS, sipxUser, sipxServer);
sipxEventListenerAdd(m_sipInfo.instance, EventCallbackProc, this);
sipxLineAdd(m_sipInfo.instance, sipUri, &(m_sipInfo.line));
sipxLineAddCredential(m_sipInfo.line, sipxUser, sipPassword, sipRealm);
sipxLineRegister(m_sipInfo.line, true);
... code to make sure registration is successful ...
sipxCallCreate(m_sipInfo.instance, m_sipInfo.line, &(m_sipInfo.call));
sipxCallConnect(m_sipInfo.call, "sip:x_lite_id <at> sipdomain.com", CONTACT_AUTO);
I'm new to SIP development, so I'm sure there's some step I'm missing. The comments in sipXtapiEvents.h for the callstate causes says to check the SECURITY event for information on the SMIME failure, but no SECURITY event is being triggered.
Thanks,
Joe
_______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
As a followup, I tried using two of the sample programs that are under the sipXtapi code tree. One, PlaceCall, exhibits the same problem I'm having in my test application.
The other, sipXezPhone, works. I've gone through my application and now have it performing the same exact steps as sipXezPhone as far as initializing SIP and making a call, but my application still disconnects with CALLSTATE_CAUSE_SMIME_FAILURE.
I ran WireShark, and there is no traffic between my computer and the server after registration, so it's failing somewhere on the client side before it tries to make the call. I just can't figure out where.
I don't know anything about S/MIME, but I read up on it some and understand it has to do with encryption. As far as I can tell, I've disabled all security measures by not passing a SIPX_SECURITY_ATTRIBUTES struct to sipxCallConnect, but maybe I'm missing something.
I'm sure it's some configuration thing on the client side, but what's puzzling is that sipXezPhone works. Any help would be appreciated.
Thanks,
Joe
_______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
Ok, I got my test application to actually make the connection. Well, partially.
I had to add the following call before trying to make the connection:
sipxConfigSetAudioCodecByName(m_sipInfo.instance, "PCMU PCMA TELEPHONE-EVENT");
Now the call goes through and my X-Lite client rings. However, as soon as the call goes through my test app starts throwing this exception:
Unhandled exception at 0x100bcc90 in siptest2.exe: 0xC0000005: Access violation reading location 0x00000058.
The exception only crops up when I make the sipxCallConnect() call, but given the kind of exception it is, I suppose it's possible the problem actually lies elsewhere.
The last event I receive at my test app before the failure is MEDIA::REMOTE_START::AUDIO.
Any ideas here? I'm comparing my code to the code for sipXezPhone, but as it so happens sipXezPhone is also throwing these exceptions.
I found a message board post from someone having a similar problem with the PlaceCall application, and it was "fixed" by getting pre-compiled versions of PlaceCall and sipxtapi.dll from SipFoundry. However, I can't find pre-compiled versions on the site anymore.
Thanks,
Joe
_______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
_______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
Hi, This looks very much like you don't have codecs' dlls in the reach of sipXtapi.dll. They normally should be in the current directory for sipXtapi to find them. Try copying them from sipXmediaLib\bin to your current directory and see whether this helps. On Tue, Jul 15, 2008 at 12:14 AM, Joe Huddleston <joe.huddleston.news <at> gmail.com> wrote: > Ok, I got my test application to actually make the connection. Well, > partially. > > I had to add the following call before trying to make the connection: > > sipxConfigSetAudioCodecByName(m_sipInfo.instance, "PCMU PCMA > TELEPHONE-EVENT"); > > > Now the call goes through and my X-Lite client rings. However, as soon as > the call goes through my test app starts throwing this exception: > > Unhandled exception at 0x100bcc90 in siptest2.exe: 0xC0000005: Access > violation reading location 0x00000058. > > > The exception only crops up when I make the sipxCallConnect() call, but > given the kind of exception it is, I suppose it's possible the problem > actually lies elsewhere. > > The last event I receive at my test app before the failure is > MEDIA::REMOTE_START::AUDIO. > > Any ideas here? I'm comparing my code to the code for sipXezPhone, but as > it so happens sipXezPhone is also throwing these exceptions. > > I found a message board post from someone having a similar problem with the > PlaceCall application, and it was "fixed" by getting pre-compiled versions > of PlaceCall and sipxtapi.dll from SipFoundry. However, I can't find > pre-compiled versions on the site anymore. > > Thanks, > > Joe > > > > _______________________________________________ > sipxtapi-dev mailing list > sipxtapi-dev <at> list.sipfoundry.org > List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/ > -- -- Regards, Alexander Chemeris. SIPez LLC. SIP VoIP, IM and Presence Consulting http://www.SIPez.com tel: +1 (617) 273-4000 _______________________________________________ sipxtapi-dev mailing list sipxtapi-dev <at> list.sipfoundry.org List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
RSS Feed4 | |
|---|---|
4 | |
4 | |
8 | |
18 | |
2 | |
16 | |
6 | |
32 | |
18 | |
22 | |
3 | |
8 | |
29 | |
8 | |
42 | |
40 | |
77 | |
41 | |
14 | |
14 | |
16 | |
10 | |
31 | |
29 | |
59 | |
54 | |
38 | |
12 | |
45 | |
72 | |
78 | |
269 | |
162 | |
182 | |
80 | |
245 | |
161 | |
62 | |
111 | |
137 | |
84 | |
196 | |
192 |