[OpenSIPS-Users] 2 dialplan issues: simple strip\prefix cases and execution with drouting use_next_gw function

Ricardo Martins rpoppi77 at gmail.com
Fri Jul 24 02:16:01 CEST 2009


Nice Bogdan! I could prefix and strip perfectly with dialplan module. I 
just had to use a trick setting a flag to make the script knows when 
dialplan was already executed in case of retransmissions to the same 
gateway (like another INVITE as a response to 407, for example). When 
the script happens to use next_gw, I reset the flag and let dialplan 
works again to the next gateway. That's beautifull!

Thank you very much again.

Rgrds, Ricardo.


Bogdan-Andrei Iancu escreveu:
> Hi Ricardo,
>
> for stripping some digits, try something like:
>
> match: ^55+
> subst: ^(55)(.+)
> repl: \2
>
> This will strip the 55 prefix from the number....
>
> For item 2) - take care as the do_routing() function is computing all 
> the next branches in advances, based on the current URI...The 
> use_next_gw() function will just upload the precomputed RURIs in the 
> new branch.
>
> If you want some per branch changes via dialplan, do it after the 
> do_routing() and use_next_gw() functions..
>
> Regards,
> Bogdan
>
>
> Ricardo Martins wrote:
>> Hi all! I've been working a quite time with dialplan module and need 
>> some orientation from more experienced users. On one case, I need to 
>> strip some digits depending on the dial prefix and on the other case 
>> I need to subst some digits with 0 or 00.
>>
>> I could make the subst case to work, replacing the starting 55 with 
>> 0, using the following rule:
>> match: ^55+
>> subst: ^(55)(.+)
>> repl: 0\2
>>
>> But,
>>
>> 1) I could not make the simple strip or prefix case do work. How can 
>> I simply strip or add more digits (without replacing anything) from 
>> uri using dialplan module? I need to do this using dialplan module 
>> because it's necessary for my design to diferenciate dialplan IDs 
>> (depending on the provider) and to strip digits based on called 
>> prefix (diferenciating number of strip digits for long distance and 
>> local calls, for example).
>>
>> 2) I had problems using dialplan combined with use_next_gw function 
>> from drouting module. When a new gateway is used, the digits inserted 
>> by dialplan are not reseted. I tryied using revert_uri function 
>> before calling use_next_gw function but had no effect. Do anybody has 
>> some cases using dialplan and use_next_gw togheter?
>>
>> Regards!
>>
>> Ricardo.
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>   
>
>




More information about the Users mailing list