Results 1 to 9 of 9

Thread: alert info synthax for grandstream

  1. #1
    whitewater Guest

    Default alert info synthax for grandstream

    Hello,

    I would like use the info_alert option available in different menus for Grandstream phones.

    Currently, the pika sending this line during a call:
    Executing [123456789 @ from-pstn: 5] Set ("PIKA/digital/3", "__ALERT_INFO = external")

    found in the configuration extensions_additional.conf:
    exten => _123456789, n, Set (__ALERT_INFO = external)

    if I change manually for Grandstream :
    exten => _123456789, n, SIPAddHeader (Alert-Info: <http://127.0.0.1> \; info = external)

    it works.

    Of course, the change is lost when I reload asterisk by the interface Pika.

    Question:
    What should I change for good in the syntax file for all the different options alert_info menu ?

    thank you.

  2. #2
    Join Date
    Jul 2008
    Posts
    268

    Default

    Yes, extension_additional.conf is re-generated each time FreePBX is changed. Your modification needs to be placed in extension_custom.conf to become protected.
    Look for an included 'xxxxxxx-custom' context inside the context you are interested in (usually at the top) and use this in the extension_custom.conf file to insert your changes. The file extension_custom.conf will not be over-written.
    In general, all dialplan modifications you make should be in 'custom' contexts in a FreePBX environment on Warp.
    Last edited by mrecoskie; 04-07-11 at 03:18 PM. Reason: correction

  3. #3
    whitewater Guest

    Default

    hi, sorry for the delay.
    I saw your answer, but I do not have time right now to look.

    I am testing as soon as I can.
    thank you

  4. #4
    whitewater Guest

    Default

    hi,
    i think i had understand what you mean. here context i'm interested in extensions_additional.conf :
    [ext-did-0002]

    so, i write extension_custom.conf :
    [ext-did-0002]
    exten => _123456789, n, SIPAddHeader (Alert-Info: <http://127.0.0.1> \; info = external)


    whitout restart pika or asterisk.
    i had make a extensions reload in asterisk CLI.

    but it don't work :-(

    it don't work with [ext-did-0002-custom] too.

    what i forgot ? thank you.

  5. #5
    Join Date
    Jul 2008
    Posts
    268

    Default

    In 'extensions_additional.conf' you will notice this line.
    include => ext-did-0002-custom

    This is a hook for any customizations. To use it simply add the something like the following lines to 'extension_custom.conf':

    [ext-did-0002-custom]
    exten => my custom dialplan ...
    exten => _123456789, n, SIPAddHeader (Alert-Info: <http://127.0.0.1> \; info = external)
    ...

  6. #6
    whitewater Guest

    Default

    Hi, sorry again for my delay.

    here another tests :

    Code:
    extensions_additional.conf
    exten => _123456789,n,Set (__ALERT_INFO = external)
    exten => _123456789,n,SIPAddHeader (Alert-Info: <http://127.0.0.1> \; info = external)
    exten => _123456789,n(dest-ext),Goto(from-did-direct,157,1)
    ==> it's ok

    only
    Code:
    exten => _123456789,n,SIPAddHeader (Alert-Info: <http://127.0.0.1> \; info = external)
    ==> it's don't work.

    Code:
    exten => _123456789,n,Set (__ALERT_INFO = external)
    exten => _123456789,n(dest-ext),Goto(from-did-direct,157,1)
    exten => _123456789,n,SIPAddHeader (Alert-Info: <http://127.0.0.1> \; info = external)
    ==> it's don't work.

    so, here what i try :
    extensions_additional.conf, generated by freepbx gui have those line :
    Code:
    exten => _123456789, n, Set (__ALERT_INFO = external)
    extension_custom.conf :

    Code:
    [ext-did-0002-custom]
    exten => _123456789,n,SIPAddHeader (Alert-Info: <http://127.0.0.1> \; info = external)
    ==> it's don't work.

    Code:
    [ext-did-0002-custom]
    exten => _123456789,1,Set(__FROM_DID=${EXTEN})
    exten => _123456789,n,SIPAddHeader (Alert-Info: <http://127.0.0.1> \; info = external)
    ==> it's don't work.

    i would like to find by myself but... i don't know what is correct synthax.

    what's wrong ?
    or,it would be possible to modify the script that generates the extensions.conf file so have the correct syntax in extensions_additional.conf ?

    thank you

  7. #7
    whitewater Guest

    Default

    hum... someone should give me correct synthax ?
    thank you

  8. #8
    awayte Guest

    Default Alert Info Syntax For Calls To SIP Phone from Trunk

    Hi,

    I believe the reason this is not working is because you are dabbling with the wrong context. Because this is a call from an external trunk the first context it enters is [from-trunk]. We will need to add 'from-pstn-custom' handling in order to achieve the intended behavior.

    Simply add the following contexts to /etc/asterisk/extensions_custom.conf

    [from-external]
    include => ext-did
    include => ext-did-post-custom
    include => from-did-direct
    include => ext-did-catchall

    [from-pstn-custom]
    exten => _.,n,SIPAddHeader(Alert-Info: <http://127.0.0.1> \; info = external)
    exten => _.,n,Goto(from-external,${EXTEN},1)

    This will add an Alert Info header to the Invite sent to the called SIP phone as follows:

    Alert-Info: <http://127.0.0.1> ; info = external
    Last edited by awayte; 05-09-11 at 03:45 PM.

  9. #9
    whitewater Guest

    Default

    greats, thank you very much, it's work :-)

    thank you for this synthax. i notice the correct is :
    Code:
    exten => _.,n,SIPAddHeader(Alert-Info: <http://127.0.0.1>\;info=external)
    without space. otherwise, it dosen't work.

    I had a little problem with this modification. I have not managed to reproduce it several times.

    * calling from the outside : the person hang up before I pick up the phone.
    the phone keeps ringing. if I pick up, I have nothing.

    * calling from the outside: I pick up, waiting for discussion, I hangs up.
    ok.

    * calling from the outside: I pick up the phone, chat, the person hangs up :
    ok.

    I remade an extensions reload, I have not had the problem.

    quick question:
    if I add a SIP or IAX trunk, what should I add to use the alert information in the same way?
    thank you again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •