Results 1 to 4 of 4

Thread: CLIR support with Pika Digital (BRI line)

  1. #1
    mck Guest

    Default CLIR support with Pika Digital (BRI line)

    Hi Mark,
    I have a question about CLIR (Caller Line ID Restriction) support in chan_pika: this feature is supported?
    In the documentation I have no reference to calling presentation configuration, and I'm trying to configure a CLIR on an ISDN BRI for outbound calls but without success.


    Best regards,
    Matteo

  2. #2
    Join Date
    Jul 2008
    Posts
    268

    Default

    Unfortunately this functionality is not available through configuration in chan_pika but I believe it could be added with one simple addition to the code (highlighted with '// CLIR ADDITION' below). In the pika_call function in the file chan_pika.c:

    Code:
     
    ...
    default:
      //for CAS, ISDN types
      ast_copy_string(info.to, destp, sizeof(info.to));
      ast_copy_string(info.from, chan->cid.cid_num ? chan->cid.cid_num : "", sizeof(info.from));
      ast_copy_string(info.display, chan->cid.cid_name ? chan->cid.cid_name : "unknown", sizeof(info.display));
      info.callingNumberRestricted = PK_FALSE;
     
      info.protocol.BRI.callingNumber.presentationInd = PKX_ISDN_PRESENTATION_IND_RESTRICT; // CLIR ADDITION
     
      //test if the from number is valid for CAS - only numbers are allowed
      if (groupType == PKX_GROUP_TYPE_CAS) {
        if (!pika_check_from_number(info.from))
          ast_copy_string(info.from, "", sizeof(info.from));
      }
      settings.callAnalysis.enable = PK_FALSE;
    }
     
    if (groupType == PKX_GROUP_TYPE_PHONE) {
    ...
    Note: You will also notice the 'callingNumberRestricted' field just above the line addition which might seem useful for blocking the caller id. This field does not work for BRI so please avoid it.

  3. #3
    mck Guest

    Default

    Thank you Mark.
    So with this change I have the CLIR setted for all the outbound call?
    Can I use the SetCallerPres(...) function in Asterisk dialplan to dynamically change this setting?
    I'll try this addition to the code soon.

    Regars,
    Matteo

    Quote Originally Posted by mrecoskie View Post
    Unfortunately this functionality is not available through configuration in chan_pika but I believe it could be added with one simple addition to the code (highlighted with '// CLIR ADDITION' below). In the pika_call function in the file chan_pika.c:

    Code:
     
    ...
    default:
      //for CAS, ISDN types
      ast_copy_string(info.to, destp, sizeof(info.to));
      ast_copy_string(info.from, chan->cid.cid_num ? chan->cid.cid_num : "", sizeof(info.from));
      ast_copy_string(info.display, chan->cid.cid_name ? chan->cid.cid_name : "unknown", sizeof(info.display));
      info.callingNumberRestricted = PK_FALSE;
     
      info.protocol.BRI.callingNumber.presentationInd = PKX_ISDN_PRESENTATION_IND_RESTRICT; // CLIR ADDITION
     
      //test if the from number is valid for CAS - only numbers are allowed
      if (groupType == PKX_GROUP_TYPE_CAS) {
        if (!pika_check_from_number(info.from))
          ast_copy_string(info.from, "", sizeof(info.from));
      }
      settings.callAnalysis.enable = PK_FALSE;
    }
     
    if (groupType == PKX_GROUP_TYPE_PHONE) {
    ...
    Note: You will also notice the 'callingNumberRestricted' field just above the line addition which might seem useful for blocking the caller id. This field does not work for BRI so please avoid it.

  4. #4
    Join Date
    Jul 2008
    Posts
    268

    Default

    Yes - with this change CLIR should be set for all outbound calls. No, SetCallerPres () in the dialplan will not work.

    If you wanted an equivalent type of functionality one way would be to create your own Asterisk application - like PIKASetcallerPres - in chan_pika. An example of an application like this is PIKAFlash in chan_pika. This new application could then set this 'presentationInd' field dynamically.

    The only other alternative I can see is passing in a custom Dial string and then creating code in chan_pika to interpret this and set the presentation field accordingly for the call. Hopefully this all makes sense.

Posting Permissions

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