[asterisk-dev] Help doing one modification to libmfcr2.c of Unicall

Steve Underwood steveu at coppice.org
Sat Jul 7 21:01:10 CDT 2007


Hi Alvaro,

Alvaro Parres wrote:
> Hi list:
>
>    I want to modify the libmfcr2. But i can't find where is define the 
> end DNIS signal is define. Actually the libmfcr2 send a ONE (1) at the 
> end of sending all the DNIS numbers. I need to send a TWO (2), this 
> becouse in Mexico the normal is to send a 2 at the end, not a ONE.
>
>   In the next example i dialed
> un  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 Call
> control(1)
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 Make call
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 Making a
>
> new call with CRN 32770
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 0001  ->
>     [1/       1/Idle          /Idle         ]
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: Unicall/5 event Dialing
>
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <-
> 1101  [1/      40/Seize         /Idle         ]
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 3 on  ->
>     [2/      40/Group I       /Idle         ]
>
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> on  [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 3 off ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> off [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 6 on  ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> on  [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 6 off ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> off [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:17 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 3 on  ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> on  [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 3 off ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> off [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 2 on  ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> on  [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 2 off ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> off [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 7 on  ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> on  [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 7 off ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> off [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 5 on  ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> on  [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 5 off ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> off [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 3 on  ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> on  [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 3 off ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 1
> off [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:18 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 6 on  ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:20 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 3
> on  [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:20 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 6 off ->
>     [2/      40/Group I       /DNIS         ]
>
> Jun  6 19:12:20 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 3
> off [2/      40/Group I       /DNIS         ]
>
> *********** THIS ONE IS WHAT I MEEN *******************
>
> Jun  6 19:12:20 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 1 on  ->
>
>     [2/      40/Group I       /DNIS         ]
> Jun  6 19:12:20 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 4
> on  [2/      40/Group II      /Category     ]
> Jun  6 19:12:20 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5 1 off ->
>
>     [2/      40/Group II      /Category     ]
> Jun  6 19:12:20 WARNING[719] chan_unicall.c: MFC/R2 UniCall/5      <- 4
> off [2/      40/Group II      /Category     ]
It looks like you are trying to set the call category to 2. In Mexico 
this is normal set to 1, for an ordinary subscriber call. 2 makes the 
call a priority subscriber call. I am unclear whether the network 
actually treats a priority call any differently.

Don't change mfcr2.c. Change chan_unicall.c. The categoey is fixed in 
there, because * has no concept of call categories, and cannot control 
them. Look for the line

    uc_callparm_calling_party_category(callparms, 
UC_CALLER_CATEGORY_NATIONAL_SUBSCRIBER_CALL);

and change the category type to 
UC_CALLER_CATEGORY_NATIONAL_PRIORITY_SUBSCRIBER_CALL

Steve




More information about the asterisk-dev mailing list