Hi :) When I send an incoming call to a queue, I'm doing this: exten => 6608140,1,SetCallerID(CCUK) exten => 6608140,2,SetCIDName(CCUK) exten => 6608140,3,Queue(ccuk,r) I want the phone to say 'CCUK' - the queue name is more important to know than the incoming Caller ID :) Unfortunately the SIP phone (a cheapy using the PA168S chip and 1.42 firmware) displays the caller ID of "asterisk" when I do this, and it's clear why: --- -- outgoing agentcall, to agent '1601', on 'Local/1301@internal-9175,1' -- Called Agent/1601 -- Executing Dial("Local/1301@internal-9175,2", "SIP/1301|20|t") in new stack We're at 10.0.0.242 port 15334 12 headers, 12 lines Reliably Transmitting (NAT) to 10.0.0.82:5060: INVITE sip:1301@10.0.0.82:5060 SIP/2.0 Via: SIP/2.0/UDP 10.0.0.242:5060;branch=z9hG4bK70ccd454;rport From: "CCUK" <sip:asterisk@10.0.0.242>;tag=as13d91518 To: <sip:1301@10.0.0.82:5060> Contact: <sip:asterisk@10.0.0.242> Call-ID: 3839ea357eba10bf3a4eb3ec75f7d4cb@10.0.0.242 CSeq: 102 INVITE User-Agent: Asterisk PBX Date: Wed, 20 Apr 2005 08:34:53 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER Content-Type: application/sdp Content-Length: 260 If I SetCallerID(12345678) then it is changed to sip:12345678@10.0.0.242 as I'd expect, but if I use a string value, it stays at 'sip:asterisk@10.0.0.242' So my question is, how can I change the sip username from <sip:asterisk@10.0.0.242> to <sip:CCUK@10.0.0.242> ? Am I doing something mind-bogglingly stupid? Cheers, Gavin.
Gavin Hamill wrote:>Hi :) > >When I send an incoming call to a queue, I'm doing this: > >exten => 6608140,1,SetCallerID(CCUK) >exten => 6608140,2,SetCIDName(CCUK) >exten => 6608140,3,Queue(ccuk,r) > >I want the phone to say 'CCUK' - the queue name is more important to know than >the incoming Caller ID :) > >Unfortunately the SIP phone (a cheapy using the PA168S chip and 1.42 firmware) >displays the caller ID of "asterisk" when I do this, and it's clear why: > >--- > -- outgoing agentcall, to agent '1601', on 'Local/1301@internal-9175,1' > -- Called Agent/1601 > -- Executing Dial("Local/1301@internal-9175,2", "SIP/1301|20|t") in new >stack >We're at 10.0.0.242 port 15334 >12 headers, 12 lines >Reliably Transmitting (NAT) to 10.0.0.82:5060: >INVITE sip:1301@10.0.0.82:5060 SIP/2.0 >Via: SIP/2.0/UDP 10.0.0.242:5060;branch=z9hG4bK70ccd454;rport >From: "CCUK" <sip:asterisk@10.0.0.242>;tag=as13d91518 >To: <sip:1301@10.0.0.82:5060> >Contact: <sip:asterisk@10.0.0.242> >Call-ID: 3839ea357eba10bf3a4eb3ec75f7d4cb@10.0.0.242 >CSeq: 102 INVITE >User-Agent: Asterisk PBX >Date: Wed, 20 Apr 2005 08:34:53 GMT >Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER >Content-Type: application/sdp >Content-Length: 260 > >If I SetCallerID(12345678) then it is changed to sip:12345678@10.0.0.242 as >I'd expect, but if I use a string value, it stays at >'sip:asterisk@10.0.0.242' > >So my question is, how can I change the sip username from ><sip:asterisk@10.0.0.242> to <sip:CCUK@10.0.0.242> ? > >Am I doing something mind-bogglingly stupid? >Shouldn't be there a quote mark and two values, like: SetCallerID("Ronald" <123456789>) bye Ronald
On Wednesday 20 April 2005 11:55, Arunachala wrote:> Hi Gavin, > > Just went through the code. There is a check in the code to check > whether the CIDNum is a phone number (0-9,#,*) or no. If it is not a > phone number, it is replaced with the default CIDNum "asterisk".Hm, really smart :) If the SIP username can be alpha-numeric, I wonder what's prompted this check?> If you really want to fix this, you can do the following in the code:Thanks for the tip - I'll be sure to give that a go :) Cheers, Gavin.
Gavin Hamill wrote:> Hi :) > > When I send an incoming call to a queue, I'm doing this: > > exten => 6608140,1,SetCallerID(CCUK) > exten => 6608140,2,SetCIDName(CCUK) > exten => 6608140,3,Queue(ccuk,r) > > I want the phone to say 'CCUK' - the queue name is more important to know than > the incoming Caller ID :) > > Unfortunately the SIP phone (a cheapy using the PA168S chip and 1.42 firmware) > displays the caller ID of "asterisk" when I do this, and it's clear why:I've been successful with the following in a macro: ; our PSTN just gives us single-letter abbrevs for these - so expand exten => s,1,GotoIf($["${ARG2}" = "P"]?2:3) exten => s,2,setvar(ORIGCID=ID BLOCKED) exten => s,3,GotoIf($["${ARG2}" = "O"]?4:5) exten => s,4,setvar(ORIGCID=OUT OF AREA) exten => s/8565551212,5,SetCIDName(${ARG1}-Firewalldude) exten => s/9105551212,5,SetCIDName(${ARG1}-grumpy-sob ) exten => s,5,SetCIDName(${ARG1}-${ORIGCID}) I call the macro like: exten => line2,1,Answer() exten => line2,n,SetVar(ORIGCID=${CALLERIDNAME}) exten => line2,n,Macro(CID-mods,DS2,${CALLERIDNAME}) exten => line2,n,goto(DSSmainmenu,s,1) in the incoming call context when the call first comes in, so that if they dial straight to an extension, it has prepended an identifier (DS2 in this case) to their name which lets us know which PSTN line they've called in on. Then, when they reach a point in the menu of being placed on hold awaiting a pickup, I call the macro again with: exten => s,1,Macro(CID-mods,DSEC,${ORIGCID}) (just before I call dial()) which then replaces the 'DS2' with 'DSEC' (if they selected 'security' from the menu). 90% of the CID-mods macro is actually logic changing to custom CID names for predetermined callerID numbers, letting me assign CID 'nicknames' to any PSTN phone numbers. j