Working with SIP Trunk and SFB CCE

Recently I deployed a Sonus CCE with a new SIP trunk line instead of a traditional ISDN line.
All went fine, but a stream of PSTN calls related issue sprung out. I did follow the same setup steps that I had successfully done with other (Sonus/Audiocodes) CCE deployments apart from the fact that this time I am using a SIP trunk line.

I’ll go on straight to core issues that some of you would encounter when you do the same (Sonus/Audiocodes) CCE deployment with a SIP trunk line.

It’s important and interesting to take note that I didn’t face this issue and didn’t have to make any changes with traditional ISDN linelike I did with the SIP Trunk.So, it is apparent that the issues faced and respective solutions are only applicable for SIP trunk or specific SIP provider.
Issues
When a SFB Online user (Enterprise Voice enabled and a telephone number assigned) makes an outgoing calls, and it failed – cannot make a successful outgoing call(s).
All incoming calls are working fine.

Outgoing Call(s) Failure Symptom(s)

  • Cannot make outgoing call(s).
  • You will hear an automated voice message from your SIP provider, something like “your call is restricted”when you made outgoing call(s).
  • Just simply outgoing call(s) failed.

Root Cause:
The root cause of the issue is that the SIP provider is in fact EXPECTING a certain SIP message format from the SIP MESSAGE sent from the Voice Gateway (Sonus, AudioCodes, etc), specificallyINVITE, FROM and P-ASSERTED IDENTITYHeaders.

Our SIP provider provides us with a supported SIP message format as follow. If you don’t have, you can ask one from your SIP provider.

It’s very imperative to note that SIP Trunk is very much different from ISDN line as in:

  • SIP provider expects a fully qualified SIP Message Format from your Gateway.
  • For example, a telephone number must be in E.164 format:
  • “+ Country code phone number”
  • +6565432178 = E.164 format for a Singapore telephone number.
  • SIP provider expects your “From and P-Asserted Identity” SIP Header to be appended by its domain name.
  • For example,
  • From:"Thet"sip:+
  • P-Asserted-Identity: "Thet" <sip:+
  • SIP provider expects yourINVITESIP Header to be appended by its domain name.
  • For example,
  • INVITE sip:+

With ISDN line, you have to remove “+” and local “country code (65) for Singapore” before sending outgoing call(s) to the ISDN. But with SIP, you have to keep “+” and “Country Code”.

SIP Message Manipulation Overview

First of all, it would be very beneficial for you if you read a very well-explained basic and fundamental SIP MESSAGE structure, its component, attributes and parameters, so that you know exactly where you need to modify the outgoing SIP MESSAGE in order to conform/comply with your/my SIP trunk service provider.
Ref:

Pay special attention to this mapping structure

“After selecting the appropriate Rule type, the Rule itself must be configured. Using the diagrams below, you can see which section of each rule corresponds with portions of a SIP message. Once you've identified what needs to be changed, consult the diagrams below to determine which configuration entry to employ to create the desired change”

I am going to refer this SIP MESSAGE structure thoroughly as my SIP roadmap andmodify it as and when required in order to get the desire outgoing SIP MESSAGE format I need and acceptable to my/your SIP service provider.

------This is outgoing call(s) that failed------

Sending To 172.31.119.249:5060 From 172.31.180.210:5060

Call-ID:

Time: 2017/04/24 10:47:57.022

INVITE sip:+:5060;user=phone SIP/2.0

Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, OPTIONS, REFER, REGISTER, INFO, UPDATE, PRACK

Call-ID:

Contact: <sip::5060;transport=UDP>

Content-Length: 320

Content-Type: application/sdp

CSeq: 2 INVITE

From:"Thet"<sip::5060;user=phone>;tag=ac1fb4d2-311bf;sgid=2

Max-Forwards: 69

P-Asserted-Identity: "Thet" <sip::5060;user=phone>

Supported: replaces,update,100rel

To:sip:+:5060;user=phone
------This is outgoing call(s) that failed------

As you see the outgoing SIP MESSAGE captured at using LX utility from Sonus Gateway,INVITE, From and P-Asserted Identity are NOT conformingwith SIP provider’s SIP Message Format requirements, and that’s why the outgoing call(s) is failing.

There are two issues:

1.INVITE, From and P-Asserted Identity are associated with the IP address, 172. 31.180.210, that’s assigned to us by our SIP service provider, sip:. Instead it must be associated with SIP provider’s SIP domain sip:+.So I must

  • Change from sip:to sip:

That is issue-1 and we must address it by using Message Manipulation Table.

Issue-2 is that, if you may notice, the SIP provider wants us to prepend +65 (+ and country)in front of the calling number.

2.So I must change from sip:tosip:+as well.

That is issue-2 and I must address it by using the Transformation Table.

To solve outgoing call(s) failure issue, I usedand modified/changed Message Manipulation Table and Transformation Table.

