Re: [Android] Problem incoming call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Sure however I’m working with the Java code and not directly with the C code of the library. Well, it was a bit tricky but actually it’s already specified in the doc. 

```

For incoming calls, the call instance is created in the callback function as shown above. Application should make sure to store the call instance during the lifetime of the call (that is until the call is disconnected)```.

 I’ve created an instance of my call Object in the callback. In my code it’s an attribute 

private

MyCallObject 

incomingCall

; 

@Override

public void

onIncomingCall

(OnIncomingCallParam prm) {

Timber.

d

(

"Incoming call "

+ prm.getCallId())

;

incomingCall

=

new

MyCallObject

(

this,

prm.getCallId()

,

pjsipUtil

.getEndpoint())

;

/**

* Incoming call constructor.

*

*

@param

acc

the account which own this call

*

@param

callId

the id of this call

*/

public

AircallSipCall

(Account acc

, int

callId

,

Endpoint endPoint) {

super

(acc

,

callId)

;

this

.

endPoint

= endPoint

;

}

Just to be sure that the garbage collector doesn’t see my object as out of scope. I hoped that I was able to help you. 

Cheers,

Fanilo Gabaud

Sent from
https://polymail.io/?utm_source=polymail&utm_medium=referral&utm_campaign=signature

On ven. 23 sept. 2016 at 12:02 Lokesh Bhat

<
mailto:Lokesh Bhat <lokeshbhat1991@xxxxxxxxx>
> wrote:

a, pre, code, a:link, body { word-wrap: break-word !important; }

we are too facing the same problem. Kindly let me know if you have got any solution.

_______________________________________________

Visit our blog:
http://blog.pjsip.org
pjsip mailing list
mailto:pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

On Mon, Aug 22, 2016 at 2:20 PM, Fanilo Gabaud

<
mailto:fanilo@xxxxxxxxxx
>

wrote:

Hello everyone,

I’m trying to make incoming calls working  on Android. However I’m facing some issues, when I’m receiving an incoming, the callback in my Account class is called but as soon as I’m trying to answer to the call I’m getting this issue : 

!Answering call 0: code=200

.Invalid call_id 0 in pjsua_call_answer()

pjsua_call_answer2(id, param.p_opt, prm.statusCode, param.p_reason, param.p_msg_data) error: INVITE session already terminated (PJSIP_ESESSIONTERMINATED)

Not really what’s wrong here and why the session is already terminated when I’m answering. Thanks.

Best regards,

Fanilo Gabaud

Sent from
https://polymail.io/?utm_source=polymail&utm_medium=referral&utm_campaign=signature

______________________________

_________________

Visit our blog:
http://blog.pjsip.org
pjsip mailing list
mailto:pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--

Thanks and Regards

~ Lokesh Bhat
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux