Re: [asterisk-users] PARAMETERS FOR DID'S FROM TELCOM AND ASTERISK TO SYNC
On Tuesday 06 September 2011, mahesh katta wrote: Hi list, I have 20channels PRI line from Airtel. and I have 30channels digium PRI card. and I am using asterisk1.4 with goautodial. I need to configure DID's for every extension with sip. which Parameters need to add in asterisk and which parameters enable from Airtel PRI line for this DID's. can you help me . When an incoming call arrives from the ISDN line, look in ${EXTEN} -- this will contain some representation of the number. It may be missing the STD code, or just the initial 0. All* you need to do is implement a rule to translate the incoming ${EXTEN} on an incoming call, to an extension number, and implement this in your dialplan in the conjtext in which calls arrive from the PSTN. For example, if you always want the internal number to be 2 followed by the last 2 digits of the external number, you could use this minimal example: [from-pstn] exten = _X.,1,Set(LAST_TWO=${EXTEN:-2}) exten = _X.,n,Dial(SIP/2${LAST_TWO}) exten = _X.,n,Hangup() [*] OK, that's not *quite* all. When you make an outgoing call, you need to set the caller ID to match the external number the person needs to dial to call you back: [outgoing] exten = _X.,1,Set(LAST_TWO=${EXTEN:-2}) exten = _X.,n,Set(CALLERPRES()=allowed) exten = _X.,n,Set(CallerID(num)=${PREFIX}${LAST_TWO}) exten = _X.,n,Dial(${ISDN}/${EXTEN}) exten = _X.,n,Hangup() ${ISDN} and ${PREFIX} need to be defined in the globals section: [globals] ISDN=DAHDI/g1 PREFIX=013322689 ; this assumes numbers start (01332) 2689xx -- AJS Answers come *after* questions. -- _ -- 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
Re: [asterisk-users] PARAMETERS FOR DID'S FROM TELCOM AND ASTERISK TO SYNC
Thanks For reply A.J sir. no result with this sir Best Regards, Mahesh Katta *BUZZ**WORKS* Business Services Private Limited BANGALORE | CHENNAI | HYDERABAD | MUMBAI| DELHI 201, Crystal Tower, 75 Gundavali Cross Lane, Andheri Kurla Road, Andheri (E) Mumbai 400069 GSM +91.97029.70779 | Phone +91.22.4229.2634 | Fax +91.22.4229.2634 Web http://www.buzzworks.com On Tue, Sep 6, 2011 at 6:49 PM, A J Stiles asterisk_l...@earthshod.co.ukwrote: On Tuesday 06 September 2011, mahesh katta wrote: Hi list, I have 20channels PRI line from Airtel. and I have 30channels digium PRI card. and I am using asterisk1.4 with goautodial. I need to configure DID's for every extension with sip. which Parameters need to add in asterisk and which parameters enable from Airtel PRI line for this DID's. can you help me . When an incoming call arrives from the ISDN line, look in ${EXTEN} -- this will contain some representation of the number. It may be missing the STD code, or just the initial 0. All* you need to do is implement a rule to translate the incoming ${EXTEN} on an incoming call, to an extension number, and implement this in your dialplan in the conjtext in which calls arrive from the PSTN. For example, if you always want the internal number to be 2 followed by the last 2 digits of the external number, you could use this minimal example: [from-pstn] exten = _X.,1,Set(LAST_TWO=${EXTEN:-2}) exten = _X.,n,Dial(SIP/2${LAST_TWO}) exten = _X.,n,Hangup() [*] OK, that's not *quite* all. When you make an outgoing call, you need to set the caller ID to match the external number the person needs to dial to call you back: [outgoing] exten = _X.,1,Set(LAST_TWO=${EXTEN:-2}) exten = _X.,n,Set(CALLERPRES()=allowed) exten = _X.,n,Set(CallerID(num)=${PREFIX}${LAST_TWO}) exten = _X.,n,Dial(${ISDN}/${EXTEN}) exten = _X.,n,Hangup() ${ISDN} and ${PREFIX} need to be defined in the globals section: [globals] ISDN=DAHDI/g1 PREFIX=013322689 ; this assumes numbers start (01332) 2689xx -- AJS Answers come *after* questions. -- _ -- 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 -- _ -- 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
Re: [asterisk-users] PARAMETERS FOR DID'S FROM TELCOM AND ASTERISK TO SYNC
On Tuesday 06 September 2011, mahesh katta wrote: Thanks For reply A.J sir. no result with this sir OK. no result isn't very helpful. I'm presuming you've got internal calls between SIP extensions working correctly, and something happens (even if it's not exactly what you want) when you call an inbound number. If not, get at least this much working first. I'm also presuming that you know a few things about dialplans, and can make appropriate substitutions in your head. In your chan_dahdi.conf, what is the name of the context associated with the span to which the ISDN is connected? (I assumed in my example that the relevant context was called from-pstn.) Make a note of this. Now make a copy of your existing extensions.conf, then open the original in a text editor. In the context where calls from the ISDN line arrive, create the following extension: exten = .X_,1,NoOp(Incoming call for '${EXTEN} from ${CALLERID(num)}') exten = .X_,n,Hangup() Open an Asterisk console with maximum verbosity, run dialplan reload, call an inbound number from a mobile phone and you should get a message something like Incoming call for '01332268901' from '07892101232' with some or all of the number you dialled and your mobile number, just before the call disconnects. (If not, then something else is wrong.) Now you know how much of the dialled number the phone company are sending you (complete number / number without leading 0 / local number without STD code). Next, determine what the rule is going to be to link the dialled number in ${EXTEN} to an individual internal extension (in my example, I assumed that the rule was: 2 followed by the last 2 digits of the external number) and devise a dialplan expression that will set a variable to that. (If you don't know how to do this, please ask, giving some examples I can work from.) Now, between the NoOp() and the Hangup() lines in our minimal context as above, insert lines to set a variable from your expression and another NoOp() to display its value. Open an Asterisk console with maximum verbosity, run dialplan reload again to make sure you are using the correct dialplan, call an inbound number from a mobile phone, and this time you should get another message with the internal extension number you want to call. Check it with as many numbers as you can afford to waste credit on. When you're sure that you have your formula working, add a Dial() statement which will dial that number. If you want, remove the NoOp() statements; remember to make the statement which is now first, priority 1 instead of n. Again, run dialplan reload before you make an inbound call, just to ensure you are using the latest edited dialplan. That should sort the incoming side. On the outgoing side, you need to write a dialplan expression which will set CALLERID(num) to whatever external number is associated with an internal extension (which will be in ${CALLERID(num)} -- sorry, I made a mistake and put ${EXTEN} in my first example). basically the inverse of the first rule. Then put this into your context which is used for outgoing calls. If any of this is going over your head, please ask for clarification. (My preference is generally to overestimate someone's abilities and rely on them asking questions if lost, rather than sound like I am patronising them.) -- AJS Answers come *after* questions. -- _ -- 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