Re: [pjsua] Verify response headers

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

 



Hi Johan,
Thanks for the help. I will try to get that working. Related to this, I also need to add headers to every SIP request AND response. What is the best way to do this with PJSUA? The headers I want to add will be static (same for every request/response and never changing). Is there a way to do this directly? I also looked through the PJSUA callbacks, but I didn't see one that could be used for this. Is there a callback mechanism with PJLIB that can be used for this? What is the easiest way?

Kal

On Mon, Aug 22, 2016 at 11:04 PM, JOHAN LANTZ <johan.lantz@xxxxxxxxxxxxxx> wrote:
Check for 

case PJSIP_INV_STATE_CONNECTING:


In the:

on_call_state


callback. 


Inside the pjsip_event you have access to the full rdata struct where you can check all the headers.


Johan


From: pjsip on behalf of b17 c0de
Reply-To: pjsip list
Date: Monday 22 August 2016 at 22:10
To: pjsip list
Subject: Re: [pjsua] Verify response headers

To explain my question in more detail:

(1) Client  --[INVITE]--> Server
(2) Client <--[TRYING]--  Server
(3) Client <--[OK/200]--  Server

@ Step 3 I need to verify the headers of the 200 response on the client side. If the verification fails, I need to end the call immediately.


On Mon, Aug 22, 2016 at 10:03 PM, b17 c0de <b17c0de@xxxxxxxxx> wrote:
Hi,
I would like to check/verify the response headers of a SIP INVITE request. If the verification fails I would like to end the call. How can this be done in PJSUA?

Thanks,
Kal




Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição

_______________________________________________
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