Hi Alexandre,<div><br></div><div>I have a ISDN PRI linked to a telco (GVT) here in Brazil and will be glad to help you test this scenario.</div><div><br></div><div><br clear="all">Guilherme Loch Góes<br><br>Notícias e Fórum sobre VoIP com software livre: <a href="http://www.voipexperts.com.br">http://www.voipexperts.com.br</a><br>
<br><br><div class="gmail_quote">On Sat, Apr 18, 2009 at 11:12 AM, Alexandre Cavalcante Alencar <span dir="ltr"><<a href="mailto:alexandre.alencar@gmail.com">alexandre.alencar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Michel,<br>
<div class="im"><br>
On Sat, Apr 18, 2009 at 10:20 AM, michael ricordeau<br>
<<a href="mailto:michael.ricordeau@gmail.com">michael.ricordeau@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> if you want to send custom ie in an outgoing call, check :<br>
><br>
> int q931_setup(struct pri *pri, q931_call *c, struct pri_sr *req)<br>
><br>
> and static int setup_ies[]<br>
><br>
> in q931.c .<br>
><br>
<br>
</div>I added the reverse charging indication IE to setup_ies[] struct<br>
<div class="im"><br>
> To be set correctly you must declare your custom ie in<br>
><br>
> static struct ie ies[] ( Array of struct ie in q931.c ) :<br>
><br>
> your custom ie would be set like this :<br>
><br>
> {1, Q931_REVERSE_CHARGE_INDIC, "Reverse charge indicator",<br>
> dump__reverse_indicator, receive_reverse_indicator,<br>
> transmit_reverse_indicator },<br>
><br>
<br>
</div>I just added the functions for dump, receive and transmit<br>
(dump_reverse_charge_indic, receive_reverse_charge_indic,<br>
transmit_reverse_charge_indic) to existing declaration.<br>
<div class="im"><br>
> (for descriptions of values, see struct ie in q931.c)<br>
><br>
> and set functions :<br>
><br>
> static FUNC_DUMP(dump_reverse_indicator)<br>
><br>
<br>
</div>done<br>
<div class="im"><br>
> static FUNC_RECV(receive_reverse_indicator)<br>
><br>
<br>
</div>done<br>
<div class="im"><br>
> static FUNC_SEND(transmit_reverse_indicator)<br>
><br>
<br>
</div>done<br>
><br>
><br>
<br>
But I still with problems with this... here is the code I canged from<br>
libpri 1.4.9<br>
<br>
<a href="http://201.57.179.27/~alexandre.alencar/q931.c" target="_blank">http://201.57.179.27/~alexandre.alencar/q931.c</a><br>
<a href="http://201.57.179.27/~alexandre.alencar/pri_q931.h" target="_blank">http://201.57.179.27/~alexandre.alencar/pri_q931.h</a><br>
<a href="http://201.57.179.27/~alexandre.alencar/pri_internal.h" target="_blank">http://201.57.179.27/~alexandre.alencar/pri_internal.h</a><br>
<a href="http://201.57.179.27/~alexandre.alencar/libpri.h" target="_blank">http://201.57.179.27/~alexandre.alencar/libpri.h</a><br>
<br>
If you can take a look and give me some light what I am missing... I<br>
will appreciate.<br>
<div><div></div><div class="h5"><br>
><br>
> On Fri, Apr 17, 2009 at 10:49 PM, Alexandre Cavalcante Alencar<br>
> <<a href="mailto:alexandre.alencar@gmail.com">alexandre.alencar@gmail.com</a>> wrote:<br>
>> Hi Guys,<br>
>><br>
>> I am trying to enable chan_dahdi.c to selectively block ISDN reverse<br>
>> charging calls (collect calls). This kind of call get identified by<br>
>> the IE 74 (0x4A) when it arrives set with a new call.<br>
>><br>
>> I made some code to identify it and block the call as needed, but I<br>
>> need to make collect calls (add IE 74 to outgoing calls) to test the<br>
>> code as I am using a loop between two spans to test it.<br>
>><br>
>> The code I am trying to use for adding the IE 74 is here at<br>
>> <a href="http://pastebin.ca" target="_blank">pastebin.ca</a> alongside with it's generated log of one call<br>
>><br>
>> <a href="http://www.pastebin.ca/1395196" target="_blank">http://www.pastebin.ca/1395196</a><br>
>><br>
>> If someone here knows LibPRI and ISDN and can help me get this<br>
>> working, I will appreciate. I don't have much experience with LibPRI<br>
>> and ISDN protocol internals, and I need this hack so I can test the<br>
>> code to block the collect calls, since I don't have a telco ISDN link<br>
>> available.<br>
>><br>
>> A 'patch' to block all collect calls (not flexible)<br>
>> <a href="http://bugs.digium.com/view.php?id=13760" target="_blank">http://bugs.digium.com/view.php?id=13760</a><br>
>><br>
>> References of people asking for this feature<br>
>> <a href="http://lists.digium.com/pipermail/asterisk-dev/2004-November/007500.html" target="_blank">http://lists.digium.com/pipermail/asterisk-dev/2004-November/007500.html</a><br>
>> <a href="http://lists.digium.com/pipermail/asterisk-users/2005-July/109268.html" target="_blank">http://lists.digium.com/pipermail/asterisk-users/2005-July/109268.html</a><br>
>> <a href="http://lists.digium.com/pipermail/asterisk-users/2007-October/198692.html" target="_blank">http://lists.digium.com/pipermail/asterisk-users/2007-October/198692.html</a><br>
>><br>
>> Regards,<br>
>><br>
>> --<br>
>> Alexandre C Alencar (Skarmeth)<br>
>> <a href="http://blog.alexandrealencar.net/" target="_blank">http://blog.alexandrealencar.net/</a><br>
>> <a href="http://www.alexandrealencar.net/" target="_blank">http://www.alexandrealencar.net/</a><br>
>> <a href="http://people.debian-ce.org/skarmeth/" target="_blank">http://people.debian-ce.org/skarmeth/</a><br>
>><br>
>> --<br>
>> Alexandre C Alencar (Skarmeth)<br>
>> <a href="http://blog.alexandrealencar.net/" target="_blank">http://blog.alexandrealencar.net/</a><br>
>> <a href="http://www.alexandrealencar.net/" target="_blank">http://www.alexandrealencar.net/</a><br>
>> <a href="http://people.debian-ce.org/skarmeth/" target="_blank">http://people.debian-ce.org/skarmeth/</a><br>
>><br>
>> _______________________________________________<br>
>> --Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
>><br>
>> asterisk-dev mailing list<br>
>> To UNSUBSCRIBE or update options visit:<br>
>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
>><br>
><br>
> _______________________________________________<br>
> --Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
><br>
> asterisk-dev mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Alexandre C Alencar (Skarmeth)<br>
<a href="http://blog.alexandrealencar.net/" target="_blank">http://blog.alexandrealencar.net/</a><br>
<a href="http://www.alexandrealencar.net/" target="_blank">http://www.alexandrealencar.net/</a><br>
<a href="http://people.debian-ce.org/skarmeth/" target="_blank">http://people.debian-ce.org/skarmeth/</a><br>
<br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
</div></div></blockquote></div><br></div>