Help with diversion knowledge

Hello everybody.

I’m having a little spat with one of my VSP regarding displaying caller id when forwarding calls. They want me to implement a code that they “googled” and haven’t even tested yet.

The premise is that one of my client has a “backup” number that is used during non-office hours and that number is sent to the employee that has that shift at each time. We use a simple extension and a follow me rule on that and we give the users access to the follow me interface to change the number themselves.

What I wanted your help with is to make sure that I understand this piece of code correctly.


exten => setdiversion,1,SIPAddHeader(Diversion: sip:${CALLERID(rdnis)};reason=deflection)
exten => setdiversion,2,Return

exten => _91NXXNXXXXXX,1,GosubIf($["${CALLERID(rdnis)}" != “”]?setdiversion,1)
exten => _91NXXNXXXXXX,n,Dial(${TRUNK}/${EXTEN:1}|600)
exten => _91NXXNXXXXXX,n,Hangup[/quote]

My understanding of this code is that it diverts the extension setdiversion to a pre-determined number without ringing the extension itself.

I do admit that I’m a fairly new to all of this and my understanding is not as good as I’d like it to be and therefore I come here in hope of getting some well appreciated help.

With hopes of great co-operation,
Gunnar Ingi Ómarsson

No. It makes sure that any redirected directory number indication is preserved when ringing the specified external numbers.

It does no diversion itself.

I’m not convinced that it is necessary to do what it is actually doing.