Message Manipulation
I have to manipulate outgoing SIP MESSAGEin the Sonus Gateway in order to conform/comply with our SIP service provider’s SIP MESSAGE FORMAT.
I used Message Manipulation Table to append/modify/alter SIP MESSAGE, and attached it to the SIP Provider Signalling Group’s “Outbound Message Manipulation” .

First of all, login to Sonus Gateway,

  • In the WebUI, click the Settings tab.
  • In the left navigation pane, go to SIP > Message Manipulation > Message Rule Table > + to create a new SIP Message Rule Table as.


Type a description, in my case, “Change IP to FQDN” – this is just a friendly name to remember what the rule is used for. Since our p


Click Message Manipulation > Message Rule Table > Change IP to FQDN > at the right-hand side, click Create a Rule > “Request Line Rule” to create an INVITE rule.

Based on the SIP Message structure, I have to change/modify the IP to my SIP service provider’s FQDN in INVITE Header – it’s mapped to “URI Host” – so I have to change from usr=param@ip to usr= the INVITE Header.

I named it “Change INVITE” as to describe that this Header is meant to change/modifyINVITE Header. ExpandtheRequest Line Value > URI Host > modify > Add/Edit > shims.starhub.net.sg and apply.

(Replace “shims.starhub.net.sg”) with your SIP service provider’s FQDN.

Now I have to create a “Header Rule” to change/modifyfrom IP to SIP provider’s FQDN at SIP FROM Header. – it’s mapped to “URI Host” – so I have to change from usr=param@ip to usr= in the FROM Header as follow.

Now I have to create a “Header Rule” to change/modify P-Asserted Identity Header to change from IP to SIP provider’s FQDN at SIP FROM Header. – it’s mapped to “URI Host” – so I have to change from usr=param@ip to usr= in the FROM Header as follow.

I am done with Message Manipulation and have to associate “Message Rule Table, Change IP to FQDN” I created with SIP Service ProviderSignalling Group.

Go to Signalling Group > your-sip-provider- > at the “Message Manipulation” > Enabled.

Then at the “Outbound Message Manipulation” section of SIP Service Provider Signalling Group, “Add/Edit” > choose “Change IP to FQDN” the message manipulation table I created above and click Apply.

I have done changing/modifying the following SIP Headers that our SIP service provider expects under Message Manipulation > Message Rule Tables > Change IP to FQDN.

  • INVITE (Request Line Rule)
  • FROM
  • P-Asserted Identity

The next final step is to change transformation rule so that the calling, called and redirecting numbers are prepended with “+” and “65 (country code) as follows;

Go to Transformation > From Microsoft Cloud Connector Edition Passthrough

Now the modifying/adjusting Transformation Table is done as shown above. We are good to go. Now make an outgoing call from an SFB client and capture call log through LX utility.

After all changes have been done, now we are able to make successful outgoing calls.

------This is outgoing call(s) succeeded------
Sending To 172.31.119.249:5060 From 172.31.180.210:5060
Call-ID:
Time: 2017/05/03 11:27:43.467
INVITE sip:+:5060;
user=phone SIP/2.0
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, OPTIONS, REFER, REGISTER, INFO, UPDATE, PRACK
Call-ID:
Contact: <sip:+65+:5060;transport=UDP>
Content-Length: 320
Content-Type: application/sdp
CSeq: 2 INVITE
From:"Thet"<sip:+65+:5060;user=phone>;tag=ac1fb4d2-5a1a7;sgid=2
Max-Forwards: 69
P-Asserted-Identity: "Thet" <sip:+65+:5060;user=phone>
Supported: replaces,update,100rel
To:<sip:99999888172.31.119.249:5060;user=phone>
User-Agent: SONUS SBC1000 6.1.0v457 Sonus SBC
Via: SIP/2.0/UDP 172.31.180.210:5060;branch=z9hG4bK-UX-ac1f-b4d2-1ca7a
X-Sonus-Diagnostics: SBCInternal;cid=630;media-mode="audio:DSP video:N/A";tdmchannel="b:0 t:2 g:1 c:8"

------This is outgoing call(s) succeeded------

Call Forwarding

There is one more issue that I have to highlight is that I did a call forwarding on my SFB account in this scenario.

External caller (User-A) > SFB Client (User-B) forwards call to  Mobile (User-C)

When User-C received the call, he is seeing SFB Client User-B’s number instead of original caller User-A’s telephone number.

We followed the step mentioned in the Sonus website, but it doesn’t work and User-C is still seeing User-B’s number instead of original caller User-A’s telephone number.
Ref:

After we checked with our SIP service provider, they said that they don’t support External Caller User-A’s number in the “FROM Header” – “From Header” must have one of the number I subscribed from them – so I couldn’t do much.
It’s noteworthy that some SIP service providers do not support that feature, and you have to inform users accordingly.
Some SIP service providers do support this feature, please check with them in advance and align expectation with users.