Invalid From/Contact Header Values

Home » Asterisk Users » Invalid From/Contact Header Values
Asterisk Users No Comments

Hi, I’m observing wrong From/Contact header values. When I try to set CallerID(num) it has no effect in the From and Contact Headers, and these values are the same as the dialed number. SIP Peers are defined using asterisk realtime. If I define the SIP Peers using sip.conf then From/Contact header value are correct.

extentions.conf
[test]
exten=> 1000, 1,NoOp()
same=> n,Set(CALLERID(num)11)
same=> n,Set(CALLERID(name)11)
same=> n,Dial(SIP/1000)

exten=> 2000, 1,NoOp()
same=> n,Set(CALLERID(num)”22)
same=> n,Set(CALLERID(name)”22)
same=> n,Dial(SIP/2000)

Here is the sip trace…
——— — Executing [2000@test:1] NoOp(“SIP/1000-00000014”, “”) in new stack
— Executing [2000@test:2] Set(“SIP/1000-00000014”,
“CALLERID(num)”22”) in new stack
— Executing [2000@test:3] Set(“SIP/1000-00000014”,
“CALLERID(name)”22”) in new stack
— Executing [2000@test:4] Dial(“SIP/1000-00000014”, “SIP/2000”) in new stack
== Using SIP RTP CoS mark 5
Audio is at 16264
Adding codec 100004 (alaw) to SDP
Adding codec 100003 (ulaw) to SDP
Adding codec 100002 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 10.10.7.218:5060:
INVITE sip:2000@10.10.7.218:5060 SIP/2.0
Via: SIP/2.0/UDP my-ip:5060;branch=z9hG4bK73e9c721
Max-Forwards: 70
From: “2222” ;tag=as2a72da29
To:
Contact:
Call-ID: 1f75fe937c6194227e6b5a5c29f41a52@sipdev.mydomain.com CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.5.1
Date: Wed, 11 Dec 2013 16:23:07 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer Content-Type: application/sdp Content-Length: 309

v=0
o=root 604923607 604923607 IN IP4 my-ip s=Asterisk PBX 11.5.1
c=IN IP4 my-ip t=0 0
m=audio 16264 RTP/AVP 8 0 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off – – – –
a=ptime:20
a=sendrecv

————————————————————-