Soonthorn Ativanichayaphong
2009-Jan-28 23:40 UTC
[asterisk-users] How to retrieve a phone number from call forwarding?
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 CallGroupPickupGroupApplication= DumpChan Data= (Empty) Blocking_in= (Not Blocking) Variables: SIPCALLID=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> =============================================================================== -- 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 macrocontextexten=12222222 priority=5 callerchan=SIP/mrXXXX-08XXXX callerid="ATIVA DAVID " <3333333> origdate=Wed Jan 28 06:20:34 PM EST 2009 origtime=1233184834 categoryduration=6 Thank you. I really appreciate any help. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090128/18e8a7cf/attachment.htm
Jose P. Espinal
2009-Jan-28 23:49 UTC
[asterisk-users] How to retrieve a phone number from call 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 <mailto:sip%3A3333333 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
Rafael Rincon
2009-Jan-29 00:05 UTC
[asterisk-users] How to retrieve a phone number from callforwarding?
Hello, Can you do a tcpdump or wireshark capture and check if the sip packets contais the info you are looking for. Look for the SIP INVITE conming from your SIP Provider. Regards, Rafael Sent via BlackBerry from T-Mobile -----Original Message----- From: Soonthorn Ativanichayaphong <soonthorn at yapinc.com> Date: Wed, 28 Jan 2009 18:40:39 To: <asterisk-users at lists.digium.com> Subject: [asterisk-users] How to retrieve a phone number from call forwarding? _______________________________________________ -- 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