[asterisk-dev] LibPRI: How to add an IE to an outgoing call?

michael ricordeau michael.ricordeau at gmail.com
Sat Apr 18 08:20:05 CDT 2009


Hello,

if you want to send custom ie in an outgoing call, check :

int q931_setup(struct pri *pri, q931_call *c, struct pri_sr *req)

and static int setup_ies[]

in q931.c  .

To be set correctly you must declare your custom ie in

static struct ie ies[]    ( Array of struct ie  in q931.c )  :

your custom ie would be set like this :

{1, Q931_REVERSE_CHARGE_INDIC, "Reverse charge indicator",
dump__reverse_indicator, receive_reverse_indicator,
transmit_reverse_indicator },

(for descriptions of values, see struct ie  in q931.c)

and set functions :

static FUNC_DUMP(dump_reverse_indicator)

static FUNC_RECV(receive_reverse_indicator)

static FUNC_SEND(transmit_reverse_indicator)





On Fri, Apr 17, 2009 at 10:49 PM, Alexandre Cavalcante Alencar
<alexandre.alencar at gmail.com> wrote:
> Hi Guys,
>
> I am trying to enable chan_dahdi.c to selectively block ISDN reverse
> charging calls (collect calls). This kind of call get identified by
> the IE 74 (0x4A) when it arrives set with a new call.
>
> I made some code to identify it and block the call as needed, but I
> need to make collect calls (add IE 74 to outgoing calls) to test the
> code as I am using a loop between two spans to test it.
>
> The code I am trying to use for adding the IE 74 is here at
> pastebin.ca alongside with it's generated log of one call
>
> http://www.pastebin.ca/1395196
>
> If someone here knows LibPRI and ISDN and can help me get this
> working, I will appreciate. I don't have much experience with LibPRI
> and ISDN protocol internals, and I need this hack so I can test the
> code to block the collect calls, since I don't have a telco ISDN link
> available.
>
> A 'patch' to block all collect calls (not flexible)
> http://bugs.digium.com/view.php?id=13760
>
> References of people asking for this feature
> http://lists.digium.com/pipermail/asterisk-dev/2004-November/007500.html
> http://lists.digium.com/pipermail/asterisk-users/2005-July/109268.html
> http://lists.digium.com/pipermail/asterisk-users/2007-October/198692.html
>
> Regards,
>
> --
> Alexandre C Alencar (Skarmeth)
> http://blog.alexandrealencar.net/
> http://www.alexandrealencar.net/
> http://people.debian-ce.org/skarmeth/
>
> --
> Alexandre C Alencar (Skarmeth)
> http://blog.alexandrealencar.net/
> http://www.alexandrealencar.net/
> http://people.debian-ce.org/skarmeth/
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>



More information about the asterisk-dev mailing list