Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Voice mail and caller ID


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
darcy at Vex.Net
Guest





PostPosted: Fri Jun 12, 2015 1:24 pm    Post subject: [asterisk-users] Voice mail and caller ID Reply with quote

I have this in my sip.conf:

exten => *98,1,Verbose(0,CALLERID number is "${CALLERID(num)}")
same => n,VoicemailMain(${CALLERID(num)}@LocalSets,s)
same => n,Hangup

However, my extensions are set up so that they always show the external
number, not the extension:

[foobar2](client-phone)
secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
callerid=Candace <5555551212>
mailbox=foobar2@LocalSets

So the caller ID is 5555551212 but the voice mail is foobar2. Is there
any way to get the actual extension that called? Can I create a
variable in the extension that I can read instead of ${CALLERID(num)}?
I tried setting a random string (xaccount) and reading it with
${ENV(xaccount)} but it's not an environment variable and didn't work.

Cheers.

--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
johnkiniston at gmail.com
Guest





PostPosted: Fri Jun 12, 2015 1:49 pm    Post subject: [asterisk-users] Voice mail and caller ID Reply with quote

Try this for CHAN_SIP:

same =>     n,Set(Peer=${SIPCHANINFO(peername)}) ; Get the peer
same =>     n,Set(MailBox=${SIPPEER(${Peer},mailbox)}); Get the mailbox
same =>     n,VoicemailMain(${MailBox}@LocalSets,s)   ; If we have a mailbox defined log into it


If you are using PJSIP it's more complex
same =>     n,Set(EndPoint=${CHANNEL(endpoint)}) ; Get the peer
same =>     n,Set(MailBox=${PJSIP_ENDPOINT(${EndPoint},mailboxes)})
same =>     n,ExecIf($[${ISNULL(${MailBox})} = 1]?Set(MailBox=${AST_SORCERY(res_pjsip,aor,${EndPoint},mailboxes)}))
same =>     n,VoicemailMain(${MailBox}@LocalSets,s)   ; If we have a mailbox defined log into it


On Fri, Jun 12, 2015 at 11:23 AM, D'Arcy J.M. Cain <darcy@vex.net (darcy@vex.net)> wrote:
Quote:
I have this in my sip.conf:

exten => *98,1,Verbose(0,CALLERID number is "${CALLERID(num)}")
    same => n,VoicemailMain(${CALLERID(num)}@LocalSets,s)
    same => n,Hangup

However, my extensions are set up so that they always show the external
number, not the extension:

[foobar2](client-phone)
secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
callerid=Candace <5555551212>
mailbox=foobar2@LocalSets

So the caller ID is 5555551212 but the voice mail is foobar2.  Is there
any way to get the actual extension that called?  Can I create a
variable in the extension that I can read instead of ${CALLERID(num)}?
I tried setting a random string (xaccount) and reading it with
${ENV(xaccount)} but it's not an environment variable and didn't work.

Cheers.

--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



--
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
---Heinlein
Back to top
darcy at Vex.Net
Guest





PostPosted: Fri Jun 12, 2015 3:11 pm    Post subject: [asterisk-users] Voice mail and caller ID Reply with quote

On Fri, 12 Jun 2015 11:49:05 -0700
John Kiniston <johnkiniston@gmail.com> wrote:
Quote:
Try this for CHAN_SIP:

same => n,Set(Peer=${SIPCHANINFO(peername)}) ; Get the peer
same => n,Set(MailBox=${SIPPEER(${Peer},mailbox)}); Get the
mailbox same => n,VoicemailMain(${MailBox}@LocalSets,s) ; If we
have a mailbox defined log into it

Perfect. Thanks. However, I didn't bother setting a variable. I just
use it directly.

same => n,VoicemailMain(${SIPCHANINFO(peername)}@LocalSets,s)

However...

http://www.voip-info.org/wiki/view/Asterisk+func+sipchaninfo says that
SIPCHANINFO is deprecated and that we should use CHANNEL instead. I
tried that and it said "pbx.c: Function CHANNEL not registered". Does
that mean that this solution will eventually fail when SIPCHANINFO is
removed in some future release? I am running 11.17.1.

Cheers.

--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
rmudgett at digium.com
Guest





PostPosted: Fri Jun 12, 2015 3:13 pm    Post subject: [asterisk-users] Voice mail and caller ID Reply with quote

On Fri, Jun 12, 2015 at 3:10 PM, D'Arcy J.M. Cain <darcy@vex.net (darcy@vex.net)> wrote:
Quote:
On Fri, 12 Jun 2015 11:49:05 -0700
John Kiniston <johnkiniston@gmail.com (johnkiniston@gmail.com)> wrote:
Quote:
Try this for CHAN_SIP:

same =>     n,Set(Peer=${SIPCHANINFO(peername)}) ; Get the peer
same =>     n,Set(MailBox=${SIPPEER(${Peer},mailbox)}); Get the
mailbox same =>     n,VoicemailMain(${MailBox}@LocalSets,s)   ; If we
have a mailbox defined log into it

Perfect.  Thanks.  However, I didn't bother setting a variable.  I just
use it directly.

same => n,VoicemailMain(${SIPCHANINFO(peername)}@LocalSets,s)

However...

http://www.voip-info.org/wiki/view/Asterisk+func+sipchaninfo says that
SIPCHANINFO is deprecated and that we should use CHANNEL instead.  I
tried that and it said "pbx.c: Function CHANNEL not registered".  Does
that mean that this solution will eventually fail when SIPCHANINFO is
removed in some future release?  I am running 11.17.1.


No.  It means that you have not loaded func_channel.so.


Richard
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services