Followme change

I was looking for a way to to not have followme dial the number I’m calling from even if it is in my followme list. (If I call my office extension from my cell phone to leave myself a message)

I made a change to my local dialparties.agi file, which works. I’ve made it so that it will not dial if the number to call is an external number, this should limit it’s footprint and not interfere with any legitimate internal calling of self. I thought that this change might be useful to others, so I wanted to pass it on.

On or near line 117 change this:

[code:1]
$extarray = split( ‘-’, $arg );
foreach ( $extarray as $k )
{
$ext[] = $k;
debug(“Added extension $k to extension map”, 3);
}
[/code:1]

To:

[code:1]
$extern_cid = $cidnum . “#”;
$extarray = split( ‘-’, $arg );
foreach ( $extarray as $k )
{
if( $extern_cid == $k)
debug(“We are trying to call ourselves. Ignore extension”, 3);
else {
$ext[] = $k;
debug(“Added extension $k to extension map”, 3);
}
}
[/code:1]

As usual, use at your own risk, It seems to work on my system YMMV