Re: Detecting callee pickup

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

 



Hi,
it's called early media, so the PBX/C5 Softswitch has to return a "183" status as stated in the RFC.
Draft:
https://tools.ietf.org/html/draft-rosenberg-sip-early-media-00

So, the call state confirmed is the thing you're searching for.
Snippet to demonstrate the "confirmed" state: (on_call_state callback using pjsua).
Callback:
https://www.pjsip.org/pjsip/docs/html/structpjsua__callback.htm#a8029ac58404a39067691a1530a2b585a

Snippet taken from my call quality check program, where the wav file starts when the call has been confirmed:

/*
 * Handler when invite state has changed.
 */
void on_call_state(pjsua_call_id call_id, pjsip_event *e)
{
  pjsua_call_info call_info;
  pj_status_t status;

  PJ_UNUSED_ARG(e);

  pjsua_call_get_info(call_id, &call_info);

  if (call_info.state == PJSIP_INV_STATE_CONFIRMED) {
    if ( pj_stristr(&call_info.remote_info, &app_config.remote_contact) != NULL ) {
      status = pjsua_conf_connect(app_config.wav_conf_port_id, call_info.conf_slot);
      if (status != PJ_SUCCESS) program_exit("Error connecting wave port to call slot", status, CRITICAL);
    }
  }

Hope that helps.

Best regards

Franz

________________________________________
Von: pjsip <pjsip-bounces@xxxxxxxxxxxxxxx> im Auftrag von Andreas Wehrmann <a.wehrmann@xxxxxxxxxx>
Gesendet: Mittwoch, 18. Dezember 2019 17:20
An: pjsip@xxxxxxxxxxxxxxx
Betreff: Re:  Detecting callee pickup

On 18.12.19 16:54, Martin Schmid via pjsip wrote:
> Hello everybody
>
> I'm seraching for a solution to detect the callee pickup.
> The 'confirmed' arrives at a very early stage, long before the callee
> picks up the phone.
> Is there a way to detect the pickup? I don't see much in the callInfo.
>
> Regards,
>
> Martin

Are you calling through a PBX?
They sometimes accept calls immediately and play some kind of music-on-hold
in which case you're not able to directly find out when the actual party
you're trying to reach picks up.

All the best,
Andreas


_______________________________________________
Visit our blog: http://blog.pjsip.org

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

_______________________________________________
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