SOLVED Adding custom SIP headers to outbound calls

Status
Not open for further replies.

ZIain

Member
Feb 22, 2019
30
0
6
52
Hi,

One of my SIP trunk providers requires me to add a custom SIP header, which they then pass through to CDR records to help with billing. I'm not sure i'm looking in the right place, but I thought I would be able to add it to the Dialplan of an outbound route. I've tried with a tag of "action" with a type of "set" and data as the required header and restarted the gateway, i've also set the type as "export" but neither of my attempts seem to have work. I've also watched the training videos in the members section and, unless missed it, haven't seen anything in those either. Anyone have any ideas?

Thanks
 

ZIain

Member
Feb 22, 2019
30
0
6
52
Hi,

Thank you for your help.

That is pretty much what I had, but didn't have the inline option set to true, which i do now, but it's still not working. I have checked the xml and that checks out the same as yours, and the SIP trunk provider has provided me the trace of the INVITE but i'm still not seeing the custom header.

Do I need to restart anything else besides the gateway? Any other pointers?

Thanks.
 

ZIain

Member
Feb 22, 2019
30
0
6
52
Thanks both for your help, you pointed me in the right direction. It turned out to be me not checking what I was doing, I'd copied and pasted the header which included a : instead of =.
 

mbogersr

New Member
May 5, 2021
16
4
3
76
The above provided by kt351b works like a charm with BulkVS. However, They require an X header from each extension for uniquely identifying the station a call came from going out to E911. The requirement it X-ng911 Room 1001 as an example. My problem is, I don't know how to add the X header to an extension.
Any help would be much appreciated
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
Something along the lines of:

<action application="set" data="sip_h_ X-ng911r=${effective_caller_id_number}"/>

Also, please don't reopen solved threads, start your own.
 

ad5ou

Active Member
Jun 12, 2018
884
195
43
The above provided by kt351b works like a charm with BulkVS. However, They require an X header from each extension for uniquely identifying the station a call came from going out to E911. The requirement it X-ng911 Room 1001 as an example. My problem is, I don't know how to add the X header to an extension.
Any help would be much appreciated
Usually better to start a new thread, but if you followed along with the above solution, you would want to use the ${sip_from_user} variable and put the setting in your outbound dial plan for 911
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
The reason I ask for old threads not to be reopened is because you may have people who were 'watching' the thread. If you add to the solved thread, they will all receive alerts for something they have no desire to. It just a bit friendlier to start your own.
 
Status
Not open for further replies.