[sr-dev] git:master:1aa95fbc: Add Rx-Specific-Action AVPs to work with some PCRFs

Daniel-Constantin Mierla miconda at gmail.com
Mon Sep 14 22:33:19 CEST 2015


A quick reminder that the first line in the commit message must be
prefixed with the component that was changed.

The email notification for a commit is quite detailed, being custom
generated by a php script, but the 'git log' shows only:

```
commit 1aa95fbc87c6ec118d7675b5c9c0e01a61de091b
Author: Carsten Bock <carsten at ng-voice.com>
Date:   Mon Sep 14 21:46:28 2015 +0200

    Add Rx-Specific-Action AVPs to work with some PCRFs
```

And that is not suggestive enough for a changelog.

Cheers,
Daniel

On 14/09/15 21:48, Carsten Bock wrote:
> Module: kamailio
> Branch: master
> Commit: 1aa95fbc87c6ec118d7675b5c9c0e01a61de091b
> URL: https://github.com/kamailio/kamailio/commit/1aa95fbc87c6ec118d7675b5c9c0e01a61de091b
>
> Author: Carsten Bock <carsten at ng-voice.com>
> Committer: Carsten Bock <carsten at ng-voice.com>
> Date: 2015-09-14T21:48:06+02:00
>
> Add Rx-Specific-Action AVPs to work with some PCRFs
>
> ---
>
> Modified: modules/ims_qos/rx_aar.c
> Modified: modules/ims_qos/rx_avp.c
> Modified: modules/ims_qos/rx_avp.h
>
> ---
>
> Diff:  https://github.com/kamailio/kamailio/commit/1aa95fbc87c6ec118d7675b5c9c0e01a61de091b.diff
> Patch: https://github.com/kamailio/kamailio/commit/1aa95fbc87c6ec118d7675b5c9c0e01a61de091b.patch
>
> ---
>
> diff --git a/modules/ims_qos/rx_aar.c b/modules/ims_qos/rx_aar.c
> index 13d91ac..2840cb0 100644
> --- a/modules/ims_qos/rx_aar.c
> +++ b/modules/ims_qos/rx_aar.c
> @@ -796,6 +796,15 @@ int rx_send_aar(struct sip_msg *req, struct sip_msg *res,
>          goto error;
>      }
>      
> +    /* Add specific action AVP's */
> +    rx_add_specific_action_avp(aar, 1); // CHARGING_CORRELATION_EXCHANGE
> +    rx_add_specific_action_avp(aar, 2); // INDICATION_OF_LOSS_OF_BEARER
> +    rx_add_specific_action_avp(aar, 3); // INDICATION_RECOVERY_OF_BEARER
> +    rx_add_specific_action_avp(aar, 4); // INDICATION_RELEASE_OF_BEARER
> +    rx_add_specific_action_avp(aar, 5); // INDICATION_ESTABLISHMENT_OF_BEARER (now void)
> +    rx_add_specific_action_avp(aar, 6); // IP-CAN_CHANGE
> +    rx_add_specific_action_avp(aar, 12); // ACCESS_NETWORK_INFO_REPORT
> +
>      show_callsessiondata(p_session_data);
>      
>      LM_DBG("Unlocking AAA session...\n");
> @@ -886,6 +895,15 @@ int rx_send_aar_register(struct sip_msg *msg, AAASession* auth, saved_transactio
>      /* Add media component description avp for register*/
>      rx_add_media_component_description_avp_register(aar);
>  
> +    /* Add specific action AVP's */
> +    rx_add_specific_action_avp(aar, 1); // CHARGING_CORRELATION_EXCHANGE
> +    rx_add_specific_action_avp(aar, 2); // INDICATION_OF_LOSS_OF_BEARER
> +    rx_add_specific_action_avp(aar, 3); // INDICATION_RECOVERY_OF_BEARER
> +    rx_add_specific_action_avp(aar, 4); // INDICATION_RELEASE_OF_BEARER
> +    rx_add_specific_action_avp(aar, 5); // INDICATION_ESTABLISHMENT_OF_BEARER (now void)
> +    rx_add_specific_action_avp(aar, 6); // IP-CAN_CHANGE
> +    rx_add_specific_action_avp(aar, 12); // ACCESS_NETWORK_INFO_REPORT
> +
>      /* Add Framed IP address AVP*/
>      if (!rx_add_framed_ip_avp(&aar->avpList, ip, ip_version)) {
>          LM_ERR("Unable to add framed IP AVP\n");
> diff --git a/modules/ims_qos/rx_avp.c b/modules/ims_qos/rx_avp.c
> index a0a79f9..5f8cb5a 100644
> --- a/modules/ims_qos/rx_avp.c
> +++ b/modules/ims_qos/rx_avp.c
> @@ -900,3 +900,22 @@ inline int rx_get_result_code(AAAMessage *msg, unsigned int *data) {
>  }
>  
>  
> +/**
> + * Creates and adds an Acct-Application-Id AVP.
> + * @param msg - the Diameter message to add to.
> + * @param data - the value for the AVP payload
> + * @return CSCF_RETURN_TRUE on success or 0 on error
> + */
> +inline int rx_add_specific_action_avp(AAAMessage *msg, unsigned int data) {
> +    char x[4];
> +    set_4bytes(x, data);
> +
> +    return
> +    rx_add_avp(msg, x, 4,
> +            AVP_IMS_Specific_Action,
> +            AAA_AVP_FLAG_MANDATORY|AAA_AVP_FLAG_VENDOR_SPECIFIC,
> +            IMS_vendor_id_3GPP,
> +            AVP_DUPLICATE_DATA,
> +            __FUNCTION__);
> +}
> +
> diff --git a/modules/ims_qos/rx_avp.h b/modules/ims_qos/rx_avp.h
> index 85c5cb3..894a3fd 100644
> --- a/modules/ims_qos/rx_avp.h
> +++ b/modules/ims_qos/rx_avp.h
> @@ -93,5 +93,6 @@ AAA_AVP* rx_create_codec_data_avp(str *raw_sdp_stream, int number, int direction
>  inline int rx_get_result_code(AAAMessage *msg, unsigned int *data);
>  unsigned int rx_get_abort_cause(AAAMessage *msg);
>  
> +inline int rx_add_specific_action_avp(AAAMessage *msg, unsigned int data);
>  
>  #endif /*__PCC_AVP_H*/
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat




More information about the sr-dev mailing list