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

jjblitz jjblitz071 at gmail.com
Wed May 4 16:00:04 CDT 2011


On 5/4/2011 4:04 PM, Warren Selby wrote:
> On Wed, May 4, 2011 at 12:10 PM, John Hablitzel <jjblitz071 at gmail.com 
> <mailto:jjblitz071 at gmail.com>> 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 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
>     <mailto:sip%3A1234567890 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
>     <mailto:sip%3A1234567890 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
>     <mailto:sip%3A2001 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)
>
>
> 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)
>
>
> -- 
> Thanks,
> --Warren Selby, dCAP
> http://www.selbytech.com
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                 http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>     http://lists.digium.com/mailman/listinfo/asterisk-users
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110504/380d4746/attachment-0001.htm>


More information about the asterisk-users mailing list