Hello all!
We have an Asterisk PBX with some internal extensions in the from-internal
context. We also have an extension for the intercom associated to an extension (230) in the from-intercom
context.
Now we need it to ring all the internal extensions whenever when someone activate it.
The from-intercom
is as follow:
[from-intercom]
exten => 310,1,Goto(ext-group,601,1)
601 is a ring group that rings all the from-internal
extensions according to some time conditions, etc.
Now it works, but the caller-id is lost in the 230->601 goto. Instead of showing the caller id the system shows “Anonymous”.
Here is the context called by Goto.
[ext-group]
include => ext-group-custom
exten => 600,1,Macro(user-callerid,)
exten => 600,n,Macro(blkvm-setifempty,)
exten => 600,n,GotoIf($["${GOSUB_RETVAL}" = "TRUE"]?skipov)
exten => 600,n,Macro(blkvm-set,reset)
exten => 600,n,Set(__NODEST=)
exten => 600,n(skipov),Set(RRNODEST=${NODEST})
exten => 600,n(skipvmblk),Set(__NODEST=${EXTEN})
exten => 600,n,GosubIf($[${DB_EXISTS(RINGGROUP/600/changecid)} = 1 & "${DB(RINGGROUP/600/changecid)}" != "default" & "${DB(RINGGROUP/600/chang\
ecid)}" != ""]?sub-rgsetcid,s,1())
exten => 600,n,Gosub(sub-record-check,s,1(rg,600,dontcare))
exten => 600,n,Set(RingGroupMethod=ringall)
exten => 600,n(DIALGRP),Macro(dial,12,m(cojaniz)${REPLACE(DIAL_OPTIONS,r)},201-243)
exten => 600,n,Gosub(sub-record-cancel,s,1())
exten => 600,n,Set(RingGroupMethod=)
exten => 600,n,GotoIf($["foo${RRNODEST}" != "foo"]?nodest)
exten => 600,n,Set(__NODEST=)
exten => 600,n,Macro(blkvm-clr,)
exten => 600,n,Goto(ext-group,601,1)
exten => 600,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})
exten => 601,1,Macro(user-callerid,)
exten => 601,n,Macro(blkvm-setifempty,)
exten => 601,n,GotoIf($["${GOSUB_RETVAL}" = "TRUE"]?skipov)
exten => 601,n,Macro(blkvm-set,reset)
exten => 601,n,Set(__NODEST=)
exten => 601,n(skipov),Set(RRNODEST=${NODEST})
exten => 601,n(skipvmblk),Set(__NODEST=${EXTEN})
exten => 601,n,GosubIf($[${DB_EXISTS(RINGGROUP/601/changecid)} = 1 & "${DB(RINGGROUP/601/changecid)}" != "default" & "${DB(RINGGROUP/601/chang\
ecid)}" != ""]?sub-rgsetcid,s,1())
exten => 601,n,Gosub(sub-record-check,s,1(rg,601,dontcare))
exten => 601,n,Set(RingGroupMethod=ringall)
exten => 601,n(DIALGRP),Macro(dial,55,m(cojaniz)${REPLACE(DIAL_OPTIONS,r)},201-202-203-204-210-211-212-213-214-243)
exten => 601,n,Gosub(sub-record-cancel,s,1())
exten => 601,n,Set(RingGroupMethod=)
exten => 601,n,GotoIf($["foo${RRNODEST}" != "foo"]?nodest)
exten => 601,n,Set(__NODEST=)
exten => 601,n,Macro(blkvm-clr,)
exten => 601,n,Goto(ivr-3,s,1)
exten => 601,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})
exten => h,1,Macro(hangupcall,)
;--== end of [ext-group] ==--;
This has been generated by Elastix/FreePBX
How can we preserve the correct caller-id (230)?
Thanks!