Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
IncomingCallNotification event
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 30 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
izmoto  
View profile  
 More options Mar 31 2009, 4:36 am
From: izmoto <paul.mun...@gmail.com>
Date: Tue, 31 Mar 2009 01:36:14 -0700 (PDT)
Local: Tues, Mar 31 2009 4:36 am
Subject: IncomingCallNotification event
Hi,

- i'm using sipeksdk_mobile.dll. BTW, i can't seem to be able to
retrieve the latest source; one that supports e.g
"pjsipStackProxy.Instance.ConfigMore.logLevel = 5;"
- i can make an outgoing call but can't get notified of incoming
calls; i suppose i have the wrong version of the mobile sdk but each
time i get the latest from the svn repo, the results are the same.
- just where are the latest sources?

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Georges  
View profile  
 More options Apr 1 2009, 7:01 pm
From: Georges <Georges.Labre...@gmail.com>
Date: Wed, 1 Apr 2009 16:01:38 -0700 (PDT)
Local: Wed, Apr 1 2009 7:01 pm
Subject: Re: IncomingCallNotification event
Hello,

Receiving notification for incoming calls seems to be a frequent issue
and I am surprised that we have yet to obtain a clear, concise and
well defined solution, at least as a simple tutorial.
I myself am having troubles with having an incoming call callback
method being called.

Having read the available documentation and studied and reversed
engineered all available source code I am well aware of what I should
do but cannot, for some reason, make it work.
I have tried two approaches and failed at both:

1) Using CCallManager (my favoured approach):

/-------------------------------code sniplet - start
-------------------------------/

        // Instance of incoming call
        private IStateMachine _incall = null;

        [...]

        // Registering incoming call callback in the form's
constructor
        CallManager.IncomingCallNotification += new
DIncomingCallNotification(CallManager_IncomingCallNotification);

        [...]

        // Implementation of the incoming call notification callback
method
        void CallManager_IncomingCallNotification(int sessionId,
string number, string info)
        {
            _incall = CallManager.getCall(sessionId);
        }

        [...]

        // Answer call button click
        private void answerButton_Click(object sender, EventArgs e)
        {
            CallManager.onUserAnswer(_incall.Session);
        }

/-------------------------------code sniplet - end
-------------------------------/

2) Using the pjsip wrapper:

/-------------------------------code sniplet - start
-------------------------------/
        [DllImport("pjsipDll.dll")]
        private static extern int onCallIncoming(OnCallIncoming cb);

        [...]

        // Declare delegate
        delegate int OnCallIncoming(OnCallIncoming cb);

        // Create delegate
        static OnCallIncoming ocInc = new OnCallIncoming
(onCallIncoming);

        [...]

        // Registering via delegate incoming call callback method in
the form's constructor
       onCallIncoming(ocInc);

        [...]

        // Implement callback method
        private static int onCallIncoming(int callId, string sturi)
        {
            // The incoming call code...
            return 0;
        }

/-------------------------------code sniplet - end
-------------------------------/

On both cases the callback methods are never called.

SIPek Softphone uses approach number 1 but with a delegate defined and
invoke:

/-------------------------------code sniplet - start
-------------------------------/

        delegate void DIncomingCall(int sessionId, string number,
string info);

        [...]

        void CallManager_IncomingCallNotification(int sessionId,
string number, string info)
        {
                if (InvokeRequired)
                        this.BeginInvoke(new DIncomingCall
(this.OnIncomingCall), new object[] { sessionId, number, info});
                else
                        OnIncomingCall(sessionId, number, info);
        }

        [...]

        private void OnIncomingCall(int sessionId, string number,
string info)
        {
                notifyIcon.ShowBalloonTip(30, "Sipek Softphone",
"Incoming call from " + number + "!", ToolTipIcon.Info);
        }

/-------------------------------code sniplet - end
-------------------------------/

This third approach does not function for me either.
What could be the issue? What am I missing? Any suggestions?

Thanks and regards,

 - Georges

On Mar 31, 4:36 am, izmoto <paul.mun...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Georges  
View profile  
 More options Apr 2 2009, 12:36 pm
From: Georges <Georges.Labre...@gmail.com>
Date: Thu, 2 Apr 2009 09:36:23 -0700 (PDT)
Local: Thurs, Apr 2 2009 12:36 pm
Subject: Re: IncomingCallNotification event
OK, I persevered on this and got it to work.

I had built my own pjsipDll.dll library by downloading the pjsip
source (pjproject-1.1) and wrapping it with the pjsipDll library
source from the SVN trunk repository.
It turns out that using my own built pjsipDll.dll library was the
issue. I removed it and replaced it by the pre-built one (available at
http://code.google.com/p/sipeksdk/) and everything worked fine.

So, I either didn't properly build the pjsip and/or pjsipDll source or
there was a problem in the soruce code of the pjsipDll trunk at the
time of my checkout (which is why projects should have stable tagged
releases available for checkouts instead of just the trunk)

Anyhow, I hope this helps, for the record at least!

Cheers,

 - Georges

On Apr 1, 7:01 pm, Georges <Georges.Labre...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
izmoto  
View profile  
 More options Apr 3 2009, 7:49 am
From: izmoto <paul.mun...@gmail.com>
Date: Fri, 3 Apr 2009 04:49:13 -0700 (PDT)
Local: Fri, Apr 3 2009 7:49 am
Subject: Re: IncomingCallNotification event
Hello Georges,

- I've tracked down the source of my trouble; CCallManager class.
- when the function 'OnIncomingCall(int sessionId, string number,
string info)' is invoked, the state machine is null so the function
returns.
- what could cause this?

Regards,
izmoto.

On Apr 2, 7:36 pm, Georges <Georges.Labre...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
izmoto  
View profile  
 More options Apr 3 2009, 7:57 am
From: izmoto <paul.mun...@gmail.com>
Date: Fri, 3 Apr 2009 04:57:55 -0700 (PDT)
Local: Fri, Apr 3 2009 7:57 am
Subject: Re: IncomingCallNotification event
Hi sasa,

I've referenced the sipeksdk_mobile project directly and the problem
indicated to you earlier seems to be emanating form the function below
in the callmanager class;

 private void OnIncomingCall(int sessionId, string number, string
info)
        {
            IStateMachine call = getCall(sessionId);

            if (call.IsNull) return;

            // inform automaton for incoming call
            call.State.incomingCall(number, info);

            // call callback
            if ((IncomingCallNotification != null) &&
(call.DisableStateNotifications == false)) IncomingCallNotification
(sessionId, number, info);
        }

- the state machine 'call' is always null [DisableStateNotifications
property is true] so the function returns and the event is never
raised. What could be the cause of this? (state machine is null).

Regards,

On Apr 3, 2:49 pm, izmoto <paul.mun...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
izmoto  
View profile  
 More options Apr 3 2009, 8:33 am
From: izmoto <paul.mun...@gmail.com>
Date: Fri, 3 Apr 2009 05:33:28 -0700 (PDT)
Local: Fri, Apr 3 2009 8:33 am
Subject: Re: IncomingCallNotification event
On further inspection of :

private void OnIncomingCall(int sessionId, string number, string
info)
        {
            IStateMachine call = getCall(sessionId);

            if (call.IsNull) return;

            // inform automaton for incoming call
            call.State.incomingCall(number, info);

            // call callback
            if ((IncomingCallNotification != null) &&
(call.DisableStateNotifications == false)) IncomingCallNotification
(sessionId, number, info);
        }

getCall checks whether the call table (Dictionary<int, IStateMachine>)
contains the statemachine with the incoming session id; it doesn't
find it so it returns a NullStateMachine.

On Apr 3, 2:57 pm, izmoto <paul.mun...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gitch  
View profile  
 More options Apr 3 2009, 11:12 am
From: Gitch <ritchou...@gmail.com>
Date: Fri, 3 Apr 2009 08:12:19 -0700 (PDT)
Local: Fri, Apr 3 2009 11:12 am
Subject: Re: IncomingCallNotification event
Hi Everybody!,

I absolutely have the same problem as Georges, no call at all on
callback IncomingCallNotification. I used the CCallManager way by
declaring callback as above :

                CallManager.IncomingCallNotification += new
DIncomingCallNotification(CallManager_IncomingCallNotification);

I add corresponding method and I wanted it to answer automaticaly
(last command)

                void CallManager_IncomingCallNotification(int sessionId, string
number, string info)
                {
                  Console.WriteLine("\n\n\n\nCallManager_IncomingCallNotification\n\n
\n");
                  // assign incoming call instance to member variable
                  incall = CallManager.getCall(sessionId);

                  CallManager.onUserAnswer(incall.Session);
                }

but no calls on this callback.

I'm developping on Linux (Ubuntu) Monodevelop and I launch program in
command lines. In this situation, I can see every SIP message
transmitted and I see INVITE message incoming, but no reaction of my
side (normal, callback is neved called :-) )

Any solution ?

Thanks in advance for your answer !

Gitch


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Georges  
View profile  
 More options Apr 3 2009, 11:25 am
From: Georges <Georges.Labre...@gmail.com>
Date: Fri, 3 Apr 2009 08:25:04 -0700 (PDT)
Local: Fri, Apr 3 2009 11:25 am
Subject: Re: IncomingCallNotification event
Hello izmoto,

I explicitly set the call state machine when the callback method is
executed, like so:

/---- code sniplet - start -----/

        void CallManager_IncomingCallNotification(int sessionId,
string number, string info)
        {
            if (InvokeRequired)
                this.BeginInvoke(new DIncomingCall
(this.OnIncomingCall), new object[] { sessionId, number, info });
            else
                OnIncomingCall(sessionId, number, info);
        }

        private void OnIncomingCall(int sessionId, string number,
string info)
        {
           //explicitly set the state machine
            _call = CallManager.getCall(sessionId);
        }

/---- code sniplet - end----/

And once it is set, I can use it to answer, like so:

/---- code sniplet - start -----/

        private void answerButton_Click(object sender, EventArgs e)
        {
            CallManager.onUserAnswer(_call.Session);
        }

/---- code sniplet - end -----/

Hope this helps, keep everyone posted!

On Apr 3, 9:02 am, izmoto <paul.mun...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
izmoto  
View profile  
 More options Apr 3 2009, 11:36 am
From: izmoto <paul.mun...@gmail.com>
Date: Fri, 3 Apr 2009 08:36:21 -0700 (PDT)
Local: Fri, Apr 3 2009 11:36 am
Subject: Re: IncomingCallNotification event
Hi,

- My diagnosis for the [see thread title] problem in
(sipeksdk_mobile.dll) is as follows:

- the reason seems to be that the onCallStateChanged(int callId,
ESessionState callState) event is not being raised but the
onCallIncoming(int callId, string sturi) event is being raised; NB the
callbacks are in file pjsipCallWrapper.cs.

- for an incoming call, onCallStateChanged(...) event needs to be
raised first so as to set the state machine for the incoming call in
the call manager's table (a dictionary); then the onCallIncoming(...)
event is raised which then tries to retrieve the state machine for the
incoming call from the call manager's table; if it finds the state
machine it goes on to raise the incoming call notification event and
therefore updates the GUI, however, if it does not find the state
machine for the incoming call (as is the case now where it is
returning a NullStateMachine) then incoming call notification event is
never raised.

- i do not know for what reason pjsipdll_mobile.dll does not seem to
work yet pjsipdll.dll works very well.

- Mr. Sasa  could you please help us all in this one.

Thank you for your reply,

izmoto.

On Apr 3, 6:12 pm, Gitch <ritchou...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
izmoto  
View profile  
 More options Apr 3 2009, 12:10 pm
From: izmoto <paul.mun...@gmail.com>
Date: Fri, 3 Apr 2009 09:10:13 -0700 (PDT)
Local: Fri, Apr 3 2009 12:10 pm
Subject: Re: IncomingCallNotification event
Hello Georges,

Your solution works like a charm.

Thanks.

On Apr 3, 6:36 pm, izmoto <paul.mun...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sasa Coh  
View profile  
 More options Apr 3 2009, 6:29 pm
From: Sasa Coh <sasa...@gmail.com>
Date: Sat, 4 Apr 2009 00:29:33 +0200
Local: Fri, Apr 3 2009 6:29 pm
Subject: Re: IncomingCallNotification event

Hello Guys,

I'm really sorry I couldn't get to you sooner. Now it seems you've solved
the mysteries. There's quite a lot of information in the previous posts and
now I'm a bit confused. In order to finaly close this issue I need some
answers (confirmations):

   - Do you use sources or prebuilt libraries (sipeksdk_mobile.dll and
   pjsip_mobile.dll)?
   - Where do you take them from?
   - Is the incoming notification problem in the mobile version only?
   - What about the wrong order of notifications. Is this reproducible
   (always)? Btw. it never happens to me, otherwise I...
   - Are there any other known problems I should fix?

Thanks for report (and explanations)!

Kind regards,
sasa


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gitch  
View profile  
 More options Apr 6 2009, 3:47 am
From: Gitch <ritchou...@gmail.com>
Date: Mon, 6 Apr 2009 00:47:14 -0700 (PDT)
Local: Mon, Apr 6 2009 3:47 am
Subject: Re: IncomingCallNotification event
Hi !,

I had the occasion to test 2 scenarios. First is the InstantSoftPhone
example published on SipekSDK website, with pre-build libraries. I had
the Incomingcall code, callback and everything needed. Compiled on
Visual Studio and executed on Windows Environnement, everything works
fine. The application automaticaly answers, exactly what I want for
begining.
Second scenario, based on libraries compiled by myself (libpjsipDll.so
and SipekSDK.dll). On these libraries, audio was disabled (--disable-
sound) because I'm working on Virtual Machine. The same code was
executed and no IncomingCallNotification event was raised. I still do
not know why. Could it be linked with the disable-sound option ? Could
the source code be "wrong" ?

Every help will be lovely accepted :-)

King regards,

Gitch


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
izmoto  
View profile  
 More options Apr 6 2009, 5:20 am
From: izmoto <paul.mun...@gmail.com>
Date: Mon, 6 Apr 2009 02:20:21 -0700 (PDT)
Local: Mon, Apr 6 2009 5:20 am
Subject: Re: IncomingCallNotification event
Hello Sasa,

I'm very happy you found some time to reply to this post.
Now, I will submit some clarifications to you based on my own
experience using the sipek SDKs both windows-desktop and windows-
mobile versions:-

   - Do you use sources or prebuilt libraries (sipeksdk_mobile.dll and
   pjsip_mobile.dll)?

 I use the sources for both sipeksdk_mobile.dll and
pjsipdll_mobile.dll.

   - Where do you take them from?

I build the dlls myself: I get the sources from the SVN repo; sipeksdk
from [http://sipeksdk.googlecode.com/svn/trunk/SipekSdk] and
pjsipdll_mobile from [http://sipeksdk.googlecode.com/svn/trunk/
pjsipdll], for pjsip, i have downloaded pjproject-1.0.1.

   - Is the incoming notification problem in the mobile version only?

 Yes, the problem is in the mobile version only.

   - What about the wrong order of notifications. Is this reproducible
(always)? Btw. it never happens to me, otherwise I...

Yes this is reproducible; i stepped through the source code for
sipeksdk (windows-desktop and windows-mobile versions) ,that is how i
managed to come up with the diagnosis i posted earlier. Here's a
summary: see file pjsipCallWrapper.cs 'Callbacks' region; for an
incoming call, onCallStateChanged(...) needs to be invoked so it can
set up the state machine for the incoming call in CallManager's table,
subsequently onCallIncoming(...) needs to be raised to retrieve the
state machine of the incoming call from CallManager's table, create a
session for the incoming call and notify the GUI. This sequence works
perfectly for the desktop version of the sdk but does not work for the
mobile version of the sdk [ onCallStateChanged(...) is never raised so
the state machine for the incoming call is never set up and when
onCallIncoming(...) is raised and tries to retrieve the state machine
for the incoming call, it never finds it and returns a
NullStateMachine so the GUI is never notified ]. To fix this, i
manually raise onCallStateChanged(...) when i get an incoming call and
all works as expected.

   - Are there any other known problems I should fix?

I do not know of any other problems as of this writing; i should be
able to let you know as i continue consuming the gr8 SDKs!

I hope I have submitted my clarifications in a useful way; hopefully
you could get a permanent solution for this problem.

Cheers,
izmoto.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gitch  
View profile  
 More options Apr 6 2009, 8:40 am
From: Gitch <ritchou...@gmail.com>
Date: Mon, 6 Apr 2009 05:40:36 -0700 (PDT)
Local: Mon, Apr 6 2009 8:40 am
Subject: Re: IncomingCallNotification event
On 6 avr, 11:20, izmoto <paul.mun...@gmail.com> wrote:

> ...
> izmoto.

Hi!
Just a question, I'm not sure. When you say "onCallStateChanged(...)
needs to be invoked so it can
set up the state machine for the incoming call in CallManager's
table ...", does it mean it's not implemented and it has to be ? Does
this mean code lines are missing ?

When you say "only in mobile version", I'm not agree. I compiled
myself libraries (libpjsipDll.so and SipekDll.dll) in Linux
environnement and no IncomingCallNotification event either. Could it
be the fact I'm using pjsipproject version 1.0.2 ? Could it be the
fact I disabled sound (--disable sound) in compilation ?

We will solve that problem, yes we can ! :-) :-)

