Adding a pre-defined SIP header to outgoing leg

This script adds a pre-defined header to the outgoing leg.

Attachments

Adding a pre-defined SIP header to outgoing leg Attachment
add_sip_h.zip Delete

Admin,

Thanks for providing the sample script.

I am trying to follow the instructions and I am stuck at step # 2.
Per the following instructions :

CODE:
# 2- Include new script in main script '# Gateway -> Routing Scripts -> [Select main script]

I am unable to find the “main script”. Under routing scripts ,there is a section called main scripts which has lots of scripts mentioned. Which script to select under the main scripts section?
Further I want this to limit the custom SIP header addition only for calls going out via particular NAP, lets say NAP_CUSTOM.

Hi Skb007,

Your main script can vary depending on your setup, but by default it is simple_routing_sbc.rb
image
On your Routing Script page you can see the scripts that has the main designation, and you can go into that script to confirm it is the one being used by checking if it’s set to “Load on startup”
image
Let me know if you have any other questions!

Cheers,
Joshua

Joshua,

Appreciate your help. I was able to make it work. Your guess was correct, simple_routing_sbc.rb is the main script.

Now SBC is adding the customer header for ALL outbound calls, how can i limit it to a route or NAP?