Get Sip Call ID From Leg-A and pass it on to Leg-B

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Get Sip Call ID From Leg-A and pass it on to Leg-B

Post by skb007 »

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 Pattern
Call-ID = B%1

Please help.
Last edited by skb007 on Wed Oct 18, 2017 10:27 am, edited 2 times in total.
snuyzm
Posts: 97
Joined: Wed Feb 11, 2015 10:12 pm

Post by snuyzm »

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_tuto ... alplan.pdf
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

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 Pattern]
$addr = 10\.1\.1\.1
From = sip:(.+)@
$request= sip:123(.+)@
Call-ID = (.+)

[Deploy Pattern]
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.
Haddas
Posts: 170
Joined: Thu Jan 17, 2008 11:55 am

Post by Haddas »

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.
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

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?
Haddas
Posts: 170
Joined: Thu Jan 17, 2008 11:55 am

Post by Haddas »

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?
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

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.
Haddas
Posts: 170
Joined: Thu Jan 17, 2008 11:55 am

Post by Haddas »

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.
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

Is there any sample plug in source code available which manipulates the SDP?
Haddas
Posts: 170
Joined: Thu Jan 17, 2008 11:55 am

Post by Haddas »

Why does SDP relate Call-ID? Call-ID is one of SIP header not in SDP.
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

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: Select all


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
Haddas
Posts: 170
Joined: Thu Jan 17, 2008 11:55 am

Post by Haddas »

>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.
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

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.
Haddas
Posts: 170
Joined: Thu Jan 17, 2008 11:55 am

Post by Haddas »

&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.
Post Reply