Philip Prindeville
2007-Dec-16 00:55 UTC
[asterisk-users] Newbie question: how to proxy the *real* caller-id on find-me/follow-me
I've got the following set up: Someone calls into my PBX on a single number (via SIP trunk from my carrier), and the get a voice menu of extensions. On one of the extensions, it rings a bunch of internal SIP hardphones, plus ringing my cellphone via a hairpin through the cairrier's SIP/PSTN gateway. The issue is that my cellphone shows my PBX's number, not the original calling number. My dialplan looks like: [globals] ... TRUNK=SIP/sip_proxy-out CELL=${TRUNK}/208xxxyyyy PHILIP=SIP/bedroom_1&SIP/office_2&SIP/kitchen_1&${CELL} [incoming] exten => s,1,Answer() ; sometimes signaling and media get out of sync on cell networks... exten => s,n,Wait(0.75) exten => s,n,Playback(main-menu) exten => s,n(exten),Background(vm-enter-number-to-call) exten => s,n,WaitExten(5) exten => s,n(goodbye),Playback(vm-goodbye) exten => s,n(end),Hangup ... exten => 111,1,Macro(stdexten,111,${PHILIP}) exten => 111,n,Goto(s,exten) exten => 112,1,Macro(stdexten,112,${REDFISH}) exten => 112,n,Goto(s,exten) ... exten => i,1,Playback(pbx-invalid) exten => i,n,Goto(s,exten) exten => t,1,Goto(s,goodbye) Ok, so far, so good. The problem is that when we hit "Macro(stdexten,111,${PHILIP})" and it does the "Dial(${PHILIP})" which includes the SIP/sip_proxy-out/208xxxyyyy, 208xxxyyyy rings with my PBX's extension. Oddly, the internal phones ring with outside caller's extension. [sip_proxy-out] type=peer fromuser=208nnnmmmm fromdomain=x.x.x.x host=y.y.y.y call-limit=5 nat=yes So I'm not setting the callerid on the peer by default. What am I missing? Do I need to modify the stdexten macro to dial with the 'o' option? Or can I set this explicitly with a 'Set' before calling the macro? Or do I need to be missing with the RDNIS? Oh, I'm running Asterisk 1.2.25... (yes, I'll upgrade when AstLinux upgrades). -Philip P.S. I tried adding "|o" to the end of the PHILIP variable, but this didn't seem to make a difference.
Anselm Martin Hoffmeister
2007-Dec-16 09:35 UTC
[asterisk-users] Newbie question: how to proxy the *real* caller-id on find-me/follow-me
Am Samstag, den 15.12.2007, 16:55 -0800 schrieb Philip Prindeville:> I've got the following set up: > > Someone calls into my PBX on a single number (via SIP trunk from my > carrier), and the get a voice menu of extensions. > > On one of the extensions, it rings a bunch of internal SIP hardphones, > plus ringing my cellphone via a hairpin through the cairrier's SIP/PSTN > gateway. > > The issue is that my cellphone shows my PBX's number, not the original > calling number.This topic has been covered in length. In most cases it seems to end at the fact that providers "correct" caller-ids they get from the calling party: If you send any number which is assigned to the PRI (or SIP trunk), that is fine; if you send another number, it will be changed to the (first) number of the PRI/trunk. Few providers allow for "foreign" caller ids to be sent over their equipment - in some countries this is even illegal. For example, one of my providers (German) allows to set any CALLERID, but their documentation warns to not do stupid tricks, as calls can be tracked and using malicious information will be prosecuted. This feature is to be used only for sending _my_ cell phone number etc. BR Anselm