I wanted to know how I can give users the option to forward number to an external number for example home or cell phone?
The must basic could be :
exten=>_x.,1,Dial(SIP/${mytrunk}/${yourcellpone},25)
You need some persistent storage, e.g. astdb.
Then you define an extension number in the context used by your local user that stores the new destination against the original extension number (either supplied as part of the destination request or recovered from caller ID, etc.).
Finally, you add a test in the dialplan for claling the original extension that tests if the persistent data is set, and uses it, either directly to dial the call, or as a Goto target for the new destination. Be careful with the latter, as error recovery will be in a context with privileges to dial that number.
[quote=“ambiorixg12”]The must basic could be :
exten=>_x.,1,Dial(SIP/${mytrunk}/${yourcellpone},25)[/quote]
So by adding this line to my extensions.conf should be fine?
exten => 1017,1,Dial(SIP/117,20)
exten => 1017,n,Dial(DAHDI/g4/${4165551212},25)
exten => 1017,n,Goto(default,s,4,3)
exten => 1017,n,VoiceMail(117@VoiceMail)
exten => 1017,n,VoiceMail()
This is what the third line means
[quote=“aristech”][quote=“ambiorixg12”]The must basic could be :
So by adding this line to my extensions.conf should be fine?
exten => 1017,1,Dial(SIP/117,20)
exten => 1017,n,Dial(DAHDI/g4/${4165551212},25)
exten => 1017,n,Goto(default,s,4,3)
exten => 1017,n,VoiceMail(117@VoiceMail)
exten => 1017,n,VoiceMail()
This is what the third line means
The third line in your [code] block is a Goto not a Background and it’s malformed at that. You have too many options to your Goto.
Also your second Dial statement is invalid unless you have a variable named 4165551212 storing the number to call.
Try
[code]
exten => 1017,1,Dial(SIP/117,20)
exten => 1017,n,Dial(DAHDI/g4/4165551212,25)
exten => 1017,n,Playback(vm-leavemsg)
exten => 1017,n,VoiceMail(117@VoiceMail)
exten => 1017,n,Hangup()
[quote=“johnkiniston”][quote=“aristech”][quote=“ambiorixg12”]The must basic could be :
So by adding this line to my extensions.conf should be fine?
exten => 1017,1,Dial(SIP/117,20)
exten => 1017,n,Dial(DAHDI/g4/${4165551212},25)
exten => 1017,n,Goto(default,s,4,3)
exten => 1017,n,VoiceMail(117@VoiceMail)
exten => 1017,n,VoiceMail()
This is what the third line means
The third line in your [code] block is a Goto not a Background and it’s malformed at that. You have too many options to your Goto.
Also your second Dial statement is invalid unless you have a variable named 4165551212 storing the number to call.
Try
[code]
exten => 1017,1,Dial(SIP/117,20)
exten => 1017,n,Dial(DAHDI/g4/4165551212,25)
exten => 1017,n,Playback(vm-leavemsg)
exten => 1017,n,VoiceMail(117@VoiceMail)
exten => 1017,n,Hangup()[/quote]
Thanks I am going to try it and let you know.
I will not be able to try until after hours. Would this be the same as the Followme Feature? Or does this ring both phones simultaneously? Or does it ring the extension then the External number and if no one picks up either it defaults back to the asterisk voice mail?
[quote=“aristech”]
Thanks I am going to try it and let you know.
I will not be able to try until after hours. Would this be the same as the Followme Feature? Or does this ring both phones simultaneously? Or does it ring the extension then the External number and if no one picks up either it defaults back to the asterisk voice mail?[/quote]
This is not Followme. Nor does it ring both phones simultaneously. It dials the SIP device and then dials out your DAHDI hardware and if neither location answers it goes into Voicemail.
If you wanted to ring both phones at the same time you would just dial both at the same time like this:
1017,1,Dial(SIP/117&DAHDI/G4/4165551212,25)
OK Thanks Here is what happens when I place a call to this number from the outside with
exten => 1017,1,Dial(SIP/117,20)
exten => 1017,n,Dial(DAHDI/g4/4155551212,25)
exten => 1017,n,Playback(vm-leavemsg)
exten => 1017,n,VoiceMail(117@VoiceMail)
exten => 1017,n,Hangup()
I get the below message
Called SIP/117
-- SIP/117-00000011 is ringing
-- Nobody picked up in 20000 ms
-- Executing [1017@Incoming:2] Dial("DAHDI/i1/6505554980-26", "DAHDI/g4/4155551212,25") in new stack
-- Called DAHDI/g4/4155551212
-- DAHDI/29-1 answered DAHDI/i1/6505554980-26
-- Native bridging DAHDI/i1/6505554980-26 and DAHDI/29-1
-- Span 1: Channel 0/1 got hangup request, cause 16
-- Hanging up on 'DAHDI/29-1'
-- Hungup 'DAHDI/29-1'
== Spawn extension (Incoming, 4017, 2) exited non-zero on 'DAHDI/i1/6505554980-26'
-- Hungup 'DAHDI/i1/6505554980-26'
Looks successful to me.
Yes was successful I was just missing a 1 infront of the number to dial outside once I put that in all was working thanks for the help. Big load off my shoulders.