As usual, this is most likely a easy question, but here it goes any way: How can I change the caller id on a transferred call so the called party knows the call has been transferred from a colleague and it's not coming directly from our outside lines? The story goes like this: 1) Client calls. All phones ring. 2) Someone picks up the phone. 3) The phone gets transferred to someone. 4) The person that gets the transferred call sees the original caller id and doesn't know the call has been transferred. I'd like the person that gets the transfer to see the caller id with a digit prefix. Ex: Original caller-id: 0269123456; Caller id if the call has been transferred: 1*0269123456 I know I can use SetCallerId(1*${CALLERIDNUM}) but how do I know I'm doing a transfer and not calling someone?
Mojo with Horan & Company, LLC
2006-Mar-02 13:41 UTC
[Asterisk-Users] Changing caller id on transfer
We just had to bite the bullet and recognize the number following the prepended string as being internal or external. We prepend the string "INT:" so if I call my coworker, he sees "INT:Mojo" as the caller id, or "INT:112" if I have it set to do extensions instead of names. if an example incoming call came to me and I transferred it to my coworker, he might see "INT:DIR ASST" or "INT:18005551212", respectively as configured. pretty much, if the callerid number is just three digits long, we know it's an internal extension calling us directly and not transferring somebody to us. If there's no INT: prepended, we're seeing the first incarnation of the call. The only problem I've had is when it gets transferred again, another INT gets on there: "INT:INT:Mojo". You probably have separate contexts for when you dial another internal extension and when an incoming line comes in. To try this you would add the prepended strong to the internal context. Moj Cosmin Prund wrote:> As usual, this is most likely a easy question, but here it goes any way: > > How can I change the caller id on a transferred call so the called party > knows the call has been transferred from a colleague and it's not coming > directly from our outside lines? > > The story goes like this: > 1) Client calls. All phones ring. > 2) Someone picks up the phone. > 3) The phone gets transferred to someone. > 4) The person that gets the transferred call sees the original caller id and > doesn't know the call has been transferred. I'd like the person that gets > the transfer to see the caller id with a digit prefix. Ex: Original > caller-id: 0269123456; Caller id if the call has been transferred: > 1*0269123456 > > I know I can use SetCallerId(1*${CALLERIDNUM}) but how do I know I'm doing a > transfer and not calling someone? > > _______________________________________________ > --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 >-- Mojo <mojo@horanappraisals.com> Office Manger, Horan & Company, LLC (907) 747-6666 x112
Hrm, well it depends exactly how you're transferring calls as to how you'd write it in extensions.conf. Is it being transferred to an internal line or to an external line? If external, then of course you need to be able to set the outgoing callerid (you'd basically be spoofing it, but that shouldn't be an issue). I have done something similar, but not exactly like what you're wanting. I'm not sure what the best way to do it would be. Perhaps you could set the callerid early in asterisk in a variable (name it something like, ${OUTGOINGCALLERID}). Before making an outgoing call, check asterisk's built-in callerid variable, if it's empty then set it to your special variable. If it's not empty, then use it (so a normal outgoing call wouldn't already have callerid set, and would use your value, but if an incoming call came in then the callerid variable would be set, and we'd use that instead). The way I did it would require that a user start off in a different context based on whether they're receiving a call, or making an outgoing call. Perhaps you can check for a flash, or make them dial a special extension to make an outgoing, transferred call? I dunno, my setup's unique and I'm not sure how you can adapt it to your needs. Anyways, if you can get them in a different context, then it's simple. In your normal outgoing context, the very first line should be what sets the callerid. In the special incoming then outgoing context, do something like this: exten => _1NXXNXXXXXX,8,Goto(cell-out,${EXTEN},2) In this case, _1NXXNXXXXXX is the extension matched when I dial a normal long-distance number (such as 1-931-555-1212). It jumps to the [cell-out] context (can name this anything you want, this is just my setup with calling out via bluetooth), it keeps the extension the same (so in [cell-out] we would need an extension of _1NXXNXXXXXX), and goes to priority 2. This bypasses the first priority, which is where you set callerid for regular outgoing calls, so now you'll use the existing value for the outgoing callerid, instead of changing it. You could just as easily recreate your dialplan for outgoing calls that are transferred, but I prefer to jump to an existing context, that way I only have to change one part of extensions.conf. I know that if I can make a long-distance call from a local extension, then it'll work when someone calls in and gets bridged, because the code is exactly the same except for setting callerid. Hope that helps more than it confuses. Joseph Tanner On 3/2/06, Cosmin Prund <cosmin@adicomsoft.ro> wrote:> As usual, this is most likely a easy question, but here it goes any way: > > How can I change the caller id on a transferred call so the called party > knows the call has been transferred from a colleague and it's not coming > directly from our outside lines? > > The story goes like this: > 1) Client calls. All phones ring. > 2) Someone picks up the phone. > 3) The phone gets transferred to someone. > 4) The person that gets the transferred call sees the original caller id and > doesn't know the call has been transferred. I'd like the person that gets > the transfer to see the caller id with a digit prefix. Ex: Original > caller-id: 0269123456; Caller id if the call has been transferred: > 1*0269123456 > > I know I can use SetCallerId(1*${CALLERIDNUM}) but how do I know I'm doing a > transfer and not calling someone? > > _______________________________________________ > --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 >
Cosmin Prund wrote:> As usual, this is most likely a easy question, but here it goes any way: > > How can I change the caller id on a transferred call so the called party > knows the call has been transferred from a colleague and it's not coming > directly from our outside lines? > > The story goes like this: > 1) Client calls. All phones ring. > 2) Someone picks up the phone. > 3) The phone gets transferred to someone. > 4) The person that gets the transferred call sees the original caller id and > doesn't know the call has been transferred. I'd like the person that gets > the transfer to see the caller id with a digit prefix. Ex: Original > caller-id: 0269123456; Caller id if the call has been transferred: > 1*0269123456 > > I know I can use SetCallerId(1*${CALLERIDNUM}) but how do I know I'm doing a > transfer and not calling someone?You could do transfers for a number starting with 8 or whatever So instead of transferring to 101 (the user's extension), you could transfer to 8101. Then: exten => _8XXX,1,SetCallerId(1*${CALLERIDNUM}) exten => _8XXX,2,Goto(extensions,${EXTEN:1},1) Please not that the SetCallerID has been deprecated and should be replaced in versions >1.2 with: Set(CALLERID(number)=1*${CALLERIDNUM}) -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://freevoip.gedameurope.com (Free Asterisk Voip Community) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)
On 03/03/06 04:17 Cosmin Prund said the following:> How can I change the caller id on a transferred call so the called party > knows the call has been transferred from a colleague and it's not coming > directly from our outside lines?ironic ! we're trying to do the reverse: 1. call comes in via our digium zap lines 2. receptionist answers 3. receptionist uses atxfer (*1 in features.conf) to transfer to extension 4. called extension sees callerid of receptionist's extension we'd like #4 to read, "extension called extension sees callerid of original caller" ! could you post your dialplan ? -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+