Discussion:
[pjsip] How to put Proxy-Authorization in first SIP INVITE?
Rodrigo Pimenta Carvalho
2017-06-06 12:58:21 UTC
Permalink
Hi.


I have a project with 2 peers (SIP agents) and 1 SIP server (OpenSIPS).


When a peers send SIP INVITE to the other peers, this first INVITE doesn't have the "Proxy-Authorization" field in the header.

Then, the OpenSIPS asks for the "Proxy-Authorization" and a second SIP INVITE is sent with this field.


How to make my peer send any first SIP INVITE already containing the "Proxy-Authorization" field? Is there any configuration or flag that I have to change?


My intention is to reduce the number of SIP messages the the OpenSIPS has do handle. Is this appropriated?


Any hint will be very helpful!


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
Gang Liu
2017-06-07 02:24:08 UTC
Permalink
normally SIP Proxy will ignore and ask UA do challenge again.

regards,
Gang

On Tue, Jun 6, 2017 at 8:58 PM, Rodrigo Pimenta Carvalho <***@inatel.br>
wrote:

> Hi.
>
>
> I have a project with 2 peers (SIP agents) and 1 SIP server (OpenSIPS).
>
>
> When a peers send SIP INVITE to the other peers, this first INVITE doesn't
> have the "Proxy-Authorization" field in the header.
>
> Then, the OpenSIPS asks for the "Proxy-Authorization" and a second SIP
> INVITE is sent with this field.
>
>
> How to make my peer send any first SIP INVITE already containing the "
> Proxy-Authorization" field? Is there any configuration or flag that I
> have to change?
>
>
> My intention is to reduce the number of SIP messages the the OpenSIPS has
> do handle. Is this appropriated?
>
>
> Any hint will be very helpful!
>
>
> Best regards.
>
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 <+55%2035%203471-9200> RAMAL 979
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> ***@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
Andrzej Grajnert
2017-06-07 08:54:19 UTC
Permalink
Hi, I was looking for the last time.
And here is what I fund in sip_auth_clinet.c
https://trac.pjsip.org/repos/browser/pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c#L543

I'm using
#define PJSIP_AUTH_HEADER_CACHING 1
#define PJSIP_AUTH_AUTO_SEND_NEXT 1
, and its add auth headers for register messages

regards,
Andrzej


W dniu 2017-06-07 o 04:24, Gang Liu pisze:
> normally SIP Proxy will ignore and ask UA do challenge again.
>
> regards,
> Gang
>
> On Tue, Jun 6, 2017 at 8:58 PM, Rodrigo Pimenta Carvalho
> <***@inatel.br <mailto:***@inatel.br>> wrote:
>
> Hi.
>
>
> I have a project with 2 peers (SIP agents) and 1 SIP server (OpenSIPS).
>
>
> When a peers send SIP INVITE to the other peers, this first INVITE
> doesn't have the "Proxy-Authorization" field in the header.
>
> Then, the OpenSIPS asks for the "Proxy-Authorization" and a second
> SIP INVITE is sent with this field.
>
>
> How to make my peer send any first SIP INVITE already containing the
> "Proxy-Authorization" field? Is there any configuration or flag that
> I have to change?
>
>
> My intention is to reduce the number of SIP messages the the
> OpenSIPS has do handle. Is this appropriated?
>
>
> Any hint will be very helpful!
>
>
> Best regards.
>
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 <tel:+55%2035%203471-9200> RAMAL 979
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> ***@lists.pjsip.org <mailto:***@lists.pjsip.org>
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> <http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org>
>
>
>
>


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

pjsip mailing list
***@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Rodrigo Pimenta Carvalho
2017-06-07 11:36:38 UTC
Permalink
Hi.


Thank all of you!

If necessary, I can change the SIP server behavior.


Regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


________________________________
De: pjsip <pjsip-***@lists.pjsip.org> em nome de Andrzej Grajnert <***@gmail.com>
Enviado: quarta-feira, 7 de junho de 2017 05:54
Para: pjsip list; Gang Liu
Assunto: Re: [pjsip] How to put Proxy-Authorization in first SIP INVITE?

Hi, I was looking for the last time.
And here is what I fund in sip_auth_clinet.c
https://trac.pjsip.org/repos/browser/pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c#L543

I'm using
#define PJSIP_AUTH_HEADER_CACHING 1
#define PJSIP_AUTH_AUTO_SEND_NEXT 1
, and its add auth headers for register messages

regards,
Andrzej


W dniu 2017-06-07 o 04:24, Gang Liu pisze:
> normally SIP Proxy will ignore and ask UA do challenge again.
>
> regards,
> Gang
>
> On Tue, Jun 6, 2017 at 8:58 PM, Rodrigo Pimenta Carvalho
> <***@inatel.br <mailto:***@inatel.br>> wrote:
>
> Hi.
>
>
> I have a project with 2 peers (SIP agents) and 1 SIP server (OpenSIPS).
>
>
> When a peers send SIP INVITE to the other peers, this first INVITE
> doesn't have the "Proxy-Authorization" field in the header.
>
> Then, the OpenSIPS asks for the "Proxy-Authorization" and a second
> SIP INVITE is sent with this field.
>
>
> How to make my peer send any first SIP INVITE already containing the
> "Proxy-Authorization" field? Is there any configuration or flag that
> I have to change?
>
>
> My intention is to reduce the number of SIP messages the the
> OpenSIPS has do handle. Is this appropriated?
>
>
> Any hint will be very helpful!
>
>
> Best regards.
>
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 <tel:+55%2035%203471-9200> RAMAL 979
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> ***@lists.pjsip.org <mailto:***@lists.pjsip.org>
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> <http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org>
>
>
>
>


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

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