[Home]

Summary:ASTERISK-12849: unable to change sip from message from "Unknown" to anything else using set(callerid(num)=xxxx)
Reporter:cool developer (cooldeveloper)Labels:
Date Opened:2008-10-08 10:26:18Date Closed:2011-06-07 14:02:46
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Functions/func_callerid
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When dialing in from PSTN (ZAP or MISDN channel) using a mobile with blocked callerid, then does not matter wha I set int the dialplan using set(callerid(num)=xxxx), the sip from header will be always "Unknown".
I transfer the PSTN call to a SIP extension using DIAL(SIP/XXXX,20,rto)
Whan I turn callerid sending on on the caller mobile, then the sip from header will be whatever i set, eg. ivr, etc...

****** ADDITIONAL INFORMATION ******

set(callerid(num)=IVR-16104516827)
set(callerid(name)=IVR-Psuax)

Enabled callerid:

INVITE sip:192.168.0.50:15620 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.43:5060;branch=z9hG4bK7be5f27a;rport
From: "IVR-Psuax" <sip:IVR-16104516827@192.168.0.43>;tag=as42a6c835
To: <sip:192.168.0.50:15620>
Contact: <sip:IVR-06704526857@192.168.0.43>
Call-ID: 1de5d1340a66a4aa3ebf36dc785a2234@192.168.0.43
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 08 Oct 2008 13:39:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 395

Disable callerid:

INVITE sip:192.168.0.50:15620 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.43:5060;branch=z9hG4bK7be6dec3;rport
From: "Unknown" <sip:Unknown@192.168.0.43>;tag=as360de35b
To: <sip:192.168.0.50:15620>
Contact: <sip:Unknown@192.168.0.43>
Call-ID: 75130d1d053912a82894b82438656a9c@192.168.0.43
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 08 Oct 2008 13:47:43 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 395
Comments:By: Jason Parker (jparker) 2008-10-08 10:29:22

You need to reproduce this with the latest version of Asterisk - which is currently 1.4.22.

By: Mark Michelson (mmichelson) 2008-10-08 10:49:29

Assuming this is still present in 1.4.22, then I may know the line in chan_sip.c which is causing this to occur:
<pre>
   /* if we are not sending RPID and user wants his callerid restricted */
   if (!ast_test_flag(&p->flags[0], SIP_SENDRPID) &&
       ((p->callingpres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED)) {
       l = CALLERID_UNKNOWN;
       n = l;
   }
</pre>

The 'n' and 'l' variables are later used in the function to populate the From header. Considering that you can't change the callerid presentation from the dialplan, your best option is the set 'sendrpid = yes' in sip.conf.

By: Jason Parker (jparker) 2008-11-19 17:56:44.000-0600

Closing due to lack of response.

I'm assuming that this was solved by putnopvuts suggestion.