Skip to main content

Add Diversion header only if the call is forwarded or transfered

Posted by diffen on Mon, 08/30/2010

Hello

We have a bit of a situation here, we would like to add a diversion header to out going calls only if they are forwarded or transferred. We can add the diversion header on the trunk but the problem is that the diversion header is included on all outgoing calls.

Does anyone have any solution on this one?


Submitted by eeman on Mon, 08/30/2010 Permalink

the problem is the diversion header does not continue to pass through the system across channels. If asterisk receives a call with extra sip headers it does not send those along it will strip them. The diversion headers are a draft proposal and not part of RFC 3261. Broadsoft is the instigator of this issue, your provider must be using a broadsoft switch. The docs you find on the internet are last second hack-in attempts to carve out fake headers to send to the provider but do not solve the underlying need to actually pass the headers along the way asterisk does when using remove party id.

you're going to have to rewrite your entire tl-dialout-base macro to add that header dynamically. Another option is to not preserve the original callerid. Coming from someone who has ported hundreds of TN, and while the LNP is being processed the customer uses forwarding to send their calls to their MTE tenant, I can tell you that most carriers end up sending me the Call ID of the number that did the forwarding, not the original number.

Submitted by diffen on Mon, 08/30/2010 Permalink

Crap crap crap crap.

Our customers wants to use the Use original caller's Caller ID when forwarding and then the PSTN GW doesnt like From = A-number and To = C-number. But i will see if we can manage to fixe something on the PSTN GW.

Submitted by breeves on Thu, 09/09/2010 Permalink

I have a client doing this, their carrier requires diversion headers on all sip traffic where the outbound caller id does not match the clients actual numbers. It is somewhat of a hack, but when the calls come in I write the caller id into the ASTDB and then on outbound calls I do a lookup, if Thirdlane is passing me the same caller id as that of an inbound caller then I set the diversion header. In a larger deployment this is done on a separate Asterisk box, not running thirdlane, but in a smaller deployment the diversion header is done in a modified trunk script.

Submitted by diffen on Thu, 09/09/2010 Permalink

Breevers,

Good to hear that its possible, unfortunately I dont have enough skills for doing that but it looks really nice to have a Asterisk box besides that just keep track of all the caller ids.

Do you think you could spare us the script?