[Asterisk-Users] Setting SIP username for CallerID
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/[EMAIL PROTECTED],1' -- Called Agent/1601 -- Executing Dial(Local/[EMAIL PROTECTED],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:[EMAIL PROTECTED]:5060 SIP/2.0 Via: SIP/2.0/UDP 10.0.0.242:5060;branch=z9hG4bK70ccd454;rport From: CCUK sip:[EMAIL PROTECTED];tag=as13d91518 To: sip:[EMAIL PROTECTED]:5060 Contact: sip:[EMAIL PROTECTED] Call-ID: [EMAIL PROTECTED] 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:[EMAIL PROTECTED] as I'd expect, but if I use a string value, it stays at 'sip:[EMAIL PROTECTED]' So my question is, how can I change the sip username from sip:[EMAIL PROTECTED] to sip:[EMAIL PROTECTED] ? Am I doing something mind-bogglingly stupid? Cheers, Gavin. ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting SIP username for CallerID
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/[EMAIL PROTECTED],1' -- Called Agent/1601 -- Executing Dial(Local/[EMAIL PROTECTED],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:[EMAIL PROTECTED]:5060 SIP/2.0 Via: SIP/2.0/UDP 10.0.0.242:5060;branch=z9hG4bK70ccd454;rport From: CCUK sip:[EMAIL PROTECTED];tag=as13d91518 To: sip:[EMAIL PROTECTED]:5060 Contact: sip:[EMAIL PROTECTED] Call-ID: [EMAIL PROTECTED] 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:[EMAIL PROTECTED] as I'd expect, but if I use a string value, it stays at 'sip:[EMAIL PROTECTED]' So my question is, how can I change the sip username from sip:[EMAIL PROTECTED] to sip:[EMAIL PROTECTED] ? Am I doing something mind-bogglingly stupid? Shouldn't be there a quote mark and two values, like: SetCallerID(Ronald 123456789) bye Ronald ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting SIP username for CallerID
On Wednesday 20 April 2005 10:32, Ronald Wiplinger wrote: So my question is, how can I change the sip username from sip:[EMAIL PROTECTED] to sip:[EMAIL PROTECTED] ? Shouldn't be there a quote mark and two values, like: SetCallerID(Ronald 123456789) Just tried a few combinations of that, and using the precise command above, the phone shows only the number. If I put a string inside the , * will still generate sip:[EMAIL PROTECTED]'... if I just put SetCallerID(CCUK) alone, I still get sip:[EMAIL PROTECTED] I am using CVS HEAD as of yesterday :) Cheers, Gavin. ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting SIP username for CallerID
Try using SetCIDNum(CCUK) -Arun On 4/20/05, Gavin Hamill [EMAIL PROTECTED] wrote: On Wednesday 20 April 2005 10:32, Ronald Wiplinger wrote: So my question is, how can I change the sip username from sip:[EMAIL PROTECTED] to sip:[EMAIL PROTECTED] ? Shouldn't be there a quote mark and two values, like: SetCallerID(Ronald 123456789) Just tried a few combinations of that, and using the precise command above, the phone shows only the number. If I put a string inside the , * will still generate sip:[EMAIL PROTECTED]'... if I just put SetCallerID(CCUK) alone, I still get sip:[EMAIL PROTECTED] I am using CVS HEAD as of yesterday :) Cheers, Gavin. ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting SIP username for CallerID
On Wednesday 20 April 2005 11:15, Arunachala wrote: Try using SetCIDNum(CCUK) Nope, the most I can ever extract from any combination of the three 'CID' commands is this in the SIP messages :( From: CCUK sip:[EMAIL PROTECTED] Cheers, Gavin. ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting SIP username for CallerID
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. ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Setting SIP username for CallerID
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 ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users