[asterisk-users] Outgoing PRI CID?
Turbo Fredriksson
turbo at bayour.com
Thu Nov 1 17:41:21 CDT 2007
Quoting "Eric \"ManxPower\" Wieling" <eric at fnords.org>:
> ;exten => s,n,Set(CALLERID(num)=${CALLERID(num)})
>
> This is the same as saying Set(FRED=${FRED})
I know. I've been playing with setting the CALLERID(num), and this was
my last, desperate attempt.
> exten => _X.,1,Dial(IAX2/graham/${EXTEN},30,r)
>
> DO NOT EVER USE THE "r" OPTION TO DIAL UNLESS YOU KNOW WHAT YOU ARE
> DOING!!!!
Ok, thanx.
> Remember Caller*ID Number is either country code + area code + number or
> area code + number. You never put a 1 or 0 at the beginning of the
> number. CallerID Number also can not have spaces, dashes, or other crud.
My provider is sending ME the last tree digits of the phone number, and
they want three numbers from me. The problem is that I don't know how
to send these three digits...
Here I'm trying to fake the CALLERID(num) etc to something, just to test
(I'm all alone at the office now - the other wimps are home in bed :).
----- s n i p -----
[macro-dial]
exten => s,1,NoOp(Trying extension/number: ${ARG1} from ${CALLERID(all)})
exten => s,n,SetCallerPres(allowed)
exten => s,n,Set(CALLERID(num)=520)
exten => s,n,Set(CALLERID(ANI)=${CALLERID(num)})
exten => s,n,NoOp(CALLINGPRES 1: ${CALLINGPRES})
exten => s,n,Set(CALLINGPRESS=${CALLERID(num)})
exten => s,n,NoOp(CALLINGPRES 2: ${CALLINGPRES})
exten => s,n,Dial(${GLOBAL(PRI)}/${ARG1},${RINGTIME}) ; exten => s,n,Dial(SIP/${ARG1}@mysecretary,${RINGTIME},r)
exten => s,n,Playback(connection-failed)
exten => s,n,Congestion()
----- s n i p -----
This results in (doctored):
----- s n i p -----
-- Executing [<MY_CELL_NO>@default:1] Macro("IAX2/graham-1", "dial|<MY_CELL_NO>|30|r") in new stack
-- Executing [s at macro-dial:1] NoOp("IAX2/graham-1", "Trying extension/number: <MY_CELL_NO> from "Turbo Fredriksson" <528>") in new stack
-- Executing [s at macro-dial:2] SetCallerPres("IAX2/graham-1", "allowed") in new stack
-- Executing [s at macro-dial:3] Set("IAX2/graham-1", "CALLERID(num)=520") in new stack
-- Executing [s at macro-dial:4] Set("IAX2/graham-1", "CALLERID(ANI)=520") in new stack
-- Executing [s at macro-dial:5] NoOp("IAX2/graham-1", "CALLINGPRES 1: 3") in new stack
-- Executing [s at macro-dial:6] Set("IAX2/graham-1", "CALLINGPRESS=520") in new stack
-- Executing [s at macro-dial:7] NoOp("IAX2/graham-1", "CALLINGPRES 2: 3") in new stack
-- Executing [s at macro-dial:8] Dial("IAX2/graham-1", "Zap/g1/<MY_CELL_NO>|120|r") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called g1/<MY_CELL_NO>
-- Zap/1-1 is proceeding passing it to IAX2/graham-1
-- Hungup 'Zap/1-1'
== Spawn extension (macro-dial, s, 8) exited non-zero on 'IAX2/graham-1' in macro 'dial'
== Spawn extension (macro-dial, s, 8) exited non-zero on 'IAX2/graham-1'
-- Hungup 'IAX2/graham-1'
----- s n i p -----
Note that '528' is the real extension, '520' is the fake one. It doesn't
matter - I still get a call from '500'.
And trying to set the 'CALLINGPRES' didn't help (read-only).
More information about the asterisk-users
mailing list