how to add a trunk

Discussion in 'General' started by soulofmischief87, Dec 12, 2008.

  1. soulofmischief87

    Joined:
    Apr 30, 2008
    Messages:
    42
    Likes Received:
    0
    how would i add a trunk to a2billing i know how to do it from the webadmin page but it doesnt ask for any trunk info aside from name, do i have to add it to sip.conf if its a sip trunk?
     
  2. driftpbx

    Joined:
    Dec 7, 2008
    Messages:
    5
    Likes Received:
    0
    Hi soulofmischief87,

    please be more specific with your question.



    Drift
     
  3. soulofmischief87

    Joined:
    Apr 30, 2008
    Messages:
    42
    Likes Received:
    0
    Ohh thank you i found out that where it ask for ip i should put the trunk name thank you
     
  4. jessie

    Joined:
    Sep 17, 2008
    Messages:
    124
    Likes Received:
    0
    I've been looking around any answer about this thread as I'm in the same problem. How to setup a SIP trunk with usename, password and the domain IP? I was browsing the Trunk parameters in the A2billing but there is no paramter option to put the SIP trunk detail. Could anyone help please...
     
  5. jessie

    Joined:
    Sep 17, 2008
    Messages:
    124
    Likes Received:
    0
    No one? Doing Trunk configuration in Elastix is easy but in A2billing is not. In Elastix, you just need the IP, Username and Password information and you're good to go. Why is it in A2Billing don't have that parameters to fill in?
     
  6. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    The trunk configuration must be done on Elastix, under a2billing the only thing that you need to do is to choose the technology (SIP, IAX2), and the name of the trunk (same name that is defined on Elastix trunk configuration interface)
     
  7. jessie

    Joined:
    Sep 17, 2008
    Messages:
    124
    Likes Received:
    0
    Thank you very much jgutierrez. How about on the DDI or DID? Because I tried to put one DID number and I was expecting to hear "please enter your PIN code and telephone number you want to reach" (sort of). How to set this up?
     
  8. jessie

    Joined:
    Sep 17, 2008
    Messages:
    124
    Likes Received:
    0
    Thank you very much jgutierrez. How about on the DDI or DID? Because I tried to put one DID number and I was expecting to hear "please enter your PIN code and telephone number you want to reach" (sort of). How to set this up?
     
  9. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    hello,
    Explain me more about your question I don't understand. Where are you doing that? Under what option of a2billing?

    Or do you want to set a DID to your sip/iax2 friends? So when some one calls into that DID, it will ring into your sip/iax2 friend??
     
  10. jessie

    Joined:
    Sep 17, 2008
    Messages:
    124
    Likes Received:
    0
    Hello,

    Here is what I am trying to achieve. I have this DID sip number 9123456. I configure this DID number 9123456 in the Inbound Routes and ring to a sip extension-200. Now, I want this DID number to configure with a2billing and used as pilot number in order to distribute a prepaid cards in such a way that if someone call to the DID number "9123456" it will be ring to the destination prepaid announcement like "please enter you card number and the telephone number you want to reach". This is typical application of prepaid call card. So where should I start on this scenario?
     
  11. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    Ok,
    I will recommend you to download and install customcontexts-0.3.4.tgz, you may get it from:
    http://www.freepbx.org/support/document ... omcontexts

    1. Create a custom context, lets say "ea2billing" (using the module that you have installed from unembedded freepbx)
    2. Leave all the options as they are (don't edit anything, leave it as it is)
    3. Once you have save it, edit /etc/asterisk/extensions_custom.conf
    4. Create context ea2billing-custom
    5. Inside of it include the context that you have setup for using a2billing
    6. On the Elastix's web interface go to inbound routes, set the correspondiong DID and choose the option for your custom context
     
  12. jessie

    Joined:
    Sep 17, 2008
    Messages:
    124
    Likes Received:
    0
    Hello jgutierrez,

    Thank you very much for the respond. Although I figured it out already and have it working, still I really appreciate your time. Right now I made it working (just exactly the same process in your recommendation).

    Even it is working well though, I have this another issue that until now I can't make it work, that is when I used the "card number" in calling a certain number, I don't hear the balance announcement. I am expecting to hear the "your balance is $??(amount)" before dialing the destination number. I have this parameters below from a2billing.conf:

    [agi-conf1]


    ; Manage the answer on the call
    answer_call = NO

    ; Play audio - this will disable all stream file but not the Get Data
    ; for wholesale ensure that the authentication works and than number_try = 1
    play_audio = NO
    i
    ; play the goodbye message when the user has finished.
    say_goodbye = NO

    ; if user doesn't have enough credit to call a destination, prompt him to enter another cardnumber
    notenoughcredit_cardnumber = YES

    ; if notenoughcredit_cardnumber = YES then assign the CallerID to the new cardnumber
    notenoughcredit_assign_newcardnumber_cid = YES


    ; if YES it will use the DNID and try to dial out, without asking for the phonenumber to call
    ; value : YES, NO
    use_dnid = NO

    ; list the dnid on which you want to avoid the use of the previous option "use_dnid"
    no_auth_dnid = 2400,2300

    ; number of times the user can dial different number
    number_try = 3

    ; this will force to select a specific call plan by the Rate Engine
    force_callplan_id =
    ; Play the balance to the user after the authentication (values : yes - no)
    say_balance_after_auth = YES


    ; Play the balance to the user after the call (values : yes - no)
    say_balance_after_call = YES

    ; Play the initial cost of the route (values : yes - no)
    say_rateinitial = NO

    ; Play the amount of time that the user can call (values : yes - no)
    say_timetocall = YES


    ; enable the setup of the callerID number before the outbound is made, by default the user callerID value will be use
    auto_setcallerid = YES

    ; If auto_setcallerid is enabled, the value of force_callerid will be set as CallerID
    force_callerid =

    ; If force_callerid is not set, then the following option ensures that CID is set to one of the card's configured caller IDs or blank if none available.
    ; NO - disable this feature, caller ID can be anything.
    ; CID - Caller ID must be one of the customers caller IDs
    ; DID - Caller ID must be one of the customers DID nos.
    ; BOTH - Caller ID must be one of the above two items.
    cid_sanitize = NO


    ; enable the callerid authentication
    ; if this option is active the CC system will check the CID of caller
    cid_enable = YES

    ; if the CID does not exist, then the caller will be prompt to enter his cardnumber
    cid_askpincode_ifnot_callerid = YES

    ; if the callerID authentication is enable and the authentication fails then the user will be prompt to enter his cardnumber
    ; this option will bound the cardnumber entered to the current callerID so that next call will be directly authenticate
    cid_auto_assign_card_to_cid = NO

    ; if the callerID is captured on a2billing, this option will create automatically a new card and add the callerID to it
    cid_auto_create_card = NO

    ; set the length of the card that will be auto create (ie, 10)
    cid_auto_create_card_len = 10

    ; If cid_auto_create_card has been set to YES, the following options will define with which configuration we will create the card
    ;
    ; billing type of the new card
    ; ( value : POSTPAY or PREPAY)
    cid_auto_create_card_typepaid = PREPAY


    This are just some line in the configuration.


    Regards,

    Jessie
     
  13. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    quick question, on your a2billing context, what is the parameter that you are sending?
    DeadAGI(a2billing.php),DeadAGI(a2billing.php|1), DeadAGI(a2billing.php|2) ?

    Paste info from the the CLI when you use a2biling, from what I can see, it should give you the balance... I'm thinking that maybe there are audio files missing (numbers), that is why you don't get the balance...
     
  14. jessie

    Joined:
    Sep 17, 2008
    Messages:
    124
    Likes Received:
    0
    Hello,

    Hence I am using agi-conf1 in a2billing.conf, this is my parameters in extensions_a2billing.conf:

    [custom-a2billing-did]
    exten => 6741234,1,deadAGI(a2billing.php|1|did)
    exten => 6741234,2,Hangup


    And this is my a2billing.conf:

    [agi-conf1]

    ; the debug level
    ; 0=none, 1=low, 2=normal, 3=all
    debug = 1

    ; Asterisk Version Information
    ; 1_1,1_2,1_4 By Default it will take 1_2 or higher
    asterisk_version = 1_2

    ; Manage the answer on the call
    answer_call = NO

    ; Play audio - this will disable all stream file but not the Get Data
    ; for wholesale ensure that the authentication works and than number_try = 1
    play_audio = NO
    i
    ; play the goodbye message when the user has finished.
    say_goodbye = NO

    ; play the goodbye message when the user has finished.
    say_goodbye = NO

    ; enable the menu to choose the language
    ; press 1 for English, pulsa 2 para el espa
     
  15. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    It seems to me that it is correct... You haven't posted the CLI output when it is supposed to give you the balance, I would like to see that... I would like to see if it isn't telling the balance, because it doesn't find the number sound file.

    Also try setting the balance variables to yes and not to YES, maybe that is the trouble, once you save the file.
     
  16. jessie

    Joined:
    Sep 17, 2008
    Messages:
    124
    Likes Received:
    0
    Hi jgutierrez,

    You were right, it's all about the variables "yes". I didn't change much on the default value "YES" and that makes things not working. Now everything is on right function and I'm successfully getting the balance announcement.

    Thank you very much again with your time and support, appreciate it. Now I can share this experience from you to anyone here.


    Regards,

    Jessie
     
  17. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    Excellent! good news B)
     

Share This Page