Gitch


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gitch  
View profile  
 More options Apr 6 2009, 9:52 am
From: Gitch <ritchou...@gmail.com>
Date: Mon, 6 Apr 2009 06:52:30 -0700 (PDT)
Local: Mon, Apr 6 2009 9:52 am
Subject: Re: IncomingCallNotification event
I've made a test. I've put some messages in code to see exactly what
code was triggered on an effective incoming call. I've put messages on
there following methods :

pjsipCallWrapper.cs - onCallIncoming
pjsipDll.cpp - on_incoming_call

I've shown params of onCallIncoming (callId, sturi)

Started the application in debug mode, made an incoming call and
here's the result :

 15:39:28.946    tcplis:5060  TCP listener 10.192.73.26:5060: got
incoming TCP connection from 10.192.73.27:37985, sock=14
 15:39:28.946  tcps0x8584bc4  TCP server transport created
 15:39:28.948   pjsua_core.c  RX 1475 bytes Request msg INVITE/cseq=1
(rdata0x8584d60) from tcp 10.192.73.27:37985:
INVITE sip:5...@10.192.73.26:5060 SIP/2.0
Record-Route: <sip:10.192.73.27:5060;lr;sipXecs-rs=%2Afrom
%7EZWU3ODEyNGU%60.400_authrules%2Aauth%7E
%211bd2ca55f2ef538ca487176320f8c12b>
Max-Forwards: 16
Contact: <sip:5...@10.192.51.76:19856>
To: "5002"<sip:5...@10.192.73.27>
From: "5000"<sip:5...@10.192.73.27>;tag=ee78124e
Call-Id: YWExYTRiNTIyMGZlZGI1ZDdmMDFlOWJhZDljMTYxZGI.
Cseq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: X-Lite release 1100l stamp 47546
Content-Length: 422
Date: Mon, 06 Apr 2009 13:48:45 GMT
Via: SIP/2.0/TCP 10.192.73.27;branch=z9hG4bK-
sipXecs-237c1d0f0f1c3f6f54a89302c3b64b38fbda
Via: SIP/2.0/TCP 10.192.73.27;branch=z9hG4bK-
sipXecs-237997afdf783f72052cdb1812c393cc107b~09b700fcf2906e8f0095e757063ccd 1d
Via: SIP/2.0/UDP 10.192.73.27;branch=z9hG4bK-
sipXecs-2373a11e0483dff24dd260e6a2350189ef5d~9cbc4870653fc2eaea3ebfe2752f8e 3e
Via: SIP/2.0/UDP 10.192.51.76:19856;branch=z9hG4bK-d8754z-
cb2a557bb47ceb7c-1---d8754z-;rport=19856

v=0
o=- 6 2 IN IP4 10.192.51.76
s=CounterPath X-Lite 3.0
c=IN IP4 10.192.51.76
t=0 0
m=audio 48830 RTP/AVP 107 119 100 106 0 105 98 8 3 101
a=alt:1 1 : TJM3fXcT IjSyQ7Bk 10.192.51.76 48830
a=fmtp:101 0-15
a=rtpmap:107 BV32/16000
a=rtpmap:119 BV32-FEC/16000
a=rtpmap:100 SPEEX/16000
a=rtpmap:106 SPEEX-FEC/16000
a=rtpmap:105 SPEEX-FEC/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv

