Thread: [Asterisk-java-users] How to use A-J to inject input to Dialplan?
Brought to you by:
srt
From: Greg H. <gre...@gm...> - 2013-06-03 13:01:38
|
Hi all, I am having a problem where the ext-meetme module in the dialplan gets to a point where it is waiting for PIN entry, after playing a recording to request that. This is the part of the Dialplan I refer to: [ Context 'ext-meetme' created by 'pbx_config' ] '1024' => 1. Macro(user-callerid,) [pbx_config] 2. Set(MEETME_ROOMNUM=1024) [pbx_config] 3. Set(MAX_PARTICIPANTS=2) [pbx_config] 4. Set(MEETME_MUSIC=${MOHCLASS}) [pbx_config] 5. Gosub(sub-record-check,s,1(conf,1024,always)) [pbx_config] 6. GotoIf($["${DIALSTATUS}" = "ANSWER"]?READPIN) [pbx_config] 7. Answer() [pbx_config] 8. Wait(1) [pbx_config] 9. Set(PINCOUNT=0) [pbx_config] [READPIN] 10. Read(PIN,enter-conf-pin-number,,,,) [pbx_config] <THIS IS WHERE I WANT TO INJECT A DTMF STRING> 11. GotoIf($[x${PIN} = x123]?USER) [pbx_config] 12. GotoIf($[x${PIN} = x321]?ADMIN) [pbx_config] 13. Set(PINCOUNT=$[${PINCOUNT}+1]) [pbx_config] 14. GotoIf($[${PINCOUNT}>3]?h) [pbx_config] 15. Playback(conf-invalidpin) [pbx_config] 16. Goto(READPIN) [pbx_config] [ADMIN] 17. Set(MEETME_OPTS=aAoTqcIMsr) [pbx_config] 18. Goto(STARTMEETME,1) [pbx_config] [USER] 19. Set(MEETME_OPTS=oTqcIMsr) [pbx_config] 20. Goto(STARTMEETME,1) [pbx_config] Is there an A-J command to specifically address 1024@ext-meetme, entry 11? I am trying to use PlayDtmfAction, where normally I can pass DTMF to a destination channel like SIP/101-000045c3a. Now, I have tried so many combinations and cannot get MeetMe to collect the digits of the PIN. When I make my call and collect Asterisk channel info, the destination channel at this time is seen as 1024@from-internal:1. Does the ":1" refer to entry 1 in the from-internal module of the dial plan? I have tried things like 1024@from-internal:1, Local/1024@from-internal:1, 1024@from-internal:11, and replacing from-internal with ext-meetme in all of these. If I cannot get directly to this point, is there some other roundabout way to achieve this goal? Please help as I am really stuck at this point. Thanks! Greg |
From: Yves A. <yv...@gm...> - 2013-06-03 15:00:39
|
hi, just very short... i am in a hurry... :1 means first leg of the call.... what you mean is jumping to a priority?? (11) you should be able to do so... there is a parameter where you the specify the priority... if thats not working... try to go with agi... let me know.... and explain your objective... dialplan is not complete / fully clear 2 me... yves Am 03.06.2013 15:01, schrieb Greg Horton: > Hi all, > > I am having a problem where the ext-meetme module in the dialplan gets > to a point where it is waiting for PIN entry, after playing a > recording to request that. This is the part of the Dialplan I refer to: > > [ Context 'ext-meetme' created by 'pbx_config' ] > '1024' => 1. Macro(user-callerid,) [pbx_config] > 2. Set(MEETME_ROOMNUM=1024) [pbx_config] > 3. Set(MAX_PARTICIPANTS=2) [pbx_config] > 4. Set(MEETME_MUSIC=${MOHCLASS}) [pbx_config] > 5. Gosub(sub-record-check,s,1(conf,1024,always)) > [pbx_config] > 6. GotoIf($["${DIALSTATUS}" = "ANSWER"]?READPIN) > [pbx_config] > 7. Answer() [pbx_config] > 8. Wait(1) [pbx_config] > 9. Set(PINCOUNT=0) [pbx_config] > [READPIN] 10. Read(PIN,enter-conf-pin-number,,,,) [pbx_config] > > <THIS IS WHERE I WANT TO INJECT A DTMF STRING> > > 11. GotoIf($[x${PIN} = x123]?USER) [pbx_config] > 12. GotoIf($[x${PIN} = x321]?ADMIN) [pbx_config] > 13. Set(PINCOUNT=$[${PINCOUNT}+1]) [pbx_config] > 14. GotoIf($[${PINCOUNT}>3]?h) [pbx_config] > 15. Playback(conf-invalidpin) [pbx_config] > 16. Goto(READPIN) [pbx_config] > [ADMIN] 17. Set(MEETME_OPTS=aAoTqcIMsr) [pbx_config] > 18. Goto(STARTMEETME,1) [pbx_config] > [USER] 19. Set(MEETME_OPTS=oTqcIMsr) [pbx_config] > 20. Goto(STARTMEETME,1) [pbx_config] > > Is there an A-J command to specifically address 1024@ext-meetme, entry > 11? I am trying to use PlayDtmfAction, where normally I can pass DTMF > to a destination channel like SIP/101-000045c3a. Now, I have tried so > many combinations and cannot get MeetMe to collect the digits of the PIN. > > When I make my call and collect Asterisk channel info, the destination > channel at this time is seen as 1024@from-internal:1. Does the ":1" > refer to entry 1 in the from-internal module of the dial plan? > > I have tried things like 1024@from-internal:1, > Local/1024@from-internal:1, 1024@from-internal:11, and replacing > from-internal with ext-meetme in all of these. > > If I cannot get directly to this point, is there some other roundabout > way to achieve this goal? > > Please help as I am really stuck at this point. > > Thanks! > > Greg > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Greg H. <gre...@gm...> - 2013-06-03 15:34:19
|
Hi Yves, I have an Asterisk Manager app where I have a dialer in the GUI. I dial out to a number from there, on behalf of a true Asterisk extension as defined in sip.conf. So I can dial out to MeetMe conference room 1024 on behalf of my Asterisk extension 1410. For the 1410 end I will get a channelID like SIP/1410-00034bc1. When I dial 1024, the dialplan I showed moves through entry 10 (Read(PIN,enter-conf-pin-number,,,,)) and waits on a timer. I see that in Asterisk CLI. At that time I can query the 1410 channel and I see that the destination is 1024@from-internal:1. That apparently is not a valid destination address to use for PlayDtmfAction as when I try that I see in Asterisk CLI that the user sent no data (or something like that). Now I know that :1 is not relevant for my needs. Thanks for that. Note that if I called another extension from 1410 like 1000, I could use PlayDtmfAction to generate a DTMF digit to the destination channelID like SIP/1000-00003453bc. I hope that explains my goal?? Can you give me an idea of what to do using AGI? Thanks, Greg On Mon, Jun 3, 2013 at 11:00 AM, Yves A. <yv...@gm...> wrote: > hi, > > just very short... i am in a hurry... > > :1 means first leg of the call.... > > what you mean is jumping to a priority?? (11) you should be able to do > so... there is a parameter where you the specify the priority... > if thats not working... try to go with agi... let me know.... and explain > your objective... dialplan is not complete / fully clear 2 me... > > yves > |
From: Yves A. <yv...@gm...> - 2013-06-04 06:44:43
|
hi, as far as I remember, there is an option where you can set if dtmf tones should pass the conference call... maybe this does the trick for you. if not..: sorry, I still did not get it... dialer, gui, meetme..?? how does this stick together? what is the sense of the conferenceroom with a limit of two users? if it is a dialerapplication, why not use direct bridging? (or, if you have more than one agent and use some kind of predictive dialing, you would normally use queues...) so... to be fully with you, I need to understand the whole dialprocess as detailed as possible... yves Am 03.06.2013 17:34, schrieb Greg Horton: > Hi Yves, > > I have an Asterisk Manager app where I have a dialer in the GUI. I > dial out to a number from there, on behalf of a true Asterisk > extension as defined in sip.conf. So I can dial out to MeetMe > conference room 1024 on behalf of my Asterisk extension 1410. For the > 1410 end I will get a channelID like SIP/1410-00034bc1. When I dial > 1024, the dialplan I showed moves through entry 10 > (Read(PIN,enter-conf-pin-number,,,,)) and waits on a timer. I see > that in Asterisk CLI. At that time I can query the 1410 channel and I > see that the destination is 1024@from-internal:1. That apparently is > not a valid destination address to use for PlayDtmfAction as when I > try that I see in Asterisk CLI that the user sent no data (or > something like that). > > Now I know that :1 is not relevant for my needs. Thanks for that. > > Note that if I called another extension from 1410 like 1000, I could > use PlayDtmfAction to generate a DTMF digit to the destination > channelID like SIP/1000-00003453bc. > > I hope that explains my goal?? > > Can you give me an idea of what to do using AGI? > > Thanks, > > Greg > > > On Mon, Jun 3, 2013 at 11:00 AM, Yves A. <yv...@gm... > <mailto:yv...@gm...>> wrote: > > hi, > > just very short... i am in a hurry... > > :1 means first leg of the call.... > > what you mean is jumping to a priority?? (11) you should be able > to do so... there is a parameter where you the specify the priority... > if thats not working... try to go with agi... let me know.... and > explain your objective... dialplan is not complete / fully clear 2 > me... > > yves > > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Greg H. <gre...@gm...> - 2013-06-04 12:39:12
|
Hi Yves, The example I give is from a test system for my app, thus only 2 participant max. I understand that is not a useful scenario. In short, our customer will have an existing Asterisk PBX which may have been setup by FreePBX, TrixBox, manually, or anything else. We are an app that accesses that Asterisk system and cannot alter its configuration. In this case the customer will have configured Asterisk to use Meetme and to require a PIN to enter the room. Our app can drive calls using Asterisk and A-J, but has no RTP/SIP (yet). The dialer in the GUI is a way to initiate calls from a known Asterisk extension. If I initiate a call to a known endpoint that has an Asterisk channelID (other than Meetme) then I can use the dialer send digits to Asterisk via PlayDtmfAction, and it works. This could be useful for something like prepaid cards, automated help desks, etc. When I call into the MeetMe conference room I just cannot get the DTMF passed towards that channelID. The Dialplan is waiting for a PIN and I can't hook up with where it wants to read the PIN from (in app_read.c). Maybe Asterisk's app_read can only get the PIN if it comes in an RTP media stream (in-band or 2833) or via SIP Info method (or whatever IAX does). If that is the case there is nothing I can do at this time, but I am just not sure it works that way. Thanks, Greg On Tue, Jun 4, 2013 at 2:44 AM, Yves A. <yv...@gm...> wrote: > hi, > > as far as I remember, there is an option where you can set if dtmf tones > should pass the conference call... maybe this does the trick for you. > if not..: > sorry, I still did not get it... dialer, gui, meetme..?? how does this > stick together? what is the sense of the conferenceroom with a limit of two > users? > if it is a dialerapplication, why not use direct bridging? (or, if you > have more than one agent and use some kind of predictive dialing, you would > normally > use queues...) > so... to be fully with you, I need to understand the whole dialprocess as > detailed as possible... > yves > > |
From: Yves A. <yv...@gm...> - 2013-06-05 12:21:22
|
OK, if you can play DTMF on "normal" calls, but not on meetme conferences... have you tried to change the config parameter I recommended in my last eMail or can´t you change this, because you want to avoid ANY changes in the config files on the target asterisk? If you know that you are dialling into a meetme room (and I think you know, otherwise I would be totally confused..), you can dial directly into the asterisk application meetme and pass the required parameters like roomnumber and pin... no need to play around with DTMF... The following lines given as an example would establish a connection from the (SIP-)extension 567 to the meetme room 1024 that is protected with the PIN 123456. DefaultAsteriskServer asteriskServer = new DefaultAsteriskServer("###your asterisk server ip or dns-name###", "###username with appropriate rights###", "###password###); asteriskServer.getManagerConnection().login(); asteriskServer.originateToApplication("SIP/567", "meetme", "1024,,123456", 15000l); regards, yves Am 04.06.2013 14:39, schrieb Greg Horton: > Hi Yves, > > The example I give is from a test system for my app, thus only 2 > participant max. I understand that is not a useful scenario. In > short, our customer will have an existing Asterisk PBX which may have > been setup by FreePBX, TrixBox, manually, or anything else. We are an > app that accesses that Asterisk system and cannot alter its > configuration. In this case the customer will have configured > Asterisk to use Meetme and to require a PIN to enter the room. Our > app can drive calls using Asterisk and A-J, but has no RTP/SIP (yet). > The dialer in the GUI is a way to initiate calls from a known > Asterisk extension. If I initiate a call to a known endpoint that has > an Asterisk channelID (other than Meetme) then I can use the dialer > send digits to Asterisk via PlayDtmfAction, and it works. This could > be useful for something like prepaid cards, automated help desks, etc. > When I call into the MeetMe conference room I just cannot get the > DTMF passed towards that channelID. The Dialplan is waiting for a PIN > and I can't hook up with where it wants to read the PIN from (in > app_read.c). > > Maybe Asterisk's app_read can only get the PIN if it comes in an RTP > media stream (in-band or 2833) or via SIP Info method (or whatever IAX > does). If that is the case there is nothing I can do at this time, > but I am just not sure it works that way. > > Thanks, > > Greg > > > On Tue, Jun 4, 2013 at 2:44 AM, Yves A. <yv...@gm... > <mailto:yv...@gm...>> wrote: > > hi, > > as far as I remember, there is an option where you can set if dtmf > tones should pass the conference call... maybe this does the trick > for you. > if not..: > sorry, I still did not get it... dialer, gui, meetme..?? how does > this stick together? what is the sense of the conferenceroom with > a limit of two users? > if it is a dialerapplication, why not use direct bridging? (or, if > you have more than one agent and use some kind of predictive > dialing, you would normally > use queues...) > so... to be fully with you, I need to understand the whole > dialprocess as detailed as possible... > yves > > > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Greg H. <gre...@gm...> - 2013-06-05 16:14:11
|
Hi Yves, It is a definite requirement that I not be able to alter a customer Asterisk configuration. Possibly something like tagging on a .conf file in the future but that's about it. I do know I am dialing a meeting room but it is still up to the user to enter a proper PIN number, so I guess I could do something like collect all entered info from a user then submit all at once to meetme using OriginateToApplication(). Hopefully that will alter the Asterisk dial plan so it will know it already has the PIN and it will not have to play the recording to ask for it? It's great to learn about OriginateToApplication(). I use Originate() today for all dialed calls, and maybe that is an issue. I wonder if I try using OriginateToApplication(), specifying meetme and without a PIN, maybe internally a route will be setup in Asterisk to know to send my PIN digits to the meetme app. I can play with that a bit. Thanks! Greg On Wed, Jun 5, 2013 at 8:21 AM, Yves A. <yv...@gm...> wrote: > OK, > > if you can play DTMF on "normal" calls, but not on meetme conferences... > have you tried to change the config parameter I recommended in my last > eMail or > can´t you change this, because you want to avoid ANY changes in the config > files on the target asterisk? > > If you know that you are dialling into a meetme room (and I think you > know, otherwise I would be totally confused..), you can dial directly into > the > asterisk application meetme and pass the required parameters like > roomnumber and pin... no need to play around with DTMF... > > The following lines given as an example would establish a connection from > the (SIP-)extension 567 to the meetme room 1024 that is protected with > the PIN 123456. > > DefaultAsteriskServer asteriskServer = new DefaultAsteriskServer("###your > asterisk server ip or dns-name###", "###username with appropriate > rights###", "###password###); > asteriskServer.getManagerConnection().login(); > asteriskServer.originateToApplication("SIP/567", "meetme", "1024,,123456", > 15000l); > > regards, > yves > > |
From: Yves A. <yv...@gm...> - 2013-06-05 19:25:15
|
Hi, now I am totally confused... I thought, your application has to play the PIN DTMF... now you say, that the user still has to enter the pin... So what is the problem to bridge the extension of your user with the conference-room extension? After connecting the two partys you´re done, the user hears the announcement and enters the pin...? If you can´t go this way I think I still did not catch your real objective... OriginateToApplication will not alter any part of the dialplan... its just a method to dial directly "into" asterisk apps... they do even not have to occur anywhere in the dialplan... As I mentioned earlier, you can use the originate(originateAction) method to jump to a certain priority in the dialplan... therefor you use the method originateAction.setPriority(int priority)... If the things still do not work the way you need, I think we should chat or phone... in that case eMail me directly and I´ll send you my skype ID. have fun, yves Am 05.06.2013 18:14, schrieb Greg Horton: > Hi Yves, > > It is a definite requirement that I not be able to alter a customer > Asterisk configuration. Possibly something like tagging on a .conf > file in the future but that's about it. > > I do know I am dialing a meeting room but it is still up to the user > to enter a proper PIN number, so I guess I could do something like > collect all entered info from a user then submit all at once to meetme > using OriginateToApplication(). Hopefully that will alter the > Asterisk dial plan so it will know it already has the PIN and it will > not have to play the recording to ask for it? > > It's great to learn about OriginateToApplication(). I use Originate() > today for all dialed calls, and maybe that is an issue. I wonder if I > try using OriginateToApplication(), specifying meetme and without a > PIN, maybe internally a route will be setup in Asterisk to know to > send my PIN digits to the meetme app. I can play with that a bit. > > Thanks! > > Greg > > > On Wed, Jun 5, 2013 at 8:21 AM, Yves A. <yv...@gm... > <mailto:yv...@gm...>> wrote: > > OK, > > if you can play DTMF on "normal" calls, but not on meetme > conferences... have you tried to change the config parameter I > recommended in my last eMail or > can´t you change this, because you want to avoid ANY changes in > the config files on the target asterisk? > > If you know that you are dialling into a meetme room (and I think > you know, otherwise I would be totally confused..), you can dial > directly into the > asterisk application meetme and pass the required parameters like > roomnumber and pin... no need to play around with DTMF... > > The following lines given as an example would establish a > connection from the (SIP-)extension 567 to the meetme room 1024 > that is protected with > the PIN 123456. > > DefaultAsteriskServer asteriskServer = new > DefaultAsteriskServer("###your asterisk server ip or dns-name###", > "###username with appropriate rights###", "###password###); > asteriskServer.getManagerConnection().login(); > asteriskServer.originateToApplication("SIP/567", "meetme", > "1024,,123456", 15000l); > > regards, > yves > > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Greg H. <gre...@gm...> - 2013-06-05 19:40:55
|
Hi Yves, I am sorry to be confusing. My application has a GUI interface that includes a dialer module. The user first would dial the conference room number (1024). The lower layer A-J interface would use Originate() to create a call to that conference room. The Meetme app would run in the dial plan and play out the request for a PIN. The user would then enter that PIN ("123") and the A-J layer would take that input and use PlayDtmfAction to drive it to Meetme. So it's up to the user to enter the correct PIN to be sent in PlayDtmfAction, to be allowed to enter room 1024. Like I said, if the user dialed another SIP extension like 1000, then once the connection is made further dialer input will get successfully passed via PlayDtmfAction to that other SIP endpoint. As far as bridging the extension, I think that might not be done in the dialplan until the PIN is accepted. If I request channel info for the active call, the destination channel ID first is 1024@from-internal:1. In cases where the PIN gets accepted, the destination will be different when the channel info gets requested again (something like STARTMEETME/1024). Since I am hearing the announcement to request PIN, I think I should have a bridge in place but then why doesn't app_read.c collect the digits I enter? As far as OriginateToApplication, I understand it will not alter the dial plan. I just thought that since I specify meetme as an app there, then further calls to the channelID associated with this session may be able to direct things like DTMF to meetme. Just a guess though! Thanks again, Greg On Wed, Jun 5, 2013 at 3:25 PM, Yves A. <yv...@gm...> wrote: > Hi, > > now I am totally confused... I thought, your application has to play the > PIN DTMF... now you say, that the user still has to enter the pin... > So what is the problem to bridge the extension of your user with the > conference-room extension? After connecting the two partys you´re > done, the user hears the announcement and enters the pin...? If you can´t > go this way I think I still did not catch your real objective... > > OriginateToApplication will not alter any part of the dialplan... its just > a method to dial directly "into" asterisk apps... they do even not have > to occur anywhere in the dialplan... > > As I mentioned earlier, you can use the originate(originateAction) method > to jump to a certain priority in the dialplan... therefor you use > the method originateAction.setPriority(int priority)... > > If the things still do not work the way you need, I think we should chat > or phone... in that case eMail me directly and I´ll send you my > skype ID. > > have fun, > yves > > > |