Remove “name” part of SIP From header

Home » Asterisk Users » Remove “name” part of SIP From header
Asterisk Users 1 Comment

On Wed, May 4, 2011 at 12:10 PM, John Hablitzel wrote:

> 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 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: ;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”
> 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=
> tcpenable=no
> tcpbindaddr=
> 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@inbound:1] NoOp(“SIP/2001-00000004”, “Channel ID is
> SIP/2001-00000004″) in new stack
> — Executing [xxx@inbound:2] NoOp(“SIP/2001-00000004”, “From is <
> sip:2001@>;tag=1c354991377″) in new stack
> — Executing [xxx@inbound:3] Set(“SIP/2001-00000004”,
> “CALLERID(num)=1234567890”) in new stack
> — Executing [xxx@inbound:4] Set(“SIP/2001-00000004”, “CALLERID(name)=”)
> in new stack
> — Executing [xxx@inbound:5] NoOp(“SIP/2001-00000004”, “CallerID is “”
> <1234567890>”) in new stack
> — Executing [xxx@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
> == Everyone is busy/congested at this time (1:0/0/1)

It doesn’t look like you’re ever actually sending the number you want to
dial? You’re setting a callerid(num), but where is the number you want to
dial? What happens if you change your dial command to this:

exten => xxx,n(dialout),Dial(SIP/${EXTEN}@POTS1,60,o)

One thought on - Remove “name” part of SIP From header

  • I tried your dial command and it fails as well. This is a non-standard
    type of configuration on the gateway used for making outbound CAMA type
    of calls with DID wink and MF signalling. All I have to do is an Invite
    to the system with the From header as described above and the gateway
    will pull the information it needs from the header. I can make it work
    in one mode where it is expecting information in both parts (name and
    number), but it fails in another mode where it just wants the number.