[asterisk-users] How to retrieve a phone number fromcall forwarding?
Soonthorn Ativanichayaphong
soonthorn at yapinc.com
Tue Jan 19 15:57:09 CST 2010
okay. Never mind. The redirecting number information is indeed available via
${CALLERID(rdnis)} variable. I was testing with two different phones and it
happens that our ISDN provider is having problem sending RDNIS information
on one of the phone that got me confused.
Thanks.
On Tue, Jan 19, 2010 at 2:04 AM, Soonthorn Ativanichayaphong <
soonthorn at yapinc.com> wrote:
> Hi Don and others.
>
> 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.
>
> D1 : L3 TX CREF=0004 IE[05]=CALLGNUM (NumType=National
> NumPlan=ISDN/Telephony[E.164] PresentInd=Allowed ScrnInd=NetworkProvided
> Digits=3333333333)
>
> D1 : L3 TX CREF=0004 IE[06]=CALLDNUM (NumType=National
> NumPlan=ISDN/Telephony[E.164] Digits=2222222222)
>
> D1 : L3 TX CREF=0004 IE[07]=REDIRNUM (NumType=National
> NumPlan=ISDN/Telephony[E.164] PresentInd=Allowed ScrnInd=None Reason=Uncond
> Digits=111111111)
> 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?
>
> 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.
>
> Thank you for your help.
>
>
> On Wed, Jan 28, 2009 at 8:04 PM, Don Kelly <dk at donkelly.biz> wrote:
>
>> With ISDN service, DNIS presents the "DID" number, 222-222-2222 in the
>> example--not what Soonthorn is looking for.
>>
>> 111-111-1111 is the "redirecting" number. This is available in an ISDN
>> information element.
>>
>> For SIP, you'd apparently look for a "CC-Diversion header field." This is
>> from a Cisco blurb:
>>
>> If generated by the SIP gateway during call process, the CC-Diversion
>> header
>> field is based on the contents of the Redirecting Number Information
>> Element
>> (IE) in the ISDN Setup message. In addition, information such as the
>> reason
>> the call was redirected is included in the CC-Diversion header field.
>>
>> --Don
>>
>> Don Kelly
>> PCF Corp
>> People Come First
>>
>> 651 842-1000
>> 888 Don Kell(y)
>> 651 842-1001 fax
>>
>>
>>
>> -----Original Message-----
>> From: asterisk-users-bounces at lists.digium.com
>> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jose P.
>> Espinal
>> Sent: Wednesday, January 28, 2009 5:50 PM
>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>> Subject: Re: [asterisk-users] How to retrieve a phone number fromcall
>> forwarding?
>>
>> Hello,
>>
>> Maybe what you are looking for is called DNIS (Dialed Number Information
>> Service). Some companies provide this service, which you can use to
>> route incoming calls to different dialplan options/contexts/etc.
>>
>>
>>
>> Regards,
>>
>>
>>
>> --
>> Jose P. Espinal
>> http://www.eSlackware.com
>>
>>
>>
>> Soonthorn Ativanichayaphong wrote:
>> > Hi,
>> >
>> > I'm very new to Asterisk and I have the following scenario.
>> >
>> > 1. Let's say I have a number of 1-222-222-2222 from my SIP service
>> > provider (VoicePulse).
>> > 2. I point my phone, Verizon wireless cellphone (1-111-111-1111),
>> > voicemail to the number provided by SIP service provider
>> > (1-222-222-2222).
>> > 3. I use another phone (1-333-333-333) to call 1-111-111-1111 and
>> > leave a voicemail message.
>> >
>> > Within my Asterisk console , I can see a caller id of 1-333-333-333
>> > and the number provided by SIP service provider (1-222-222-2222).
>> > However, I couldn't figure out how to get the number the caller dialed
>> > ( 1-111-111-1111). Is there a way to retrieve the number the caller
>> > dialed (i.e. 1-111-1111) in this scenario?
>> >
>> > Note that as far as I know the carrier (e.g Verizon wireless) should
>> > pass on those information. I see many companies that provide voicemail
>> > to email services. They seem to be able to retrieve those information.
>> > Is there a way to confirm that my SIP service provide does actually
>> > pass on those information?
>> >
>> > Here is what I have in extensions.conf to test this scenario
>> >
>> > exten => _XX.,1,NoOp(Call received from VoicePulse)
>> > exten => _XX.,n,Log(INFO|Caller ID Number: ${CALLERID(num)})
>> > exten => _XX.,n,Answer()
>> > exten => _XX.,n,DumpChan()
>> > exten => _XX.,n,VoiceMail(101 at default,u)
>> >
>> > Here is what I see on the console.
>> >
>> > zeus*CLI>
>> > -- Executing [12222222 at voicepulse-in:1] NoOp("SIP/mrXXXX-08XXXX",
>> > "Call received from VoicePulse") in new stack
>> > -- Executing [12222222 at voicepulse-in:2] Log("SIP/mrXXXX-08XXXX",
>> > "INFO|Caller ID Number: 3333333") in new stack
>> > [Jan 28 18:20:24] ERROR[22123]: app_verbose.c:133 log_exec: Unknown
>> > log level: 'INFO'
>> > -- Executing [12222222 at voicepulse-in:3]
>> > Answer("SIP/mrXXXX-08XXXX", "") in new stack
>> > -- Executing [12222222 at voicepulse-in:4]
>> > DumpChan("SIP/mrXXXX-08XXXX", "") in new stack
>> > zeus*CLI>
>> > Dumping Info For Channel: SIP/mrXXXX-08XXXX:
>> >
>>
>> ============================================================================
>> ====
>> > Info:
>> > Name= SIP/mrXXXX-08XXXX
>> > Type= SIP
>> > UniqueID= 12331856824.83
>> > CallerID= 3333333
>> > CallerIDName= ATIVA DAVID
>> > DNIDDigits= 12222222
>> > RDNIS= (N/A)
>> > State= Up (6)
>> > Rings= 0
>> > NativeFormat= 0x4 (ulaw)
>> > WriteFormat= 0x4 (ulaw)
>> > ReadFormat= 0x4 (ulaw)
>> > 1stFileDescriptor= 23
>> > Framesin= 0
>> > Framesout= 0
>> > TimetoHangup= 0
>> > ElapsedTime= 0h0m0s
>> > Context= voicepulse-in
>> > Extension= 12222222
>> > Priority= 4
>> > CallGroup=
>> > PickupGroup=
>> > Application= DumpChan
>> > Data= (Empty)
>> > Blocking_in= (Not Blocking)
>> >
>> > Variables:
>> > SIPCALLID=282e93ca78805a039fdf01729af52c at 64.62.94.171
>> > <mailto:282e93ca78805a039fdf01729af52c at 64.62.94.171>
>> > SIPUSERAGENT=Asterisk PBX
>> > SIPDOMAIN=66.195.225.160
>> > SIPURI=sip:3333333 at 64.62.94.171 <sip%3A3333333 at 64.62.94.171> <mailto:
>> sip%3A3333333 at 64.62.94.171 <sip%253A3333333 at 64.62.94.171>>
>> >
>>
>> ============================================================================
>> ====
>> > -- Executing [12222222 at voicepulse-in:5]
>> > VoiceMail("SIP/mrXXXX-08XXXX", "101 at default|u") in new stack
>> > -- <SIP/mrXXXX-08XXXX> Playing 'vm-theperson' (language 'en')
>> > -- <SIP/mrXXXX-08XXXX> Playing 'digits/1' (language 'en')
>> > -- <SIP/mrXXXX-08XXXX> Playing 'digits/0' (language 'en')
>> > -- <SIP/mrXXXX-08XXXX> Playing 'digits/1' (language 'en')
>> > -- <SIP/mrXXXX-08XXXX> Playing 'vm-isunavail' (language 'en')
>> > -- <SIP/mrXXXX-08XXXX> Playing 'vm-intro' (language 'en')
>> > -- <SIP/mrXXXX-08XXXX> Playing 'beep' (language 'en')
>> > -- Recording the message
>> > -- x=0, open writing:
>> > /var/spool/asterisk/voicemail/default/101/tmp/0oxv2s format: wav49,
>> > 0x830d4a0
>> > -- x=1, open writing:
>> > /var/spool/asterisk/voicemail/default/101/tmp/0oxv2s format: gsm,
>> > 0x83082c0
>> > -- x=2, open writing:
>> > /var/spool/asterisk/voicemail/default/101/tmp/0oxv2s format: wav,
>> > 0x82f0888
>> > -- User hung up
>> > == Spawn extension (voicepulse-in, 12222222, 5) exited non-zero on
>> > 'SIP/mrXXXX-08XXXX'
>> > zeus*CLI>
>> >
>> >
>> > Here is what I see in a text file in
>> > /var/spool/asterisk/voicemail/default/101/INBOX
>> >
>> > ;
>> > ; Message Information file
>> > ;
>> > [message]
>> > origmailbox=101
>> > context=voicepulse-in
>> > macrocontext=
>> > exten=12222222
>> > priority=5
>> > callerchan=SIP/mrXXXX-08XXXX
>> > callerid="ATIVA DAVID " <3333333>
>> > origdate=Wed Jan 28 06:20:34 PM EST 2009
>> > origtime=1233184834
>> > category=
>> > duration=6
>> >
>> >
>> > Thank you. I really appreciate any help.
>> >
>> >
>> >
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> >
>> > asterisk-users mailing list
>> > To UNSUBSCRIBE or update options visit:
>> > http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
>
>
--
Thanks,
Soonthorn Ativanichayaphong
Software Engineer
Yap Inc.
Office: 704-960-1772
--
Confidential & Privileged: This email message is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply email and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100119/a28c33e0/attachment.htm
More information about the asterisk-users
mailing list