--end msg--
 15:39:28.957  pjsua_media.c  Media index 0 selected for call 0
 15:39:28.958   pjsua_core.c  TX 788 bytes Response msg 100/INVITE/
cseq=1 (tdta0x85a8618) to tcp 10.192.73.27:37985:
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 10.192.73.27;received=10.192.73.27;branch=z9hG4bK-
sipXecs-237c1d0f0f1c3f6f54a89302c3b64b38fbda
Via: SIP/2.0/TCP 10.192.73.27;branch=z9hG4bK-
sipXecs-237997afdf783f72052cdb1812c393cc107b~09b700fcf2906e8f0095e757063ccd 1d
Via: SIP/2.0/UDP 10.192.73.27;branch=z9hG4bK-
sipXecs-2373a11e0483dff24dd260e6a2350189ef5d~9cbc4870653fc2eaea3ebfe2752f8e 3e
Via: SIP/2.0/UDP 10.192.51.76:19856;rport=19856;branch=z9hG4bK-d8754z-
cb2a557bb47ceb7c-1---d8754z-
Record-Route: <sip:10.192.73.27:5060;lr;sipXecs-rs=*from~ZWU3ODEyNGU
%60.400_authrules*auth~!1bd2ca55f2ef538ca487176320f8c12b>
Call-ID: YWExYTRiNTIyMGZlZGI1ZDdmMDFlOWJhZDljMTYxZGI.
From: "5000" <sip:5...@10.192.73.27>;tag=ee78124e
To: "5002" <sip:5...@10.192.73.27>
CSeq: 1 INVITE
Content-Length:  0

--end msg--
******** pjsipCallWrapper.cs - onCallIncoming
******** pjsipCallWrapper.cs - callId : 0
******** pjsipCallWrapper.cs - sturi : <sip:5...@10.192.51.76:19856>
******** pjsipDll.cpp - on_incoming_call 15:39:36.484   pjsua_core.c
RX 329 bytes Request msg CANCEL/cseq=1 (rdata0x8584d60) from tcp
10.192.73.27:37985:

We see clearly both methods are called. We arrive to the wrapper, we
arrive to SipekSDK code but, and probably like izmoto said, nothing
happens to the application and CallManager_IncomingCallNotification is
neved called.

I tried this just to check if it wasn't a problem on pjsip code, or
version. Sasa, you, the God creator :-), is that normal that the
application callback is neved called ?

Thank you in advance for your time,

Regards

Gitch


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
izmoto  
View profile  
 More options Apr 6 2009, 10:19 am
From: izmoto <paul.mun...@gmail.com>
Date: Mon, 6 Apr 2009 07:19:35 -0700 (PDT)
Local: Mon, Apr 6 2009 10:19 am
Subject: Re: IncomingCallNotification event
Hi Gitch,

the CallManager (see file callManager.cs) has a dictionary
(Dictionary<int, IStateMachine> _calls) that maintains state machines;
if you review the function below located in file callManager.cs....

 private void OnIncomingCall(int sessionId, string number, string
info)
        {
            IStateMachine call = getCall(sessionId);

            if (call.IsNull) return;

            // inform automaton for incoming call
            call.State.incomingCall(number, info);

            // call callback
            if ((IncomingCallNotification != null) &&
(call.DisableStateNotifications == false)) IncomingCallNotification
(sessionId, number, info);
        }

- you can see that a call is made to function getCall(...) to retrieve
the state machine for the incoming call; if you follow through that
function you will see that it returns a NullStateMachine IIF it does
not find the state machine identified by the sessionId. so by the time
the above function is called it is expected that the state machine for
the incoming call will be already available in the _calls dictionary.
For this to happen, the OnCallStateChanged(...) event in file
pjsipCallWrapper.cs needs to have been raised prior to raising the
onCallIncoming(...) event so that the state machine for the incoming
call can be 'manufactured'. this is where the problem is;
OnCallStateChanged(...) is not called so state machine is not
manufactured and when onCallIncoming(...) is called which in turn
calls the above pasted function, a call to getCall(...) returns a
NullStateMachine and the function breaks so the event is never raised
to the GUI.

