Modify SIP INVITE

Hi all,

I am working with this configuration:

PC <==> WebRTC/Asterisk <==> SIP Phone

I have a WebRTC interface with an Asterisk server (SipML5).
I send INVITE from my PC to the Asterisk (encapsulated in Websocket) and then, the Asterisk server transmits this INVITE with SIP to the destination.
In this configuration, I need to make calls to “urn:service:sos@IP”

I would like to modify the INVITE message, at the level of Asterisk, to:

  • remove the prefixe “sip:” in the field “To” and in the Request-URI,
  • be able to send an invite to “urn:service:sos@IP”.

For the moment, when I send the INVITE to “urn:service:sos”,
Asterisk adds “sip:” to my INVITE message and don’t copy the “:service:sos”.
So the INVITE look like this: " INVITE sip:urn@IP", and the Field “To” is the same.

I know I can not modify the INVITE with the function SipAddHeader.
But is there a solution that allow me to modify SIP headers at my convenience?

Thank you,
Fred.

I hope you have good C programming skills, as you will need to modify the SIP channel driver. If you can get any support on that, it will come from the developer support resources, not the end user ones.

Thank you for your answer David. I will try with the developers so.