Quantcast
Channel: General Help - FreePBX Community Forums
Viewing all articles
Browse latest Browse all 12580

Custom Failover Module - Preserving Caller ID

$
0
0

@SteveConcero wrote:

I wrote a little module in extension_custom.conf, which checks to see if a remote SIP extension's status is OK, and if not, transfers the call to a cell phone. Here is the module:

[failover]
exten => s,1,NoOp(Failover Check)
    same => n,GotoIf($["${SIPPEER(11801,status):0:3}"="OK "]?good)
    same => n,GotoIf($["${SIPPEER(11802,status):0:3}"="OK "]?good)
    same => n(fail),Dial(Local/15555555555@outbound-allroutes)
    same => n(good),Return()

I then create a Custom Destination with " failover,s,1 " and set the Return value to the desired ring group. When both extensions go offline, the call rings the cell phone, but the original caller ID is not preserved. Instead, the cell phone receives the default caller ID of the outbound trunk.

Can anyone offer some tips to improve this module, ideally preserving the original Caller ID? Should I use a transfer or goto function instead of dial? Any thoughts would be appreciated.

Posts: 8

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 12580

Trending Articles