hi olivier, this problem happend to me also. all the values that i pass doesn't show up correctly when we use them inside the function. so what i did was i converted it lik below... int dll_makeCall(int accountId, char* uri) { wchar_t tmp1[256]; swprintf( tmp1, L"%s", uri ); char tmp4[256]; pj_unicode_to_ansi(tmp1,pj_unicode_strlen(tmp1),tmp4 ,sizeof(tmp4) ); int newcallId = -1; pj_str_t tmp ; tmp.ptr = tmp4; tmp.slen = pj_ansi_strlen(tmp4); int status=pjsua_call_make_call( accountId, &tmp, 0, NULL, NULL, &newcallId); if (status != PJ_SUCCESS) { OnError(TEXT("Error pjsua_call_make_call"), status); return newcallId; } return newcallId; } i think u cud also use this way... if anybody out there knw anyother way to get this done be my guest .... On 10/8/07, Olivier Beytrison <olivier at heliosnet.org> wrote: > > Yeah, I call the pjsua_acc_config_default() first. > > In fact I've ported Sasa's DLL to Windows Mobile, without any > modification to it for the moment. > > The code in my previous message was somewhat modified because i'm > calling a function from C# .Net CF. > > So to be sure the parameters were correctly passed to the C++ function, > I've put a > > PJ_LOG(3,(THIS_FILE,"regAcc: uri=%s reguri=%s dom=%s user=%s > pass=%s",uri,reguri,domain,username,password)); > > and what I get in the log file is : > 11:36:25.000 pjsipDll.cpp regAcc: uri=s reguri=s dom=1 user=s pass=b > 11:36:25.000 pjsua_acc.c Invalid local URI: Invalid URI > (PJSIP_EINVALIDURI) [status=171039] > 11:36:25.000 pjsua_acc.c Error adding account: Invalid URI > (PJSIP_EINVALIDURI) [status=171039] > > I only have the first char of each string. Very weird. Seems to be a > problem because of the encoding. maybe is it a problem of encoding > (UTF-8 or so). > > any clue ? People developing under WinCE/WM5 have experienced such > problems ? > > Regrads, > > Olivier B. > > Benny Prijono a ?crit : > > It's strange indeed, I run your code and it worked fine. I assume > > you call pjsua_acc_config_default() first? If that doesn't work, > > maybe it's best to "svn update". > > > > cheers, > > -benny > > > > Olivier Beytrison wrote: > >> Hello all, Monday, back to work ;) > >> > >> And already a new question for you. I'm trying to register to my SIP > >> Server, but yet it doesn't work. I get the EINVALIDURI with > pjsua_acc_add > >> > >> Here's the code : > >> > >> acfg.id = pj_str("sip:spv at 169.254.2.2"); > >> acfg.reg_timeout = 3600; > >> acfg.reg_uri = pj_str("sip:169.254.2.2"); > >> acfg.cred_count = 1; > >> acfg.cred_info[0].username = pj_str("spv"); > >> acfg.cred_info[0].realm = pj_str("169.254.2.2"); > >> acfg.cred_info[0].scheme = pj_str("digest"); > >> acfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; > >> acfg.cred_info[0].data = pj_str("dummypass"); > >> > >> and the error obtained. > >> > >> 09:28:48.000 pjsua_acc.c Invalid local URI: Invalid URI > >> (PJSIP_EINVALIDURI) [status=171039] > >> 09:28:48.000 pjsua_acc.c Error adding account: Invalid URI > >> (PJSIP_EINVALIDURI) [status=171039] > >> > >> looks rather weird, cause that's the code used in many examples. But > >> maybe pjsip doesn't accept "ip-adress" domains ? > >> > >> Thx in advance for your answers :) > >> > >> Regards, > >> Olivier B. > >> > > > > > > -- > > Olivier Beytrison > Telecommunication Engineer > Mobile: +41 (0)78 619 73 53 > Mail: olivier at heliosnet.org > GPG: 0x4FB83528 http://pgp.mit.edu/ > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20071009/eff37c51/attachment.html