change incoming caller id

Discussion in 'General' started by bojan, Sep 13, 2009.

  1. bojan

    Joined:
    Jul 14, 2009
    Messages:
    5
    Likes Received:
    0
    hi

    my sip provider sending me caller id numbers with one leading zero to many
    eg for number 0123456789 caller id shows 00123456789 and when i try to make callback call failed because that one zero too many
    for dialing out i have direct dialing (without 9 or 0) and striping zero in dial out sequence is not a solution

    how to strip one leading zero for incoming caller id?
    i use elastix 1.5.2-23

    i try to use some tutorials from web like http://www.freepbx.org/support/document ... g-callerid
    but that dont work for me , or i writing it in wrong place

    please in which exact file i need to make modifications and what to add (and where)

    thnx

    bojan
     
  2. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    try the following

    in your trunk setup, replace context=from-trunk by context=from-my-stupid-provider

    in extensions_custom.conf add the following context

    [from-my-stupid-provider]
    exten => _X!,1,Set(CALLERID(num)=${CALLERID(num):1})
    exten => _X!,n,Goto(from-trunk,${EXTEN},1)


    save and reload.
     
  3. bojan

    Joined:
    Jul 14, 2009
    Messages:
    5
    Likes Received:
    0
    thank you for so quick reply

    your command is ok but have 1 type (or maybe 2)

    here {CALLERID(num):1}) is missing $ sign at start - should be ${CALLERID(num):1})

    and second one (im new to linux and asterisk) maybe is another mistake _X! i change it to _X.

    what is the difference between _X! abd _X. ?


    thank you

    bojan
     
  4. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
  5. bojan

    Joined:
    Jul 14, 2009
    Messages:
    5
    Likes Received:
    0
    you are so fast :)

    thank you again

    bojan
     

Share This Page