[OpenSIPS-Users] Users Digest, Vol 164, Issue 6

Ben Newlin Ben.Newlin at genesys.com
Wed Mar 9 19:08:33 UTC 2022


My guess is the lack of quoting is due to the SIP stack and not anything you are doing with your commands. The Name portion of a Name-Addr spec is only required to be quoted if certain special characters (most notably spaces) are present. Otherwise the quotes are not required. I’m guessing OpenSIPS’ SIP stack is just being efficient and only adding quotes when required. I’m not sure if that is configurable, but I’m not aware of any setting for it.

My guess is that if you were to try this:

$avp(ds)="a b c";
uac_replace_from($avp(ds),"");

You would find that the resulting output name would have quotes as required.

However, it should not matter as if quotes are not required then the receiving SIP agent should be fine with them not being present. May I ask why it is important to you that the quotes be present? Is it causing an issue with some non-compliant device?

Ben Newlin

From: Users <users-bounces at lists.opensips.org> on behalf of Kevin Wormington <kworm at missouri-telecom.com>
Date: Wednesday, March 9, 2022 at 1:26 PM
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Users Digest, Vol 164, Issue 6
AVP is for sure supported on 3.1.x and up.  We use the following:

uac_replace_from($avp(caller_cnam),"”);

> On Mar 8, 2022, at 8:12 AM, Alain Bieuzent <alain.bieuzent at free.fr> wrote:
>
> Hmm , not sure $avp is supported can you try with $var
>
> $var(ds)="abc";
>         uac_replace_from($var(ds),"");
>
>
> De : Users <users-bounces at lists.opensips.org> au nom de Vinayak Makwana <vinayak.makwana at ecosmob.com>
> Répondre à : OpenSIPS users mailling list <users at lists.opensips.org>
> Date : mardi 8 mars 2022 à 14:01
> À : <users at lists.opensips.org>
> Objet : Re: [OpenSIPS-Users] Users Digest, Vol 164, Issue 6
>
> Hello Alain Bieuzent
>
> I tried with the uac_replace_from() function also but not getting the proper result.
>
> Here's my input & output result:
> INPUT:      From:"abc"<sip:username at x.x.x.x;transport=UDP>;tag=6a8eda3f
> OUTPUT:  From:abc<sip:username at x.x.x.x;transport=UDP>;tag=6a8eda3f
>
> Here's my logic:
> $avp(ds)="abc";
>         uac_replace_from($avp(ds),"");
>
> So Can you please tell me what is an issue why not getting quotes
>
> Thanks in advance
> Vinayak Makwana
>
> On Tue, Mar 8, 2022 at 5:30 PM <users-request at lists.opensips.org> wrote:
>> Send Users mailing list submissions to
>>         users at lists.opensips.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> or, via email, send a message with subject or body 'help' to
>>         users-request at lists.opensips.org
>>
>> You can reach the person managing the list at
>>         users-owner at lists.opensips.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Users digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Header manipulation (Vinayak Makwana)
>>    2. Re: Header manipulation (Alain Bieuzent)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Tue, 8 Mar 2022 16:11:12 +0530
>> From: Vinayak Makwana <vinayak.makwana at ecosmob.com>
>> To: users at lists.opensips.org
>> Subject: [OpenSIPS-Users] Header manipulation
>> Message-ID:
>>         <CAPHmyfzdYGNoJdxX1FFjfLxOZeGQUnuAPxbAv+t8H2YX+8qXCA at mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hello All,
>>
>> I want to replace uri-display in the FROM header using the avp_subst
>> function. So, can anyone suggest a solution ?
>>
>> Here's My scenario:
>> Main:->  From:"abc"<sip:username at x.x.x.x;transport=UDP>;tag=6a8eda3f
>> After Changes ->  From:"pqrs"<sip:username at x.x.x.x
>> ;transport=UDP>;tag=6a8eda3f
>>
>> Many Thanks
>> Vinayak Makwana
>>
>> --
>> *Disclaimer*
>> In addition to generic Disclaimer which you have agreed on our
>> website, any views or opinions presented in this email are solely those of
>> the originator and do not necessarily represent those of the Company or its
>> sister concerns. Any liability (in negligence, contract or otherwise)
>> arising from any third party taking any action, or refraining from taking
>> any action on the basis of any of the information contained in this email
>> is hereby excluded.
>>
>>
>>
>> *Confidentiality*
>> This communication (including any
>> attachment/s) is intended only for the use of the addressee(s) and contains
>> information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading,
>> dissemination, distribution, or copying of this communication is
>> prohibited. Please inform originator if you have received it in error.
>>
>>
>> *Caution for viruses, malware etc.*
>> This communication, including any
>> attachments, may not be free of viruses, trojans, similar or new
>> contaminants/malware, interceptions or interference, and may not be
>> compatible with your systems. You shall carry out virus/malware scanning on
>> your own before opening any attachment to this e-mail. The sender of this
>> e-mail and Company including its sister concerns shall not be liable for
>> any damage that may incur to you as a result of viruses, incompleteness of
>> this message, a delay in receipt of this message or any other computer
>> problems.
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <http://lists.opensips.org/pipermail/users/attachments/20220308/d383bf19/attachment-0001.html>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Tue, 08 Mar 2022 11:51:45 +0100
>> From: Alain Bieuzent <alain.bieuzent at free.fr>
>> To: OpenSIPS users mailling list <users at lists.opensips.org>
>> Subject: Re: [OpenSIPS-Users] Header manipulation
>> Message-ID: <FA2BF751-1E38-4780-AC7D-682CFE3384B4 at free.fr>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hi Vinayak,
>>
>>
>>
>> Try with uac_replace_from([display],uri)
>>
>>
>>
>> Ragards
>>
>>
>>
>> De : Users <users-bounces at lists.opensips.org> au nom de Vinayak Makwana <vinayak.makwana at ecosmob.com>
>> Répondre à : OpenSIPS users mailling list <users at lists.opensips.org>
>> Date : mardi 8 mars 2022 à 11:43
>> À : <users at lists.opensips.org>
>> Objet : [OpenSIPS-Users] Header manipulation
>>
>>
>>
>> Hello All,
>>
>> I want to replace uri-display in the FROM header using the avp_subst function. So, can anyone suggest a solution ?
>>
>> Here's My scenario:
>> Main:->  From:"abc"<sip:username at x.x.x.x;transport=UDP>;tag=6a8eda3f
>> After Changes ->  From:"pqrs"<sip:username at x.x.x.x;transport=UDP>;tag=6a8eda3f
>>
>> Many Thanks
>> Vinayak Makwana
>>
>>
>>
>> Disclaimer
>>
>> In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded.
>>
>>
>>
>> Confidentiality
>>
>> This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error.
>>
>>
>>
>> Caution for viruses, malware etc.
>>
>> This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems.
>>
>> _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <http://lists.opensips.org/pipermail/users/attachments/20220308/75aa149d/attachment-0001.html>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> ------------------------------
>>
>> End of Users Digest, Vol 164, Issue 6
>> *************************************
>
> Disclaimer
> In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded.
>
> Confidentiality
> This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error.
>
> Caution for viruses, malware etc.
> This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems.
> _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220309/7222c3b2/attachment-0001.html>


More information about the Users mailing list