The  [temporary] solution now [sipeksdk_mobile.dll] is to manually
raise OnCallStateChanged(...) for incoming calls like shown below (see
comment named invoke callback) in file pjsipCallWrapper.cs :-

private static int onCallIncoming(int callId, string sturi)
        {
            string uri = sturi;
            string display = "";
            string number = "";

            if (null != uri)
            {
                // get indices
                int startNum = uri.IndexOf("<sip:");
                int atPos = uri.IndexOf('@');
                // search for number
                if ((startNum >= 0) && (atPos > startNum))
                {
                    number = uri.Substring(startNum + 5, atPos -
startNum - 5);
                }

                // extract display name if exists
                if (startNum >= 0)
                {
                    display = uri.Remove(startNum, uri.Length -
startNum).Trim();
                }
                else
                {
                    int semiPos = display.IndexOf(';');
                    if (semiPos >= 0)
                    {
                        display = display.Remove(semiPos,
display.Length - semiPos);
                    }
                    else
                    {
                        int colPos = display.IndexOf(':');
                        if (colPos >= 0)
                        {
                            display = display.Remove(colPos,
display.Length - colPos);
                        }
                    }
                }
            }

            // invoke callback
            ICallProxyInterface.BaseCallStateChanged(callId,
ESessionState.SESSION_STATE_INCOMING, ""); // This is a hack, izmoto!
            ICallProxyInterface.BaseIncomingCall(callId, number,
display);
            return 1;
        }

- at least, this works for me now but it is a hack; i hope we could
find a permanent solution.

- i hope you will find the information clear.

cheers,
izmoto.

On Apr 6, 4:52 pm, Gitch <ritchou...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gitch  
View profile  
 More options Apr 6 2009, 10:42 am
From: Gitch <ritchou...@gmail.com>
Date: Mon, 6 Apr 2009 07:42:03 -0700 (PDT)
Local: Mon, Apr 6 2009 10:42 am
Subject: Re: IncomingCallNotification event
Hi !

Thank you for your message. It's really clear for me now :-) The only
thing I wanted to know was if it was a code problem (apparently it
definitely is). I will try your solution tomorrow and I'll keep you in
touch. I hope Sasa's already on the solution :-)

Greatest,

Gitch

On Apr 6, 4:19 pm, izmoto <paul.mun...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Georges  
View profile  
 More options Apr 6 2009, 11:14 am
From: Georges <Georges.Labre...@gmail.com>
Date: Mon, 6 Apr 2009 08:14:05 -0700 (PDT)
Local: Mon, Apr 6 2009 11:14 am
Subject: Re: IncomingCallNotification event
Hi Sasa,

   - Do you use sources or prebuilt libraries (sipeksdk_mobile.dll and
   pjsip_mobile.dll)?

I had the "incoming callback method not being called" issue when
compiling the source of pjsipDll myself.
The problem is eliminated when I used the prebuilt
pjsipDll.dll_v0.3.108 library available here: http://code.google.com/p/sipeksdk/

Like I said, either there is an issue in my building process or in the
source currently available in the trunk.

Thanks and regards,

 - Georges

On Apr 3, 6:29 pm, Sasa Coh <sasa...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gitch  
View profile  
 More options Apr 7 2009, 3:20 am
From: Gitch <ritchou...@gmail.com>
Date: Tue, 7 Apr 2009 00:20:28 -0700 (PDT)
Local: Tues, Apr 7 2009 3:20 am
Subject: Re: IncomingCallNotification event
Hi Everybody!

I had the occasion to test izmoto's solution and  it does work.
IncomingCallNotification is now trigged in my application and call can
be started.
We agree it's probably not the nicest way to do it, but it does work
and really really thanks to you izmoto.

I'd really like an answer from Sasa about source code problem. Did we
something wrong or is there really a difference between source code
and pre-build library like Georges said and like I begin to believe ?

Greatest,

Gitch


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
izmoto  
View profile  
 More options Apr 7 2009, 3:27 am
