SIP custom fields

Hi all,

I’m trying to use an asterisk PBX to connect devices using a customized SIP version.

This devices use additional field both within INVITE method and 200OK.

I’ve experienced that asterisk act as a back to back entity and so re-generates the SIP messages from zero, removing all the custom fields.

Moreover I’ve used SIPAddHeader and I was able to copy and paste the custom fields within the INVITE Method… but my connections con’t comes up because additional headers are “removed” from 200OK message. So I guess SIPAddHeader is not the right way.

Is there a way to make these message pass through asterisk as they are? Moreover is MESSAGES not managed by asterisk?

Thank You in advance.

If you hit a square peg with a hammer long enough it will go in a round hole.

Again, it is a B2BUA and does NOT “pass through” anything. Again you need a proxy to do what you want, that’s why it is called a proxy :wink: (oh well)


As I wrote in my first comment I was able to pass through all the INVITE custom headers by sipadder commands on extension.conf.
Unfortunately, it seems that SIPAddheader works only on the INVITE method and I have custom headers also on other messages.

I’ll try also on Digium forum to check if there’s any chance, otherwise I’ll change my test bed.

Thank You

Asterisk is a B2BUA so nothing is “passing through”, you would need to disassemble the inbound session and use asterisk’s sipaddheader command on the new leg, but this is a FreePBX forum you probably need the Digium Asterisk forum but you should really be using a proxy to do all that.

Thank You,

Indeed I know it’s a B2B. I was asking if it exists a particular configuration allowing custom headers passing through.


Asterisk is a B2BUA not a proxy. It’s supposed to start a new call leg.

It’s just doing what the RFC dictates for the type of device.

It’s not an egg laying milk pig.

But the abrasion can hurt on the way in :slight_smile: