[asterisk-users] Remove "name" part of SIP From header

John Hablitzel jjblitz071 at gmail.com
Wed May 4 12:10:25 CDT 2011


Relatively new to Asterisk and SIP and am trying to run a proof of 
concept using Asterisk to make an outbound call through an Audiocodes 
gateway via SIP using Asterisk version 1.6.1.12.  The specific 
requirements of the gateway in the configuration I am trying to use 
specify that the Name part of the From header be blank with the outbound 
number that needs to be dialed in the number field of the From header. 
So I want it to look like this:
From: <sip:1234567890 at 192.168.3.110>;tag=xxx

However, even if I set the name to blank, using Set(CALLERID(name)= ), 
Asterisk always seems to put the CallerID number in the name field as 
well and here is what I get:
From: "1234567890" <sip:1234567890 at 192.168.3.110>;tag=xxx

I cannot figure out how to get the name field to be blank. Here is the 
extensions.conf context that I think should work:
exten => xxx,1,Noop(Channel ID is ${CHANNEL})
exten => xxx,n,Noop(From is ${SIP_HEADER(From)})
exten => xxx,n,Set(CALLERID(num)=1234567890)
exten => xxx,n,Set(CALLERID(name)=)
exten => xxx,n,Noop(CallerID is ${CALLERID(all)})
exten => xxx,n(dialout),Dial(SIP/POTS1,60,o)
exten => xxx,n,Hangup

And my general and section from sip.conf
[general]
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
srvlookup=yes
disallow=all
allow=ulaw
allow=alaw
limitonpeers=yes
notifyringing=yes
maxexpirery=180
defaultexpirey=180

[POTS1]
type=friend
secret=xxx
context=pots_in
host=dynamic
dtmfmode=info
disallow=all
allow=ulaw
allow=alaw
canreinvite=no
qualify=yes
call-limit=4
rtptimeout=30

And here is the verbose CLI output from the above configuration.
-- Executing [xxx at inbound:1] NoOp("SIP/2001-00000004", "Channel ID is 
SIP/2001-00000004") in new stack
-- Executing [xxx at inbound:2] NoOp("SIP/2001-00000004", "From is 
<sip:2001 at 192.168.3.112>;tag=1c354991377") in new stack
-- Executing [xxx at inbound:3] Set("SIP/2001-00000004", 
"CALLERID(num)=1234567890") in new stack
-- Executing [xxx at inbound:4] Set("SIP/2001-00000004", "CALLERID(name)=") 
in new stack
-- Executing [xxx at inbound:5] NoOp("SIP/2001-00000004", "CallerID is "" 
<1234567890>") in new stack
-- Executing [xxx at inbound:6] Dial("SIP/2001-00000004", "SIP/POTS1,60,o") 
in new stack
== Using SIP RTP CoS mark 5
-- Called POTS1
-- Got SIP response 484 "Address Incomplete" back from 192.168.3.121
== Everyone is busy/congested at this time (1:0/0/1)

As you can see the Noop on the Caller ID shows that the name is blank, 
but Asterisk seems to default somehow to putting the number in the name 
field if it is blank when the Invite is created. I've also tried various 
combinations of setting CallerID(name) and (num) as well as some changes 
to settings in sip.conf for this channel that should effect caller id 
and cannot get it to clear. Is there a way to configure Asterisk not to 
do this?


Thanks in advance for any insight you can provide.



More information about the asterisk-users mailing list