From: izmoto <paul.mun...@gmail.com>
Date: Tue, 7 Apr 2009 00:27:15 -0700 (PDT)
Local: Tues, Apr 7 2009 3:27 am
Subject: Re: IncomingCallNotification event
Hi Gitch!

good to hear the [temporary] solution does work for you as well;
however, i hope Sasa can give us all the way forward.

cheers,
 izmoto.

On Apr 7, 10:20 am, Gitch <ritchou...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sasa Coh  
View profile  
 More options Apr 8 2009, 12:27 pm
From: Sasa Coh <sasa...@gmail.com>
Date: Wed, 8 Apr 2009 18:27:58 +0200
Local: Wed, Apr 8 2009 12:27 pm
Subject: Re: IncomingCallNotification event

Hello guys,

thanks a lot to clarify this. I'll take a look and get back to you ASAP. I
hope I can test it on a simulator since I don't have a windows mobile device
right now.

Kind regards,
sasa


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rahuljaiswa...@gmail.com  
View profile  
 More options Apr 15 2009, 2:18 am
From: rahuljaiswa...@gmail.com
Date: Tue, 14 Apr 2009 23:18:34 -0700 (PDT)
Local: Wed, Apr 15 2009 2:18 am
Subject: Re: IncomingCallNotification event
Hi,

I was still unable to get the incomming call.

I have made the changes as Paul has mention on his post but still
fails to get the notification.
http://groups.google.com/group/sipek/browse_thread/thread/4f511799d83...
on sipek google group

I have also tested the CAB file given on the link
http://code.google.com/p/sipekmobile/downloads/list

and i have tested it on HTC P3450, this application is able to make
call but it also unable to receive any incoming call.

I have updated my pjsipdll along with sipeksdk

i have used pjsipdll from the link
http://sipeksdk.googlecode.com/svn/trunk/pjsipdll/

and sipeksdk from the link
http://sipeksdk.googlecode.com/svn/trunk/SipekSdk/

and i have used pjproject-1.0.2.zip from the link
http://www.pjsip.org/download.htm

and along with all these i have used Mobile example given on
http://code.google.com/p/sipekapps/source/browse/#svn/trunk/MobileExa...

If i am using any thing wrong so please intimate me

Waiting for your reply.

Thanks & Regards,
Rahul

On Apr 8, 9:27 pm, Sasa Coh <sasa...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sasa Coh  
View profile  
 More options Apr 15 2009, 6:16 am
From: Sasa Coh <sasa...@gmail.com>
Date: Wed, 15 Apr 2009 12:16:12 +0200
Local: Wed, Apr 15 2009 6:16 am
Subject: Re: IncomingCallNotification event

Hi,

One more question: Did you test it on the windows mobile emulator or on the
"real" device?

FYI: I've reproduced the problem on the windows mobile emulator easily. And
that's expected since the emulator has many problems with itself (especially
network). Now I'm looking for someone to lend me the real windows mobile
device for testing (could take some time).

kind regards,
sasa

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rahuljaiswa...@gmail.com  
View profile  
 More options Apr 15 2009, 6:29 am
From: rahuljaiswa...@gmail.com
Date: Wed, 15 Apr 2009 03:29:51 -0700 (PDT)
Local: Wed, Apr 15 2009 6:29 am
Subject: Re: IncomingCallNotification event
Hi,

I have tested it on real device i.e HTC P-3450

Thanks,
Rahul

On Apr 15, 3:16 pm, Sasa Coh <sasa...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
izmoto  
View profile  
 More options Apr 16 2009, 4:17 am
From: izmoto <paul.mun...@gmail.com>
Date: Thu, 16 Apr 2009 01:17:17 -0700 (PDT)
Local: Thurs, Apr 16 2009 4:17 am
Subject: Re: IncomingCallNotification event
Hi Sasa,

One more question: Did you test it on the windows mobile emulator or
on the
"real" device?  -

- I tested on both; the IncomingCallNotification event was not being
raised in either (before the slight hack), but now it works.

Cheers.
izmoto.

On Apr 15, 1:16 pm, Sasa Coh <sasa...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 30   Newer >
« Back to Discussions « Newer topic     Older topic »