Yo, Inspired by the example in the tips & tricks-section of "http://www.junghanns.net/asterisk/", I built a more elaborate call divert-feature. This one validates if the extension a call-forward is to be set to is actually valid for the current context and additionally saves this context into the DB and always uses it to originate the divert from, as you can't expect the destination extension to be available from all caller's contexts. Furthermore, it supports immediate forward, forward on busy and forward on no answer. Some things you need to know: - No check for forwarding-loops yet. I haven't tried what happens when you create one, either. :-) - When a call gets forwarded to another local extension and goes to voicemail from there, voicemail will be left for the extension that originally diverted the call, instead of the extension the call was diverted to. This might be seen as a feature. - The contexts to set the diverts are to be included into the context of each extension you want to allow to use them and you should replace your macro-stdexten with my version (which accepts some more args than the original version, to allow for passing all possible arguments to the "Dial"-application. This means you have to change either your extension-entries or the macro, if you're already using "macro-stdexten". - There's currently a bug in Asterisk, related to using app_chanisavail on chan_local the way I do to check for the validity of the forwarding- number. This causes an instance of chan_local to remain lingering around in the "Ring"-state each time a divert has been set successfully. These hanging channels seem harmless, apart from cluttering the system. The only way to get rid of them, is to force a restart of Asterisk. Mark knows about this and will probably fix it as soon as he has the time for it. Usage: 921<number> - Set unconditional divert. 921 - Cancel unconditional divert. 9921 - Check unconditional divert. 961<number> - Set divert on no answer. 961 - Cancel divert on no answer. 9961 - Check divert on no answer. 967<number> - Set divert on busy. 967 - Cancel divert on busy. 9967 - Check divert on busy. Note that I choose "9" instead of "*" because a lot of IP-phones don't allow the user to send the "*". Nothing stops you from changing it as needed. Also note that this is almost my first go at it, and I haven't tested it very heavily. Comments, suggestions and additions are welcome. Have fun with it! :-) Grtz, Oliver [macro-stdexten]; ; ; Standard extension macro: ; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well ; ${ARG2} - Device(s) to ring ; ${ARG3} - Timeout ; ${ARG4} - Other options to app_dial ; exten => s,1,DBget(fwdexten=CFU/${ARG1}) exten => s,2,DBget(fwdcontext=CFUC/${ARG1}) exten => s,3,Goto(${fwdcontext}|${fwdexten}|1) exten => s,102,Goto(s|4) exten => s,4,Dial(${ARG2},${ARG3},${ARG4}) exten => s,5,DBget(fwdexten=CFNA/${ARG1}) exten => s,6,DBget(fwdcontext=CFNAC/${ARG1}) exten => s,7,Goto(${fwdcontext}|${fwdexten}|1) exten => s,106,Goto(s|8) exten => s,8,Answer exten => s,9,Voicemail2(su${ARG1}) exten => s,10,Hangup exten => s,105,DBget(fwdexten=CFB/${ARG1}) exten => s,106,DBget(fwdcontext=CFBC/${ARG1}) exten => s,107,Goto(${fwdcontext}|${fwdexten}|1) exten => s,206,Goto(s|108) exten => s,108,Answer exten => s,109,Voicemail2(sb${ARG1}) exten => s,110,Hangup ; ; Special features, Call Forwarding, unconditional. ; [feature-cfu] exten => _921X.,1,Answer exten => _921X.,2,ChanIsAvail(Local/${EXTEN:3}@${CONTEXT}) exten => _921X.,3,DBput(CFU/${CALLERIDNUM}=${EXTEN:3}) exten => _921X.,4,DBput(CFUC/${CALLERIDNUM}=${CONTEXT}) exten => _921X.,5,SayDigits,${EXTEN:3} exten => _921X.,6,Hangup exten => _921X.,103,Playback(invalid) exten => _921X.,104,Hangup exten => 921,1,Answer exten => 921,2,DBdel(CFU/${CALLERIDNUM}) exten => 921,3,DBdel(CFUC/${CALLERIDNUM}) exten => 921,4,SayDigits,${CALLERIDNUM} exten => 921,5,Hangup exten => 9921,1,Answer exten => 9921,2,DBget(fwdexten=CFU/${CALLERIDNUM}) exten => 9921,3,SayDigits,${fwdexten} exten => 9921,103,SayDigits,${CALLERIDNUM} exten => 9921,4,Hangup ; ; Special features, Call Forwarding, on no answer. ; [feature-cfna] exten => _961X.,1,Answer exten => _961X.,2,ChanIsAvail(Local/${EXTEN:3}@${CONTEXT}) exten => _961X.,3,DBput(CFNA/${CALLERIDNUM}=${EXTEN:3}) exten => _961X.,4,DBput(CFNAC/${CALLERIDNUM}=${CONTEXT}) exten => _961X.,5,SayDigits,${EXTEN:3} exten => _961X.,6,Hangup exten => _961X.,103,Playback(invalid) exten => _961X.,104,Hangup exten => 961,1,Answer exten => 961,2,DBdel(CFNA/${CALLERIDNUM}) exten => 961,3,DBdel(CFNAC/${CALLERIDNUM}) exten => 961,4,SayDigits,${CALLERIDNUM} exten => 961,5,Hangup exten => 9961,1,Answer exten => 9961,2,DBget(fwdexten=CFNA/${CALLERIDNUM}) exten => 9961,3,SayDigits,${fwdexten} exten => 9961,103,SayDigits,${CALLERIDNUM} exten => 9961,4,Hangup ; ; Special features, Call Forwarding, on busy. ; [feature-cfb] exten => _967X.,1,Answer exten => _967X.,2,ChanIsAvail(Local/${EXTEN:3}@${CONTEXT}) exten => _967X.,3,DBput(CFB/${CALLERIDNUM}=${EXTEN:3}) exten => _967X.,4,DBput(CFBC/${CALLERIDNUM}=${CONTEXT}) exten => _967X.,5,SayDigits,${EXTEN:3} exten => _967X.,6,Hangup exten => _967X.,103,Playback(invalid) exten => _967X.,104,Hangup exten => 967,1,Answer exten => 967,2,DBdel(CFB/${CALLERIDNUM}) exten => 967,3,DBdel(CFBC/${CALLERIDNUM}) exten => 967,4,SayDigits,${CALLERIDNUM} exten => 967,5,Hangup exten => 9967,1,Answer exten => 9967,2,DBget(fwdexten=CFB/${CALLERIDNUM}) exten => 9967,3,SayDigits,${fwdexten} exten => 9967,103,SayDigits,${CALLERIDNUM} exten => 9967,4,Hangup
<html><div style='background-color:'><DIV>I am trying to setup call forwarding, I have 2 x100p cards.....I want the calls forwarded to a static number.</DIV> <DIV> </DIV> <DIV>Is this done using meetme?</DIV> <DIV> </DIV> <DIV>Any help or HOWTOs would be great</DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMOENUS/2728??PS="><b>Get 10MB of e-mail storage!</b> Sign up for Hotmail Extra Storage.</a> </html>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I need some help figuring out how to solve the following scenario: If an external call comes in from my provider (src cid 12345678) via chan_zap, into Asterisk which then is told to forward the call to a different external number (87654321), I'd do something like: [provider-in] exten => s,1,Dial(zap/g1/87654321) The problem is that the callerid would be 12345678 and my provider would drop the call because the cid does not belong to the numbers assigned to my net. I could change the callerid to a number in my net, but then the phone receiving the call wouldn't see the actual caller. Any way to work around this? - -- Regards, Tais M. Hansen ComX Networks Tel: +45-70257474 Fax: +45-70257374 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/iWrb2TEAILET3McRAqSQAJ4rhu1xwd0InXtHE8RpHwl6hKvLOgCfQJQn PDk/2JEuSZnJ6PwMXoSofkc=2T+3 -----END PGP SIGNATURE-----
Hi all, I would like to forward an incoming call to my mobile with the incoming callerID after ten seconds, I have tried with this: exten => 910,1,Dial,SIP/BYEXTENSION@226|10 exten => 910,2,Dial,CAPI/526$(CALLERIDNUM):bmymobilenr|20 exten => 910,3,Voicemail,u226 exten => 910,102,Voicemail,b226 The second row is not right and I can?t get it to work, any idea?s? ---JanM---
JanM wrote:>Hi all, > >I would like to forward an incoming call to my mobile with the incoming callerID after ten seconds, I have tried with this: > >exten => 910,1,Dial,SIP/BYEXTENSION@226|10 >exten => 910,2,Dial,CAPI/526$(CALLERIDNUM):bmymobilenr|20 >exten => 910,3,Voicemail,u226 >exten => 910,102,Voicemail,b226 > >The second row is not right and I can?t get it to work, any idea?s? > >---JanM--- > > >I think your telco has to allow you to set the callerID of outbound calls, and I think they will usually only let you set it to one of your own numbers.. Later..
We're are trying to get call forwarding working on our Asterisk PBX. I've found some examples like this: exten => _*72.,1,DBput(CFIM/${CALLERIDNUM}=${EXTEN:3}) exten => _*72.,2,Answer exten => _*72.,3,Wait(1) exten => _*72.,4,SayDigits(${CALLERIDNUM}) exten => _*72.,5,SayDigits(${EXTEN:3}) exten => _*72.,6,Hangup However this doesn't seem to work. I read that Asterisk uses a Berkeley DB1 internally. This should be built into it with the source? Are there any examples to get this working correctly? Thank you, Jeroen Moetwil
I am using CISCO 30 VIP and CP 12+ IP phones. I am using 2 analog phones connected to a SIPURA. I am using chan_skinny for the CISCO phones. On the CISCO phones, only the basic phone functionality works. I can not transfer calls or anything using the chan_skinny. The analog phones also work as basic phones.
Hi, I've just installed asterisk a few days ago and figured most of it out, but I can't seem to forward calls. In the setup before I used asterisk, when people called my (ISDN) number and I didn't answer the phone in 4 rings, the call would be transferred to my cellphone. I ofcourse made that setting by once dialing, from the ISDN line, *610*XXXXXXXXX#, XXXX being my cellphone number. The advantages of those transfers is that 1) on my cellphone I see the original called ID 2) after the transfer the ISDN line is not busy anymore. I tried to achieve the same in *, but so far no luck. I know I can transfer calls like this (my setup now), in extensions.conf: exten => s,1,Dial(SIP/21,14) exten => s,2,Dial(Modem/g1:06XXXXXXXX,30) Which first tries to dial SIP extension 21 for 14 seconds (my regular phone), and then dials my cellphone. It works but has 2 disadvantages; on the cellphone I can only see the phone number of the * server calling out, not of the person who is actually trying to reach me, and when transferring calls this way both my ISDN lines on the BRI are used for this connection (1 incoming and 1 outgoing). Now I am not too familiar with modern telco equipment, but is there a way * can "tell" the telco's switch to transfer this call to another number, just like it would in the *610* setup? Regards, Kenneth van Grinsven
Hi. I?m trying to make call forwarding in Asterisk. I set it up calling *21*<Extension> (My extension are 4 digits long) I have this in extensions.conf [context] exten => *21*X.,1,DBPut(CFIM/${CALLERIDNUM}=${EXTEN:4}) exten => *21*X.,2,Hangup exten => _XXXX,1,DBGet(temp=CFIM/${EXTEN}) exten => _XXXX,2,Dial(SIP/${temp},15,tr) exten => _XXXX,102,Dial(SIP/${EXTEN},15,tr) I?m making a call like *21*1516 from the 1530 extension Then when I call 1530 from the 1426 extension, I have: -- Executing DBget("SIP/1426-ca06", "temp=CFIM/1530") in new stack -- DBget: varname=temp, family=CFIM, key=1530 -- DBget: set variable temp to 1516 -- Executing NoOp("SIP/1426-ca06", "Marcamos el desvio") in new stack -- Executing Dial("SIP/1426-ca06", "SIP/1516|15|tr") in new stack Sep 30 08:38:56 NOTICE[1257868208]: app_dial.c:696 dial_exec: Unable to create channel of type 'SIP' == Everyone is busy/congested at this tim What am I doing wrong? Thanks in advance
Hi ALL; Anybody knows how asterisk call forwarding to another number works? can you plz give me a sample config? Regards Mohammad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050130/2a422b42/attachment.htm
I've written a macro that allows users to dynamically change their call forwarding destination. The purpose is to set up a "follow me" process where a user can get calls on their cell, at home, etc., based on the forwarding number they enter. Using the CFIM database, I have the setup portion working great. Now, I want to actually use that information to forward a call. Here is my issue: The forwarded number saved in CFIM could be another extension, a local number or an LD number, each of which would be dialed using a different technology (internal, SIP-provider, Zap, etc.). I want to avoid having to check the number and code all of the logic for each method - because I already have all of this set up in the dialplan for callers who would have dialed this forwarded number directly. What I would like to do is take the variable containing the number retrieved from CFIM, place it on the stack as the called number, and have it reenter the dial plan, similar to the WAITEXTEN command. Any ideas are appreciated! For those interested, here is the "Forwarding Setup" macro: ; ; Call forwarding Macro ; [macro-forwarding] exten => s,1,Answer exten => s,2,Wait(1) exten => s,3,DigitTimeout(3) exten => s,4,ResponseTimeout(10) exten => s,5,Read(fwext,fw-extension,2) ; ask extension (2 digits) exten => s,6,Authenticate(/etc/asterisk/authFWD) ; only authorized individuals exten => s,7,Playback(fw-extension) ; repeat back extension exten => s,8,SayNumber(${fwext},f) exten => s,9,DBget(fwnum=CFIM/${fwext}) ; check if already forwarded ; ext is forwarded exten => s,10,Playback(fw-is-forwarded-to) ; play forwarded number from database exten => s,11,SayDigits(${fwnum}) exten => s,12,Read(resp,fw-cancel-1-change-2,1) ; 1 to cancel fwd, 2 to change # exten => s,13,GotoIf($[${resp} = 1]?17:14) ; 1 entered, goto delete exten => s,14,GotoIf($[${resp} = 2]?111:15) ; 2 entered, jump to change number exten => s,15,Playback(fw-invalid-response) ; invalid response, loop back exten => s,16,Goto(s,12) exten => s,17,DBdel(CFIM/${fwext}) ; delete entry from database exten => s,18,Playback(fw-call-fwd-canceled) ; give status & end call exten => s,19,Playback(fw-goodbye) exten => s,20,Hangup ; ext is not forwarded exten => s,110,Playback(fw-is-not-currently-forwarded) ; say number is not forwarded exten => s,111,Playback(fw-enter-new-forwarding-number) ; ask for new number exten => s,112,Read(fwnum,fw-press-pound-when-finished) ; accept new number, since variable length, ask for # exten => s,113,GotoIf($[${LEN(${fwnum})} < 2]?114:116) ; if len < 2 then bad number exten => s,114,Playback(fw-invalid-response) exten => s,115,Goto(s,111) exten => s,116,Playback(fw-you-entered) ; repeat back number exten => s,117,SayDigits(${fwnum}) exten => s,118,Read(resp,fw-if-corr-press-1-otherwise-2,1) ; confirm 1 if correct, 2 if not exten => s,119,GotoIf($[${resp} = 1]?120:111) ; if 1, proceed and update db, else loop back exten => s,120,DBdel(CFIM/${fwext}) ; delete db exten => s,121,DBput(CFIM/${fwext}=${fwnum}) ; add new db entry exten => s,122,Playback(fw-ext-is-forwarded) ; give status & end call exten => s,123,Playback(fw-goodbye) exten => s,124,Hangup The contents of this email message and any attachments are confidential and are intended solely for addressee. The information may also be legally privileged. This transmission is sent in trust, for the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply email and delete this message and its attachments, if any.
Works beautifully! Thanks. -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Kevin P. Fleming Sent: Friday, February 04, 2005 10:10 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Call forwarding Adam Robins wrote:> What I would like to do is take the variable containing the number > retrieved from CFIM, place it on the stack as the called number, and > have it reenter the dial plan, similar to the WAITEXTEN command.Easy-peasy. That's what Local channels are for. If you have retrieved the CFIM value into a variable called CFIM, and the user's phone would normally dial via a context called "customer-dial", then: exten => ...,...,Dial(Local/${CFIM}@customer-dial) This will process the call exactly the same way as if the phone user had dialed that number from their phone. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@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 The contents of this email message and any attachments are confidential and are intended solely for addressee. The information may also be legally privileged. This transmission is sent in trust, for the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply email and delete this message and its attachments, if any.
Here is the dial plan. Uses CVS-HEAD features for call screening. This is a pre-production system. We will be replacing our existing Comdial within the next few weeks. ;====================================================================; extensions.conf file ;====================================================================; Office extensions are 10-59 ; Directory-by-name is * ; Parking extensions are 70-75 ; Voicemail extension is 77 or # ; Music-on-hold test is 76 ; MeetMe conference rooms are 81,82,83 ; Polycom conference phone is 61 ; Call Forward is 91 ; DISA is 99 ; [general] static=yes writeprotect=no [globals] ZAPPHONE = Zap/1 ZAPLINE = Zap/4 IAXNET = IAX2/iaxtel_out ; ; Macro for personal office extensions ; [macro-ext] exten => s,1,GotoIf($[${LEN(${INCOMING})} > 0]?2:211) ; If call is from outside, execute screening exten => s,2,System(test -e /var/spool/asterisk/voicemail/default/${ARG1}/greet.gsm) ; check if recorded name exists exten => s,3,Playback(/var/spool/asterisk/voicemail/default/${ARG1}/greet) ; play recorded name exten => s,4,Goto(s,104) ; skip playing number if played name exten => s,103,SayNumber(${ARG1},f) ; else play extension number exten => s,104,Wait(1) exten => s,105,Playback(screen-record) ; ask caller to id self exten => s,106,SetVar(SCREEN_FILE=/tmp/${CALLERIDNUM}-${EPOCH}) ; set file name exten => s,107,Record(${SCREEN_FILE}.gsm|3|10) ; record response to file exten => s,108,DBget(fn=CFIM/${ARG1}) ; is number forwarded? exten => s,109,Dial(Local/${fn}@intl-access/n|24|gM(screen^${SCREEN_FILE})) ; forwarded - screen to new number exten => s,110,Goto(s,313) exten => s,209,Dial(SIP/${ARG1}|24|tgM(screen^${SCREEN_FILE})) ; not forwarded - screen to extension exten => s,210,Goto(s,313) ; call is from inside - no screening exten => s,211,DBget(fn=CFIM/${ARG1}) ; is number forwarded? exten => s,212,Dial(Local/${fn}@intl-access/n|24) ; forwarded, so send forwarding number back in exten => s,213,Goto(s,313) exten => s,312,Dial(SIP/${ARG1}|24|t) ; not forwarded, normal dial exten => s,313,Voicemail(u${ARG1}) ; voicemail if unavailable or busy exten => s,314,Hangup ; ; Macro for call screening ; [macro-screen] exten => s,1,Wait(1) exten => s,2,Playback(screen-from) exten => s,3,Playback(${ARG1}) exten => s,4,Read(ACCEPT|screen-accept|1) exten => s,5,GotoIf($[${ACCEPT} = 1 ] ?7:6) exten => s,6,SetVar(MACRO_RESULT=CONTINUE) exten => s,7,System(/bin/rm ${ARG1}) ; ; Call forwarding Macro ; [macro-forwarding] exten => s,1,Answer exten => s,2,Wait(1) exten => s,3,DigitTimeout(3) exten => s,4,ResponseTimeout(10) exten => s,5,Read(fwext,fw-extension,2) ; ask extension (2 digits) exten => s,6,Authenticate(/etc/asterisk/authFWD) ; only authorized individuals exten => s,7,Playback(fw-extension) ; repeat back extension exten => s,8,SayNumber(${fwext},f) exten => s,9,DBget(fwnum=CFIM/${fwext}) ; check if already forwarded ; ext is forwarded exten => s,10,Playback(fw-is-forwarded-to) ; play forwarded number from database exten => s,11,SayDigits(${fwnum}) exten => s,12,Read(resp,fw-cancel-1-change-2,1) ; 1 to cancel fwd, 2 to change # exten => s,13,GotoIf($[${resp} = 1]?17:14) ; 1 entered, goto delete exten => s,14,GotoIf($[${resp} = 2]?111:15) ; 2 entered, jump to change number exten => s,15,Playback(fw-invalid-response) ; invalid response, loop back exten => s,16,Goto(s,12) exten => s,17,DBdel(CFIM/${fwext}) ; delete entry from database exten => s,18,Playback(fw-call-fwd-canceled) ; give status & end call exten => s,19,Playback(fw-goodbye) exten => s,20,Hangup ; ext is not forwarded exten => s,110,Playback(fw-is-not-currently-forwarded) ; say number is not forwarded exten => s,111,Playback(fw-enter-new-forwarding-number) ; ask for new number exten => s,112,Read(fwnum,fw-press-pound-when-finished) ; accept new number, since variable length, ask for # exten => s,113,GotoIf($[${LEN(${fwnum})} < 2]?114:116) ; if len < 2 then bad number exten => s,114,Playback(fw-invalid-response) exten => s,115,Goto(s,111) exten => s,116,Playback(fw-you-entered) ; repeat back number exten => s,117,SayDigits(${fwnum}) exten => s,118,Read(resp,fw-if-corr-press-1-otherwise-2,1) ; confirm 1 if correct, 2 if not exten => s,119,GotoIf($[${resp} = 1]?120:111) ; if 1, proceed and update db, else loop back exten => s,120,DBdel(CFIM/${fwext}) ; delete db exten => s,121,DBput(CFIM/${fwext}=${fwnum}) ; add new db entry exten => s,122,Playback(fw-ext-is-forwarded) ; give status & end call exten => s,123,Playback(fw-goodbye) exten => s,124,Hangup [extensions] include => parkedcalls ; allow call parking per features.conf ; ; Operator - goto main menu ; exten => 0,1,Goto(incoming,s,1) ; ; Access Voicemail - Ext 77 or # ; exten => 77,1,Answer exten => 77,2,Wait(1) exten => 77,3,VoicemailMain(${CALLERIDNUM}) exten => 77,4,Hangup exten => #,1,Answer exten => #,2,Wait(1) exten => #,3,VoicemailMain(${CALLERIDNUM}) exten => #,4,Hangup ; ; DISA ; exten => 99,1,DISA(/etc/asterisk/authDISA|intl-access) ; ; Music-on-hold ; exten => 76,1,Answer exten => 76,2,Wait,1 exten => 76,3,MusicOnHold,default ; ; MeetMe conference rooms - defined in meetme.conf. Require pin codes & play MOH to first caller ; exten => _8[1-3],1,MeetMe(${EXTEN}|Mp) ; ; Call Forwarding Setup extension ; exten => 91,1,Macro(forwarding) ; ; Directory ; exten => _*,1,Answer exten => _*,2,Wait(1) exten => _*,3,Directory(default|extensions) exten => _*,4,Goto(incoming,s,1) ; ; Conf Room - Analog Zap Phone ; exten => 61,1,Dial(${ZAPPHONE},24) ; Ring for 24 seconds exten => 61,2,Hangup ; Hang up if extension doesn't answer exten => 61,102,Busy ; Busy if extension is busy ; ; SIP Office Extensions - use macro-ext macro defined above ; Be sure to create corresponding entry in sip.conf and voicemail.conf ; exten => 14,1,Macro(ext,14) exten => 34,1,Macro(ext,34) ; ; ; play invalid msg and send back to main greeting if invalid ext entered ; exten => i,1,Playback,invalid exten => i,2,Goto(incoming,s,1) [incoming] ; ; Incoming calls with no destination land here (usually from the PSTN) ; exten => s,1,Answer exten => s,2,Wait(1) exten => s,3,DigitTimeout(3) ; Set Digit Timeout to 3 seconds exten => s,4,ResponseTimeout(7) ; Set Response Timeout to 7 seconds exten => s,5,SetVar(INCOMING=1) ; Set variable to indicate call from outside exten => s,6,Background(vm-mainext) ; Play main greeting exten => s,7,WaitExten(5) ; Wait for extension ; ; Hang up the line if the caller doesn't do anything ; exten => t,1,Hangup ; ; Allow incoming calls from the outside to dial our internal extensions ; include => extensions ; [emergency] ; ; 911 and 411 Assistance over ZAP analog line ; exten => _9[49]11,1,Dial(${ZAPLINE}/${EXTEN:1}) ; strip off leading '9' exten => _9[49]11,2,Congestion exten => _9[49]11,102,Busy exten => _[49]11,1,Dial(${ZAPLINE}/${EXTEN:0}) ; no leading '9' exten => _[49]11,2,Congestion exten => _[49]11,102,Busy [intl-trunks] ; ; International using 011 country code ; exten => _9011.,1,Dial(SIP/${EXTEN:1}@broadvoice) exten => _9011.,2,Congestion [toll-trunks] ; ; Outbound to 1-nxx-nxx-xxxx are LD and go via Broadvoice ; exten => _91NXXNXXXXXX,1,Dial(SIP/${EXTEN:2}@broadvoice) exten => _91NXXNXXXXXX,2,Congestion [local-trunks] ; exten => _9NXXNXXXXXX,1,Dial(SIP/${EXTEN:1}@broadvoice) exten => _9NXXNXXXXXX,2,Congestion [iaxtel] ; ; 700 numbers go thru iaxtel server at Digium ; exten => _91700NXXXXXX,1,Dial(${IAXNET}/${EXTEN:1}) [local-access] ; ; Extensions that are this context are allowed to only call local numbers and other extensions ; ignorepat => 9 ; Continue dialtone after "9" only works on ZAP include => extensions include => emergency include => iaxtel include => local-trunks ; Access to Local numbers [toll-access] ; ; Extensions that are this context are allowed to call local, long distance and other extensions ; ignorepat => 9 ; Continue dialtone after "9" only works on ZAP include => local-access ; Everything local-access has include => toll-trunks ; Access to toll numbers [intl-access] ; ; Extensions in this context can call international, ld, local and other extensions ; ignorepat => 9 include => intl-trunks include => toll-access The contents of this email message and any attachments are confidential and are intended solely for addressee. The information may also be legally privileged. This transmission is sent in trust, for the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply email and delete this message and its attachments, if any.
I have an asterisk box with two digium x100p cards. I have a POTS line connected to one of them. Basically my goal is to have someone call into the incoming POTS line and be presented with a menu where they would select an extension that would automatically connect them to my cell phone(the menu is already setup). I have two phone lines and too FXO cards, but I understand that it can be done with one line and one card using the three-way calling feature. I have the menu system setup and it works well with the exception of transferring or forwarding the call to my cell phone. The most success that I've had is using the DTMF command and manually dialing the number. My phone rings, but asterisk hangs up before I can answer it. I could set a timeout on it, but it would disconnect the call after that time even if I was still on the phone. Please help! Paul
Hi! I need a sample dilplan with call forwarding This did not help me to get it work: http://www.voip-info.org/wiki-Asterisk+call+forwarding Thore
Is there an easy way to allow the users to go to a webpage or dial an extension and enter a phone number that their extension can be forwarded to? I'm using SER+Asterisk so doing this in sip.conf for example would not work since all users are registered to SER. Currently in extensions.conf I have: exten => s,2,Dial(SIP/${ARG1}@${SERADDRESS},20) Is there a way to check that the user at ${ARG1} has setup forwarding and retrieve the forwarding destination?
Hi all. I am attempting to setup a dial plan which will allow me to forward an extension. I have followed the instructions in http://www.voip-info.org/wiki/index.php?page=Asterisk%20call%20forwarding however it does not work correctly. Does anyone have some expertise they could lend. Not sure if it matters, but when I setup as in these instructions, and attempt to call forward my phone, asterisk logs when in fact I am attempting to forward to extension 8001 ; == Spawn extension (default, *21*800, 4) exited non-zero on 'SIP/8001-9be7' David A. Morrow Technical Systems Lead Autodata Solutions Company David.Morrow@Autodata.Net http://www.autodata.net Tel: (519) 951-6079 Fax: (519) 451-6615 < Poor planning on your part does not necessarily constitute an emergency on my part! > This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at Administrator@autodata.net <mailto:Administrator@autodata.net> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051020/f2e11bbc/attachment.htm
Hi all, I have one external VoIP terminator, I need to forward all calls to that terminator i did some configuration in sip.conf but i am confiused what will be the configuration in extentions.conf to forward all calls to that terminator. sip.conf [general] register => 450102:201079:450102@212.xxx.xxx.xxx:5060/450102 i found that 450102 user successfully registered on terminator. Now i want to register Grandstreem using 450102 user on Asterisk Server and using this want to forward call using the same username to the terminator. [user] type=friend username=450102 secret=201079 fromuser=450102 authuser=450102 context=allcall allow=g729 extentions.conf [allcall] exten => ???????????? Please advice me how i can run this configuration. -------- Yours, Abdul Lateef Computer Programmer HATIF COM Mob: +974 - 5405022 Tel: +974 - 4883068 ICQ: 276994704 YM!: abdul_zu Fax: +974 - 4883063 Doha Qatar http://www.hatif.com __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Hi people. I want to know about call forwarding. I dial *72, and a message say me to dial the extension , I did, then the message said is forward is UNCONDITIONLA . But when I call , it doesn't work the forwarding. Who can help me please. Best Regards Ever -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060716/64ef8bc1/attachment.htm
In article <0bb801c6a952$276794f0$077fc244@DaVinci>, hebreozl@gmail.com says...> Hi people. I want to know about call forwarding. I dial *72, and a message say me to dial the extension , I did, then the message said is forward is UNCONDITIONLA . But when I call , it doesn't work the forwarding. > Who can help me please.Without your dialplan - nobody! -- Tomislav Par?ina Lama Computers Split Stinice 12, 21000 Split Tel.: +385(21)495148 Mob.: +385(91)1212148 SIP: tomo@pbx.lama.hr e-mail: tparcina#lama.hr http://www.lama.hr
Hello to all asterisk users, I have a problem with call forwarding. My extensions.conf: [outbound] exten => _*22*XXX,1,Set(DB(CFIM/${CALLERID(num)})=${EXTEN:4}) exten => _*22*,1,DBdel(CFIM/${CALLERID(num)}) Have three stations, 301, 302 and 303. When dial on 301 following number: *22*302 it should redirect all calls targeted to 301 to number 302. But it doesn`t work. If anyone of you has experience with call forwarding, your help will be appreciated. Thank you very much. Vladimir Here is SIP output: --- <-- SIP read from 192.168.0.10:5060: ACK sip:*22*302@192.168.0.1 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.10:5060;branch=z9hG4bK-4b96baec From: 301 <sip:301@192.168.0.1>;tag=c3d74f8b3bb05e94o0 To: <sip:*22*302@192.168.0.1>;tag=as3e772365 Call-ID: 704a9017-a9ad3778@192.168.0.10 CSeq: 101 ACK Max-Forwards: 70 Contact: 301 <sip:301@192.168.0.10:5060> User-Agent: Sipura/SPA2002-3.1.2(a) Content-Length: 0 --- (10 headers 0 lines)--- <-- SIP read from 192.168.0.10:5060: INVITE sip:*22*302@192.168.0.1 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.10:5060;branch=z9hG4bK-dd489610 From: 301 <sip:301@192.168.0.1>;tag=c3d74f8b3bb05e94o0 To: <sip:*22*302@192.168.0.1> Call-ID: 704a9017-a9ad3778@192.168.0.10 CSeq: 102 INVITE Max-Forwards: 70 Proxy-Authorization: Digest username="301",realm="asterisk",nonce="46339822",uri="sip:*22*302@192.168.0.1",algorithm=MD5,response="3284e4149a3abe9e0c4c454af19aa7b5" Contact: 301 <sip:301@192.168.0.10:5060> Expires: 240 User-Agent: Sipura/SPA2002-3.1.2(a) Content-Length: 422 Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER Supported: x-sipura Content-Type: application/sdp v=0 o=- 437796 437796 IN IP4 192.168.0.10 s=- c=IN IP4 192.168.0.10 t=0 0 m=audio 16406 RTP/AVP 0 2 4 8 18 96 97 98 100 101 a=rtpmap:0 PCMU/8000 a=rtpmap:2 G726-32/8000 a=rtpmap:4 G723/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:18 G729a/8000 a=rtpmap:96 G726-40/8000 a=rtpmap:97 G726-24/8000 a=rtpmap:98 G726-16/8000 a=rtpmap:100 NSE/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ptime:30 a=sendrecv --- (15 headers 19 lines)--- Using INVITE request as basis request - 704a9017-a9ad3778@192.168.0.10 Sending to 192.168.0.10 : 5060 (NAT) Found user '301' Found RTP audio format 0 Found RTP audio format 2 Found RTP audio format 4 Found RTP audio format 8 Found RTP audio format 18 Found RTP audio format 96 Found RTP audio format 97 Found RTP audio format 98 Found RTP audio format 100 Found RTP audio format 101 Peer audio RTP is at port 192.168.0.10:16406 Found description format PCMU Found description format G726-32 Found description format G723 Found description format PCMA Found description format G729a Found description format G726-40 Found description format G726-24 Found description format G726-16 Found description format NSE Found description format telephone-event Capabilities: us - 0x6 (gsm|ulaw), peer - audio=0x51d (g723|ulaw|alaw| g726|g729|ilbc)/video=0x0 (nothing), combined - 0x4 (ulaw) Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event) Looking for *22*302 in outbound (domain 192.168.0.1) list_route: hop: <sip:301@192.168.0.10:5060> Transmitting (NAT) to 192.168.0.10:5060: SIP/2.0 100 Trying Via: SIP/2.0/UDP 192.168.0.10:5060;branch=z9hG4bK-dd489610;received=192.168.0.10 From: 301 <sip:301@192.168.0.1>;tag=c3d74f8b3bb05e94o0 To: <sip:*22*302@192.168.0.1> Call-ID: 704a9017-a9ad3778@192.168.0.10 CSeq: 102 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Contact: <sip:*22*302@192.168.0.1> Content-Length: 0 --- -- Executing Set("SIP/301-503d", "DB(CFIM/301)=302") in new stack -- Executing Hangup("SIP/301-503d", "") in new stack Reliably Transmitting (NAT) to 192.168.0.10:5060: SIP/2.0 603 Declined Via: SIP/2.0/UDP 192.168.0.10:5060;branch=z9hG4bK-dd489610;received=192.168.0.10 From: 301 <sip:301@192.168.0.1>;tag=c3d74f8b3bb05e94o0 To: <sip:*22*302@192.168.0.1>;tag=as0c8d34d4 Call-ID: 704a9017-a9ad3778@192.168.0.10 CSeq: 102 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Contact: <sip:*22*302@192.168.0.1> Content-Length: 0 --- Retransmitting #1 (NAT) to 192.168.0.10:5060: SIP/2.0 603 Declined Via: SIP/2.0/UDP 192.168.0.10:5060;branch=z9hG4bK-dd489610;received=192.168.0.10 From: 301 <sip:301@192.168.0.1>;tag=c3d74f8b3bb05e94o0 To: <sip:*22*302@192.168.0.1>;tag=as0c8d34d4 Call-ID: 704a9017-a9ad3778@192.168.0.10 CSeq: 102 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Contact: <sip:*22*302@192.168.0.1> Content-Length: 0