[OpenSIPS-Users] I need some help in attr matching while forming the Branch .

Ben Newlin Ben.Newlin at genesys.com
Wed Oct 18 13:37:43 UTC 2023


Sasmita,

Your examples all contain mixed use of semicolons and commas. Without any description or context, it’s very difficult to tell what or how you expect these to match.

Having said that, I recommend making use of OpenSIPS transformations [1]. The parameters list transformations [2] specifically, as they operate on semicolon separated “key=value” pairs, just like you have.

Depending on what operation you are expecting with respect to the commas, you may be able to combine that with the string select transformation [3] to get your desired outcome.

[1] https://www.opensips.org/Documentation/Script-Tran-3-2
[2] https://www.opensips.org/Documentation/Script-Tran-3-2#toc60
[3] https://www.opensips.org/Documentation/Script-Tran-3-2#toc7

Ben Newlin

From: Users <users-bounces at lists.opensips.org> on behalf of Sasmita Panda <spanda at 3clogic.com>
Date: Wednesday, October 18, 2023 at 6:34 AM
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] I need some help in attr matching while forming the Branch .
 EXTERNAL EMAIL - Please use caution with links and attachments

________________________________
Hi All ,

Any help on this ?


Thanks & Regards
Sasmita Panda
Senior Network Testing and Software Engineer
3CLogic , ph:07827611765


On Tue, Oct 17, 2023 at 7:54 PM Sasmita Panda <spanda at 3clogic.com<mailto:spanda at 3clogic.com>> wrote:
Hi All ,

My requirements seem complicated to me. I dont know whether I am right or wrong .
I am using opensips 1.11 (I have opensips 3.2 as well )

scenario 1:
989898 - is registered from 3 different  contact with different call-info header . and I saved the call-info header in attr column while saving data .

1 contact : call-info : x=hr,network;y=sales,z=marketing
2nd contact : call-info : x=hr;y=sales,z=marketing
3rd contact : call-info : x=hr,network;y=sales,z=marketing

INVITE :
    call-info :  x=hr;y=sales

Now while forming a branch for this INVITE , how do I compare this call-info with attr to get all the contact and then do serial forking on this ?

scenario 2:
989898 - is registered from 3 different  contact with different call-info header . and I saved the call-info header in attr column while saving data .

1 contact : call-info : x=hr,network;y=sales,z=marketing
2nd contact : call-info : x=hr;y=sales,z=marketing
3rd contact : call-info : x=hr,network;y=sales,z=marketing

INVITE :
    call-info :  call-info : x=hr,network;y=sales,z=marketing

In this I am getting only 1 contact where there is exact match . And I am able to gove call to that contact .

I am stuck on the 1st scenario . I am thinking of exec module to use on this . But not getting any better examples of how I do this . Please anybody help me out .

Any kind of help is appreciated . thank you in advance .


Thanks & Regards
Sasmita Panda
Senior Network Testing and Software Engineer
3CLogic , ph:07827611765
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20231018/f7db08f5/attachment-0001.html>


More information about the Users mailing list