Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Get Sip Call ID From Leg-A and pass it on to Leg-B
Author Message
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Tue Oct 18, 2016 4:33 pm    Post subject: Get Sip Call ID From Leg-A and pass it on to Leg-B Reply with quote

1. Brekeke Product Name and Version: Brekeke SIP Server 3.6.2.5

2. Java version:1.7

3. OS type and the version: 64-bit RHEL6.6

4. UA (phone), gateway or other hardware/software involved:

5. Your problem: How to get call-id from leg-A and prefix it with "B" and send it to leg-B

If LegA Call id = abc12345def
I want to send leg-B call id as Babc12345def

This is what I tried:

Matching Patterns
Call-ID = (.+)
Deploy Patterns
Call-ID = B%1

Please help.


Last edited by skb007 on Wed Oct 18, 2017 10:27 am; edited 2 times in total
Back to top
View user's profile
snuyzm
Brekeke Talented


Joined: 11 Feb 2015
Posts: 97

PostPosted: Wed Oct 19, 2016 10:06 am    Post subject: Reply with quote

Are you talking about Caller-ID or SIP's Call-ID header?

And also .. I recommend you read DialPaln tutorial.
http://www.brekeke.com/doc/sip/sip_tutorial_dialplan.pdf
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Thu Oct 20, 2016 1:01 pm    Post subject: Reply with quote

I am talking about SIP Call-ID. I have gone through the DialPlan tutorial but could not figure out.

Here is my existing dialPlan

Matching Patterns
$addr = 10\.1\.1\.1
From = sip:(.+)@
$request = sip:123(.+)@
Call-ID = (.+)
Deploy Patterns
From = sip:%1@10.2.2.2
To = sip:%2@10.3.3.3
$b2bua = true
$rtp = false
$session = sdp
&sdp.audio.a.1 = ptime:20
&sdp.audio.a.2 = silenceSupp:off - - - -
Call-ID = B%3


Last edited by skb007 on Wed Oct 18, 2017 10:26 am; edited 1 time in total
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Thu Oct 20, 2016 8:40 pm    Post subject: Reply with quote

Why do you need to change Call-ID?

Also "$getUri(Call-ID)" in your Matching Patterns will not work because Call-ID is not SIP-URI.
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Fri Oct 21, 2016 7:01 am    Post subject: Reply with quote

There is a application requirement to for us to modify the SIP Call-ID as I have explained. IS there any way to achieve it?
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Fri Oct 21, 2016 9:42 am    Post subject: Reply with quote

Call-ID is just unique string and it doesn't have any meanings.

Why does your application need to change it?
Does it manage both original and modified Call-ID?
Does it require "B" in the front of Call-ID?
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Fri Oct 21, 2016 9:52 am    Post subject: Reply with quote

Our application uses SIP Call-ID for CDR reconciliation purposes.

Here is what I want:
Lets say SIP Call-Id for leg-A =aaabbbccc
I want to send Call-ID for leg-B =Baaabbbccc

In other words, I want to save leg-A SIP Call-ID into a variable.
Prefix the variable with letter "B" and send it as SIP Call-ID of leg-B.
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Fri Oct 21, 2016 10:03 am    Post subject: Reply with quote

For replacing Call-ID with a unique value, let you enable "B2B-UA mode" in [Configuration]->[SIP] page.

But there are no ways to specify "B" as the prefix of Call-ID.
If you write a plugin, it is possible.
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Mon Oct 24, 2016 11:00 am    Post subject: Reply with quote

Is there any sample plug in source code available which manipulates the SDP?
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Mon Oct 24, 2016 11:15 am    Post subject: Reply with quote

Why does SDP relate Call-ID? Call-ID is one of SIP header not in SDP.
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Wed Oct 18, 2017 10:26 am    Post subject: Reply with quote

I completely understand that SIP Call-Id is a unique identifier and there is no other significance of it in the call setup. Following is the reason, we need to manipulate set the Call-ID as I have explained.

We know the SIP Call-ID of the call which our application sends to BSS but we don't know the SIP Call-ID of the call which BSS sends to our provider. Hence we can not reconcile the call details with our providers because call details reconciliation is based upon the SIP Call-ID.

I completely understand that there is no other product available which does not allow us to assign the Call-ID that is the reason we want to switch to BSS.

I have a basic dial Plan plugin working which can extract the call of the incoming call but I don't know how to set the call id on the outgoing call. Please help.



Code:


String sipcallid = sippacket.getValue("Call-ID");

I need to know something like below. (I know there is no setValue )
sippacket.setValue("Call-ID") = sipcallid;



What is the use for :
&net.sip.replace.callid
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Thu Oct 19, 2017 7:49 pm    Post subject: Reply with quote

>We know the SIP Call-ID of the call which our application sends to BSS
> but we don't know the SIP Call-ID of the call which BSS sends to our
> provider.


Do you want to keep the original Call-ID what your application sends?

If so, remove "$b2bua=true" from the DialPlan.
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Thu Oct 26, 2017 6:26 am    Post subject: Reply with quote

There are various reason why we are using Brekeke, B2BUA is one of them. We can not remove "$b2bua-true".

How can I assign a called using plugin?

Please explain the use case for the
&net.sip.replace.callid.
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Thu Oct 26, 2017 9:22 am    Post subject: Reply with quote

&net.sip.replace.callid = true :Replace Call-ID, From-Tag and To-Tag
&net.sip.replace.callid = false :Keep original Call-ID, From-Tag and To-Tag

Try the following at Deploy Pattern.
-------------------
$b2bua = true
&net.sip.replace.callid = false
-------------------
It keeps the original Call-ID even though B2B-UA is enabled.

If it doesn't meet the requirement, I recommend you to contact Brekeke's tech support.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1