[Asterisk-Users] Programing a call forward feature to cel phones
Anton Krall
akrall-lists at intruder.com.mx
Sat Apr 30 18:37:04 MST 2005
The forward is done like this
You enter the number to use as forward into astdb.
When a call comes in for that extension, its reads the number from astdb and
then does this:
[macro-stdexten];
exten => s,1,GotoIf($["${ARG1}" = ""]?s,110:s,2)
exten => s,2,DBGet(DNDFWD=DNDFWD/${ARG2})
exten => s,3,NoOp(DNDFWD: ${DNDFWD})
exten => s,4,GotoIf($["${DNDFWD}" = "${ARG2}"]?s-NOANSWER,1:s,5)
exten => s,5,GotoIf($[${LEN(${DNDFWD})} >= 8]?s,6:s,120)
exten =>
s,6,SetVar(CALLFILENAME=${TIMESTAMP}-from${CALLERIDNUM}-to${ARG2}-forwarded-
to-${DNDFWD})
exten => s,7,Monitor(wav,${CALLFILENAME},m)
exten => s,8,Playback(${SONIDOS}/bridgingcall)
exten => s,9,Macro(zapdial,${DNDFWD})
exten => s,10,Playback(vm-goodbye)
exten => s,11,Hangup
exten => s,103,System(/bin/echo -n -e "'From: ${CALLERIDNAME} -
${CALLERIDNUM} To: ${ARG2}'" | nc -w 1 10.0.0.2 10629)
exten =>
s,104,SetVar(CALLFILENAME=${TIMESTAMP}-from${CALLERIDNUM}-to${ARG2})
exten => s,105,Monitor(wav,${CALLFILENAME},m)
exten => s,106,Dial(${ARG1},${ARG3},${ARG4})
exten => s,107,Goto(s-${DIALSTATUS},1)
exten => s,110,Background(${SONIDOS}/incorrecta)
exten => s,111,Playback(vm-goodbye)
exten => s,112,Hangup
exten => s,120,GotoIf($[${LEN(${DNDFWD})} = 3]?s,121:s-NOANSWER,1)
exten =>
s,121,SetVar(CALLFILENAME=${TIMESTAMP}-from${CALLERIDNUM}-to${ARG2}-forwarde
d-to-${DNDFWD})
exten => s,122,Monitor(wav,${CALLFILENAME},m)
exten => s,123,System(/bin/echo -n -e "'From: ${CALLERIDNAME} -
${CALLERIDNUM} To: ${ARG2}'" | nc -w 1 10.0.0.2 10629)
exten => s,124,Dial(${exten${DNDFWD}},${ARG3},${ARG4})
exten => s,125,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(u${ARG2})
exten => s-NOANSWER,2,Playback(vm-goodbye)
exten => s-NOANSWER,3,Hangup
exten => s-BUSY,1,Voicemail(b${ARG2})
exten => s-BUSY,2,Playback(vm-goodbye)
exten => s-BUSY,3,Hangup
exten => _s-.,1,Goto(s-NOANSWER,1)
This check the forwarding number and if its the same as the extension
number, send the caller to voicemail, if = 3 digits, then forward to an
internal extension and if >= 8 digits, then dial outside using zap.
|-----Original Message-----
|From: asterisk-users-bounces at lists.digium.com
|[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
|Race Vanderdecken
|Sent: Sábado, 30 de Abril de 2005 08:24 p.m.
|To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
|Subject: RE: [Asterisk-Users] Programing a call forward
|feature to cel phones
|
|Curious,
|
|How did you do the forward? Was it a script or programming in C?
|
|Any output from debug?
|
|Race "The Tyrant" Vanderdecken
|
|-----Original Message-----
|From: asterisk-users-bounces at lists.digium.com
|[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
|Anton Krall
|Sent: Saturday, April 30, 2005 8:00 PM
|To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
|Subject: [Asterisk-Users] Programing a call forward feature to
|cel phones
|
|Guys.
|
|I just programed a feature that allows any extension to be
|forwarded to any outside number, for example, forward your
|extension 201 to any number outside (via zap) so that if
|somebody calls your extension either from inside out outside
|(using another zap we have) it gets directed.
|
|Problem I have is that if somebody using a cel phone calls in
|and gets directed to my extension which in turn is directed to
|my cel phone, the call comes thru but after 2 seconds, the
|call gets all garbled and with a sound like brrrrrrrrrrrr and
|the caller cant be heard anymore.
|
|Anybody has any idea why this is happening?
|
|
|_______________________________________________
|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
|
|
|_______________________________________________
|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