[Asterisk-Users] CALLERIDNUM

C F shmaltz at gmail.com
Wed Dec 28 09:57:33 MST 2005


in 1.2 and on (or CVS HEAD) you have to use: Set(CALLERID(num)=value)

On 12/28/05, turby at seznam.cz <turby at seznam.cz> wrote:
> is it possible rewrite CALLERIDNUM in the ZAP channel? I use
>
> [int-transfer]
>  exten => _00XXXX.,1,SetVar(CALLERIDNUM=${CALLNR})
>  exten => _00XXXX.,2,MYSQL(Connect connid localhost webcdr ser91623 cdr)
>  exten => _00XXXX.,3,MYSQL(Query resultid ${connid} select\
>  if((floor(u.credit/p.cost))>1\,ceil((u.credit)/p.cost)*60\,0)\ as\
>  sekund\ from\ user\ u\,\ sip\ s\,\ pricelist\ p\ where\
>  u.iduser=s.iduser\ and\ s.idsip=\'${CALLERIDNUM}\'\ and\
>  p.acode=s.acode\ and\ u.currency=p.currency\ and\
>  right(left(\'${EXTEN}\'\,CHAR_LENGTH(p.ccode)+2)\,CHAR_LENGTH(p.ccode))\
>  like\ concat(p.ccode\,\'%\')\ order\ by\ p.ccode\ desc\ limit\ 1)
>  exten => _00XXXX.,4,MYSQL(Fetch foundRow ${resultid} sekund) ; fetch row
> ..
> ..
>
> without success. At row 3 have var ${CALLERIDNUM} original value,
> not value from ${CALLNR}.
>
>
> --
>  turby at seznam.cz
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list