[Asterisk-Users] Sip transfer and redirect in a Company setting

C F shmaltz at gmail.com
Tue Apr 12 19:22:44 MST 2005


If I understand your problem correctly, you have user a setup with vm
box a, and user b with vm box b, when secretary uses local callFWD
from phone a to phone b, vm of b picks up. And you want that if it was
redirected from phone a vm box of a should answer. I think (I never
tested this) that the RDNIS variable (${RDNIS}) will hold the CallerID
of phone a, which you can use in your dialplan to use for voicemail if
it exists, something like this will do:
exten => _1XX,1,Dial(SIP/${EXTEN},45,tr)
exten => _1XX,2,GotoIf($[${RDNIS} > 0 ]?10)
exten => _1XX,3,VoiceMail(u${EXTEN})
exten => _1XX,10,VoiceMail(u${RDNIS})

I'm not sure if DNID or RDNIS will work for SIP phones, but one of
those should work.
Another way to get this done (ugly), is to set a variable for the
channel before you use the Dial command, like this

exten => _1XX,1,SetVar(ORIGINAL_EXTEN=${EXTEN})
and then test if ${ORIGINAL_EXTEN} is different than ${EXTEN}

Look at this:
http://bugs.digium.com/bug_view_page.php?bug_id=0002590
this:
http://bugs.digium.com/bug_view_page.php?bug_id=0002763
and this:
http://www.voip-info.org/wiki-RDNIS

I hope this helps.

On 4/11/05, Jeb Campbell <jebc at c4solutions.net> wrote:
> I have an asterisk box setup and dialplan that is something like this:
> 
> (t1/pri)
>    |
> [incoming]
> 1234,1,Dial(SIP/secretary,30,rt)
> 1234,2,Voicemail(su1234 at company)
> 
> Now the "t" in the dial lets the sec transfer with # and if the person
> transferred to is unavail it goes to their voicemail -- that works great.
> 
> However if the sec tells her phone to redirect to another phone (CFWDall
> on a 7960) asterisk will redirect that call to that phone.  However it
> uses the sec's context to dial, which if redirecting internally included
> voicemail.
> 
> So if the sec redirects to another phone and that phone does not answer,
> the redirected phone's voicemail plays and not the companies.
> 
> I just wanted to see if anyone else had this problem (and a solution).
> 
> Jeb Campbell
> jebc at c4solutions.net
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list