[OpenSIPS-Users] Problem on handing prefixed contact number from Cisco GW
Bogdan-Andrei Iancu
bogdan at opensips.org
Thu Apr 7 18:40:59 CEST 2011
Hi Joel,
You cannot know what was the used prefix, but in your case (where you
want to strip the used prefix) it is simpler to store the username (from
RURI) before do_routing (into an AVP) and when rebuilding the contact,
just use the original username from AVP......so you do not care about
the prefix :).
Regards,
Bogdan
On 04/07/2011 12:55 PM, joel.oliveira wrote:
> Hello Bogdan,
>
> First of all, sorry for taking so long to answer you back but let me thank
> for your reply. That code that you replied on was commented out so I wasn't
> using it, but still your comments opened my eyes on how to access the $ct
> variable, maybe I was doing something wrong on that day but for some reason
> doing $avp(s:ct_gw) = $ct; wasn't working at all.
>
> Anyway it's now working as you can verify on http://pastebin.com/hdBsD0hH .
> :)
>
> Everything is working fine now and I'll continue to do my changes to the
> script so I can implement all the features that I need. Quick question
> though, on line 637 I have the m4 variable GW_PREFIX that has the prefix
> defined on the defines.m4 file; is it in anyway possible to access the
> prefix that is being used on that time by do_routing? As you may notice I am
> trying to access $avp(s:gw_attrs) pv but all I get is the value .
> According to the documentation on drouting's gw_attrs_avp (
> http://www.opensips.org/html/docs/modules/1.6.x/drouting.html#id293965 )
> I'll only get that value set when I use the use_next_gw() function but
> according to another Opensips user that I talked on #opensips, it's supposed
> to be set when doing do_routing() also. Am I missing something?
>
> Thanks for your time and best regards,
> Joel Oliveira
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Problem-on-handling-prefixed-contact-number-from-Cisco-GW-tp6230782p6249328.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"
More information about the Users
mailing list