[Asterisk-Users] Problems with MACRO_EXTEN variable

Rennes Neps rennes at voicenet.ee
Tue Nov 23 04:23:17 MST 2004


Hei!

I have a little problem with the subject. I use Asterisk 
CVS-HEAD-09/06/04-12:42:56 as a production *, but I do tests with a 
newer version
Asterisk CVS-HEAD-11/18/04-10:01:32. Ok the problem is:
in extension.conf I use macro for redirection, found on wiki pages:

[macro-stdexten]
;
; Standard extension macro (with call forwarding):
; ${ARG1} - Extension(we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
;
exten=s,1,DBget(temp=CFIM/${ARG1}) ; Get CFIM key, if not existing, goto 102
exten=s,2,SetCallerID(${MACRO_EXTEN})
exten=s,3,Dial(Local/${temp}@class1/n)   ; Unconditional forward
exten=s,4,Dial(${ARG2},40,Tt) ; 20sec timeout
exten=s,5,DBget(temp=CFBS/${ARG1})  ; Get CFBS key, if not existing, 
goto 105
exten=s,6,SetCallerID(${CALLERIDNUM})
exten=s,7,Dial(Local/${temp}@class1/n)   ; Forward when busy or unavailable
exten=s,8,Dial(${ARG2},40,Tt) ; 20sec timeout
;exten=s,9,DBget(temp=CFNA/${ARG1})  ; Get CFNA key, if not existing, 
goto 109
;exten=s,10,SetCallerID(${CALLERIDNUM})
;exten=s,11,Dial(Local/${temp}@class1/n)   ; Forward when busy or 
unavailable
;exten=s,12,Dial(${ARG2},20) ; 20sec timeout



; No CFIM key
exten=s,102,Goto(s,5)

; No CFBS key
;exten=s,105,Goto(s,9)

; No CFNA key - voicemail ?
;exten=s,109,(Busy)



[apps]
; Unconditional Call Forward
exten => _*21*X.,1,DBput(CFIM/${CALLERIDNUM}=${EXTEN:4})
exten => _*21*X.,2,Hangup
exten => #21#,1,DBdel(CFIM/${CALLERIDNUM})
exten => #21#,2,Hangup

; Call Forward on Busy or Unavailable
exten => _*67*X.,1,DBput(CFBS/${CALLERIDNUM}=${EXTEN:4})
exten => _*67*X.,2,Hangup
exten => #67#,1,DBdel(CFBS/${CALLERIDNUM})
exten => #67#,2,Hangup

On the older version everything works fine, MACRO_EXTEN changes the 
callerid of a redirected call as it is supposed to. But with newer 
version, it messes up the name part of the CALLER_ID. On Snom phones, 
that show number and name, total crap is displayed instead of name. Same 
crap gets put into MYSQL database into CLID column. * cli debug shows 
nothing weird. CVS-HEAD-11/18/04-10:01:32  Changelog says - -- Major 
Caller*ID Restructuring, but doesn't explain the details. Can anyone help?

Regards
Rennes Neps




More information about the asterisk-users mailing list