<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Moises Silva escreveu:
<blockquote
 cite="mid:c4d05cbe0909030813j56515ee8nc937f726a99d8991@mail.gmail.com"
 type="cite">
  <div class="gmail_quote">
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div bgcolor="#ffffff" text="#000000">
    <div>
    <div class="h5">Hi Moises,<br>
    <br>
    </div>
    </div>
The real messege with appear is:<br>
    <br>
"Cannot answer call if the call is not accepted first"<br>
    <br>
    <pre cols="72">-- 
Afonso Zimmermann
    </pre>
    </div>
  </blockquote>
  </div>
  <div><br>
  </div>
  <div>Afonso,</div>
  <div><br>
  </div>
  <div>Can you test the release-1 openr2 branch with the mfcr2-1.4
Asterisk branch? I commited the changes to openr2 branch. I however did
not make any changes to mfcr2-1.4 Asterisk branch because I think it
should work as it is. Let me know how the testing goes, I cannot make a
release with this code changes until you confirm it works.</div>
  <br>
-- <br>
Moises Silva<br>
Software Developer<br>
Sangoma Technologies Inc. | 50 McIntosh Drive, Suite 120, Markham ON
L3R 9T3 Canada<br>
t. 1 905 474 1990 x 128 | e. <a moz-do-not-send="true"
 href="mailto:moy@sangoma.com">moy@sangoma.com</a><br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
--Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a>--

asterisk-r2 mailing list
To UNSUBSCRIBE or update options visit:
   <a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-r2">http://lists.digium.com/mailman/listinfo/asterisk-r2</a></pre>
</blockquote>
Hi Moises,<br>
<br>
The variable is now passing. It works. But the identification of value
doesn't work. I tested in the following situations:<br>
<br>
PBX A: National Subscriber<br>
AST: National Subscriber<br>
<br>
[Sep  3 14:29:24] NOTICE[3480]: chan_dahdi.c:1103
dahdi_r2_on_call_offered: MFC/R2 call offered on chan 1. ANI = 9901,
DNIS = 9902, Category = National Subscriber<br>
    -- Executing [9902@disc-from-trunk-TR001:1] Set("DAHDI/1-1",
"GLOBAL(TRUNK)=TR004") in new stack<br>
  == Setting global variable 'TRUNK' to 'TR004'<br>
    -- Executing [9902@disc-from-trunk-TR001:2] Set("DAHDI/1-1",
"_MFCR2_CATEGORY=National Subscriber") in new stack<br>
    -- Executing [9902@disc-from-trunk-TR001:3] Set("DAHDI/1-1",
"FROM_DID=9902") in new stack<br>
                                                                     
                                 .<br>
                                                                     
                                 .<br>
                                                                     
                                 .<br>
   -- Executing [s@macro-disc-dialout-trunk:12] Dial("DAHDI/1-1",
"DAHDI/g2/9902|120|tTwW") in new stack<br>
[Sep  3 14:29:24] WARNING[3551]: chan_dahdi.c:990
dahdi_r2_get_channel_category: Invalid category specified 'National
Subscriber' for chan DAHDI/32-1, using default National Subscriber<br>
    -- Called g2/9902<br>
<br>
PBX A: National Subscriber<br>
AST: International Subscriber<br>
<br>
[Sep  3 14:38:45] NOTICE[3630]: chan_dahdi.c:1023
dahdi_r2_on_call_init: New MFC/R2 call detected on chan 1.<br>
[Sep  3 14:38:48] NOTICE[3630]: chan_dahdi.c:1103
dahdi_r2_on_call_offered: MFC/R2 call offered on chan 1. ANI = 9901,
DNIS = 9902, Category = National Subscriber<br>
    -- Executing [9902@disc-from-trunk-TR001:1] Set("DAHDI/1-1",
"GLOBAL(TRUNK)=TR004") in new stack<br>
  == Setting global variable 'TRUNK' to 'TR004'<br>
    -- Executing [9902@disc-from-trunk-TR001:2] Set("DAHDI/1-1",
"_MFCR2_CATEGORY=National Subscriber") in new stack<br>
                                                                     
                                 .<br>
                                                                     
                                 .<br>
                                                                     
                                 .<br>
    -- Executing [s@macro-disc-dialout-trunk:12] Dial("DAHDI/1-1",
"DAHDI/g2/9902|120|tTwW") in new stack<br>
[Sep  3 14:38:48] WARNING[3653]: chan_dahdi.c:990
dahdi_r2_get_channel_category: Invalid category specified 'National
Subscriber' for chan DAHDI/32-1, using default International Subscriber<br>
    -- Called g2/9902<br>
<br>
PBX A: Interational Subscriber<br>
AST: National Subscriber<br>
<br>
*CLI&gt; [Sep  3 14:57:02] NOTICE[3820]: chan_dahdi.c:1023
dahdi_r2_on_call_init: New MFC/R2 call detected on chan 1.<br>
[Sep  3 14:57:04] NOTICE[3820]: chan_dahdi.c:1103
dahdi_r2_on_call_offered: MFC/R2 call offered on chan 1. ANI = 9901,
DNIS = 9902, Category = International Subscriber<br>
    -- Executing [9902@disc-from-trunk-TR001:1] Set("DAHDI/1-1",
"GLOBAL(TRUNK)=TR004") in new stack<br>
  == Setting global variable 'TRUNK' to 'TR004'<br>
    -- Executing [9902@disc-from-trunk-TR001:2] Set("DAHDI/1-1",
"_MFCR2_CATEGORY=International Subscriber") in new stack<br>
                                                                     
                                 .<br>
                                                                     
                                 .<br>
                                                                     
                                 .<br>
    -- Executing [s@macro-disc-dialout-trunk:12] Dial("DAHDI/1-1",
"DAHDI/g2/9902|120|tTwW") in new stack<br>
[Sep  3 14:57:05] WARNING[3841]: chan_dahdi.c:990
dahdi_r2_get_channel_category: Invalid category specified
'International Subscriber' for chan DAHDI/32-1, using default National
Subscriber<br>
    -- Called g2/9902<br>
<br>
About this case, I have made other change in asterisk to not use global
variables:<br>
<br>
-                               pbx_builtin_setvar_helper(c,
"MFCR2_CATEGORY",
openr2_proto_get_category_string(p-&gt;mfcr2_recvd_category));<br>
+                               c-&gt;tech_pvt = p;<br>
<br>
-       const char *catstr = pbx_builtin_getvar_helper(c,
"MFCR2_CATEGORY");<br>
        struct dahdi_pvt *p = c-&gt;tech_pvt;<br>
+       const char *catstr =
openr2_proto_get_category_string(p-&gt;mfcr2_category);<br>
<br>
It works too. <br>
<pre class="moz-signature" cols="72">-- 
Afonso Zimmermann
</pre>
</body>
</html>