Hi Don and others.<br><br>Finally, we've set up our Asterisk with ISDN service. At the edge of our network, we can see all three numbers we are interested in as follows.<br><br>D1 : L3 TX CREF=0004 IE[05]=CALLGNUM (NumType=National
NumPlan=ISDN/Telephony[E.164] PresentInd=Allowed ScrnInd=NetworkProvided
Digits=3333333333)
<p class="MsoNormal">D1 : L3 TX CREF=0004 IE[06]=CALLDNUM (NumType=National
NumPlan=ISDN/Telephony[E.164] Digits=2222222222)</p>
<p class="MsoNormal">D1 : L3 TX CREF=0004 IE[07]=REDIRNUM (NumType=National
NumPlan=ISDN/Telephony[E.164] PresentInd=Allowed ScrnInd=None Reason=Uncond
Digits=111111111)</p>In Asterisk configuration file (version 1.6.1.9), I can refer to caller id number via ${CALLERID(num)} variable. My question is how I can refer to the redirecting number (REDIRNUM)? Which variable should I use?<br>
<br>Don mentioned about Redirecting Number Information Element (IE). Is there a way to access those IE values within asterisk configuration files? Note that I also tried DumpChan(). However, I don't see this REDIRNUM (1111111111) printed out anywhere. Does anyone know if Asterisk actually passed on the number to an application or configuration? If not, which source code files I should start looking at to add the feature? I've looked at chan_dahdi.c but it's a bit overwhelming. Any guidance would be really appreciated.<br>
<br>Thank you for your help.<br><br><br><div class="gmail_quote">On Wed, Jan 28, 2009 at 8:04 PM, Don Kelly <span dir="ltr"><<a href="mailto:dk@donkelly.biz">dk@donkelly.biz</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
With ISDN service, DNIS presents the "DID" number, 222-222-2222 in the<br>
example--not what Soonthorn is looking for.<br>
<br>
111-111-1111 is the "redirecting" number. This is available in an ISDN<br>
information element.<br>
<br>
For SIP, you'd apparently look for a "CC-Diversion header field." This is<br>
from a Cisco blurb:<br>
<br>
If generated by the SIP gateway during call process, the CC-Diversion header<br>
field is based on the contents of the Redirecting Number Information Element<br>
(IE) in the ISDN Setup message. In addition, information such as the reason<br>
the call was redirected is included in the CC-Diversion header field.<br>
<div class="im"><br>
--Don<br>
<br>
Don Kelly<br>
PCF Corp<br>
People Come First<br>
<br>
651 842-1000<br>
888 Don Kell(y)<br>
651 842-1001 fax<br>
<br>
<br>
<br>
</div><div class="im">-----Original Message-----<br>
From: <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a><br>
</div><div class="im">[mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>] On Behalf Of Jose P.<br>
Espinal<br>
Sent: Wednesday, January 28, 2009 5:50 PM<br>
To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
</div><div class="im">Subject: Re: [asterisk-users] How to retrieve a phone number fromcall<br>
forwarding?<br>
<br>
</div><div><div></div><div class="h5">Hello,<br>
<br>
Maybe what you are looking for is called DNIS (Dialed Number Information<br>
Service). Some companies provide this service, which you can use to<br>
route incoming calls to different dialplan options/contexts/etc.<br>
<br>
<br>
<br>
Regards,<br>
<br>
<br>
<br>
--<br>
Jose P. Espinal<br>
<a href="http://www.eSlackware.com" target="_blank">http://www.eSlackware.com</a><br>
<br>
<br>
<br>
Soonthorn Ativanichayaphong wrote:<br>
> Hi,<br>
><br>
> I'm very new to Asterisk and I have the following scenario.<br>
><br>
> 1. Let's say I have a number of 1-222-222-2222 from my SIP service<br>
> provider (VoicePulse).<br>
> 2. I point my phone, Verizon wireless cellphone (1-111-111-1111),<br>
> voicemail to the number provided by SIP service provider<br>
> (1-222-222-2222).<br>
> 3. I use another phone (1-333-333-333) to call 1-111-111-1111 and<br>
> leave a voicemail message.<br>
><br>
> Within my Asterisk console , I can see a caller id of 1-333-333-333<br>
> and the number provided by SIP service provider (1-222-222-2222).<br>
> However, I couldn't figure out how to get the number the caller dialed<br>
> ( 1-111-111-1111). Is there a way to retrieve the number the caller<br>
> dialed (i.e. 1-111-1111) in this scenario?<br>
><br>
> Note that as far as I know the carrier (e.g Verizon wireless) should<br>
> pass on those information. I see many companies that provide voicemail<br>
> to email services. They seem to be able to retrieve those information.<br>
> Is there a way to confirm that my SIP service provide does actually<br>
> pass on those information?<br>
><br>
> Here is what I have in extensions.conf to test this scenario<br>
><br>
> exten => _XX.,1,NoOp(Call received from VoicePulse)<br>
> exten => _XX.,n,Log(INFO|Caller ID Number: ${CALLERID(num)})<br>
> exten => _XX.,n,Answer()<br>
> exten => _XX.,n,DumpChan()<br>
> exten => _XX.,n,VoiceMail(101@default,u)<br>
><br>
> Here is what I see on the console.<br>
><br>
> zeus*CLI><br>
> -- Executing [12222222@voicepulse-in:1] NoOp("SIP/mrXXXX-08XXXX",<br>
> "Call received from VoicePulse") in new stack<br>
> -- Executing [12222222@voicepulse-in:2] Log("SIP/mrXXXX-08XXXX",<br>
> "INFO|Caller ID Number: 3333333") in new stack<br>
> [Jan 28 18:20:24] ERROR[22123]: app_verbose.c:133 log_exec: Unknown<br>
> log level: 'INFO'<br>
> -- Executing [12222222@voicepulse-in:3]<br>
> Answer("SIP/mrXXXX-08XXXX", "") in new stack<br>
> -- Executing [12222222@voicepulse-in:4]<br>
> DumpChan("SIP/mrXXXX-08XXXX", "") in new stack<br>
> zeus*CLI><br>
> Dumping Info For Channel: SIP/mrXXXX-08XXXX:<br>
><br>
============================================================================<br>
====<br>
> Info:<br>
> Name= SIP/mrXXXX-08XXXX<br>
> Type= SIP<br>
> UniqueID= 12331856824.83<br>
> CallerID= 3333333<br>
> CallerIDName= ATIVA DAVID<br>
> DNIDDigits= 12222222<br>
> RDNIS= (N/A)<br>
> State= Up (6)<br>
> Rings= 0<br>
> NativeFormat= 0x4 (ulaw)<br>
> WriteFormat= 0x4 (ulaw)<br>
> ReadFormat= 0x4 (ulaw)<br>
> 1stFileDescriptor= 23<br>
> Framesin= 0<br>
> Framesout= 0<br>
> TimetoHangup= 0<br>
> ElapsedTime= 0h0m0s<br>
> Context= voicepulse-in<br>
> Extension= 12222222<br>
> Priority= 4<br>
> CallGroup=<br>
> PickupGroup=<br>
> Application= DumpChan<br>
> Data= (Empty)<br>
> Blocking_in= (Not Blocking)<br>
><br>
> Variables:<br>
> SIPCALLID=<a href="mailto:282e93ca78805a039fdf01729af52c@64.62.94.171">282e93ca78805a039fdf01729af52c@64.62.94.171</a><br>
> <mailto:<a href="mailto:282e93ca78805a039fdf01729af52c@64.62.94.171">282e93ca78805a039fdf01729af52c@64.62.94.171</a>><br>
> SIPUSERAGENT=Asterisk PBX<br>
> SIPDOMAIN=66.195.225.160<br>
> SIPURI=<a href="mailto:sip%3A3333333@64.62.94.171">sip:3333333@64.62.94.171</a> <mailto:<a href="mailto:sip%253A3333333@64.62.94.171">sip%3A3333333@64.62.94.171</a>><br>
><br>
============================================================================<br>
====<br>
> -- Executing [12222222@voicepulse-in:5]<br>
> VoiceMail("SIP/mrXXXX-08XXXX", "101@default|u") in new stack<br>
> -- <SIP/mrXXXX-08XXXX> Playing 'vm-theperson' (language 'en')<br>
> -- <SIP/mrXXXX-08XXXX> Playing 'digits/1' (language 'en')<br>
> -- <SIP/mrXXXX-08XXXX> Playing 'digits/0' (language 'en')<br>
> -- <SIP/mrXXXX-08XXXX> Playing 'digits/1' (language 'en')<br>
> -- <SIP/mrXXXX-08XXXX> Playing 'vm-isunavail' (language 'en')<br>
> -- <SIP/mrXXXX-08XXXX> Playing 'vm-intro' (language 'en')<br>
> -- <SIP/mrXXXX-08XXXX> Playing 'beep' (language 'en')<br>
> -- Recording the message<br>
> -- x=0, open writing:<br>
> /var/spool/asterisk/voicemail/default/101/tmp/0oxv2s format: wav49,<br>
> 0x830d4a0<br>
> -- x=1, open writing:<br>
> /var/spool/asterisk/voicemail/default/101/tmp/0oxv2s format: gsm,<br>
> 0x83082c0<br>
> -- x=2, open writing:<br>
> /var/spool/asterisk/voicemail/default/101/tmp/0oxv2s format: wav,<br>
> 0x82f0888<br>
> -- User hung up<br>
> == Spawn extension (voicepulse-in, 12222222, 5) exited non-zero on<br>
> 'SIP/mrXXXX-08XXXX'<br>
> zeus*CLI><br>
><br>
><br>
> Here is what I see in a text file in<br>
> /var/spool/asterisk/voicemail/default/101/INBOX<br>
><br>
> ;<br>
> ; Message Information file<br>
> ;<br>
> [message]<br>
> origmailbox=101<br>
> context=voicepulse-in<br>
> macrocontext=<br>
> exten=12222222<br>
> priority=5<br>
> callerchan=SIP/mrXXXX-08XXXX<br>
> callerid="ATIVA DAVID " <3333333><br>
> origdate=Wed Jan 28 06:20:34 PM EST 2009<br>
> origtime=1233184834<br>
> category=<br>
> duration=6<br>
><br>
><br>
> Thank you. I really appreciate any help.<br>
><br>
><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
<br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
<br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>