Hey Greg, The regex doesn't seem to work for me. Any ideas ?
Regards, Sam -----Original Message----- From: Greg Fausak [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 31, 2007 11:42 AM To: Sam Lee Cc: Bogdan-Andrei Iancu; [email protected] Subject: Re: [Users] Hijack 'Move Temporarily' On Jan 30, 2007, at 8:34 PM, Sam Lee wrote: > Hey guys, > > I'm not a particular big fan of regular expressions.. But need to use > it now. > > If I have a string eg <abcde> fghij > /.*<(.*)>.*/\1/ I can never remember the variants. Sometimes you need to escape the parens, like: /.*<\(.*\)>.*/\1/ Sometimes you use $1 instead of \1, like: /.*<(.*)>.*/$1/ -g > How / what is the regex to extract strings within the bracket > (everything else not needed). I just need to extract stuff from within > the brackets. > > Thanks a million ! > > Regards, > Sam > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Sam Lee > Sent: Wednesday, January 31, 2007 9:36 AM > To: Bogdan-Andrei Iancu > Cc: [email protected] > Subject: RE: [Users] Hijack 'Move Temporarily' > > The difficulty is that , the gateway only can make use of the FROM > header for outgoing caller id presentation. > It can't make use of the Diversion header , so I got no choice but to > stick with it. > > Currently making use of AVPOPS to extract the diversion header inside > INVITE and pushing it to the FROM header via UAC_REPLACE_FROM () > > Regards, > Sam > > -----Original Message----- > From: Bogdan-Andrei Iancu [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 31, 2007 2:10 AM > To: Sam Lee > Cc: [email protected] > Subject: Re: [Users] Hijack 'Move Temporarily' > > Sam, > > if your GW does accept the diversion header, why don't you use this > mechanism instead of using FROM hdr (which highly difficult to > change). > > So, my advice is to first understand how the Diversion stuff works in > SIP and then take a look at diversion module: > http://www.openser.org/docs/modules/1.2.x/diversion.html > > regards, > bogdan > > Sam Lee wrote: > >> OR >> >> Any method to replace FROM header with Diversion header ? >> >> -----Original Message----- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On >> Behalf Of Sam Lee >> Sent: Tuesday, January 30, 2007 3:28 PM >> To: Bogdan-Andrei Iancu >> Cc: [email protected] >> Subject: RE: [Users] Hijack 'Move Temporarily' >> >> Hey guys, >> >> Yes , back to this. >> Are there any methods of manipulating the FROM header when in Failure >> routes ? >> >> Rgds, >> Sam >> >> -----Original Message----- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On >> Behalf Of Sam Lee >> Sent: Tuesday, January 30, 2007 12:20 PM >> To: Bogdan-Andrei Iancu >> Cc: [email protected] >> Subject: RE: [Users] Hijack 'Move Temporarily' >> >> Hey guys, >> >> I've managed a workaround by using the diversion header. >> I inserted a diversion header and my PSTN gateway shows the >> subscriber number in the original called party number. >> >> BTW , anyone of you have any experiences with using openser to call >> forward (server-side call forward) ? >> How do u generate call forwarding via openser ? >> >> Regards, >> Sam >> >> -----Original Message----- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On >> Behalf Of Sam Lee >> Sent: Tuesday, January 30, 2007 9:39 AM >> To: Bogdan-Andrei Iancu >> Cc: [email protected] >> Subject: RE: [Users] Hijack 'Move Temporarily' >> >> Hi Bogdan, >> >> I don't think that's possible. >> Can I just manipulate the FROM header inside openser ? >> >> Regards, >> Sam >> >> -----Original Message----- >> From: Bogdan-Andrei Iancu [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, January 30, 2007 12:37 AM >> To: Sam Lee >> Cc: [email protected] >> Subject: Re: [Users] Hijack 'Move Temporarily' >> >> Sam, >> >> is your GW able to use for calling party something else than From >> hdr? >> maybe RPID or PAI hdrs? or a custom hdr? >> >> regards, >> bogdan >> >> Sam Lee wrote: >> >> >> >>> Hey guys, >>> >>> Any help? >>> >>> Sam >>> >>> -----Original Message----- >>> From: [EMAIL PROTECTED] [mailto:users- [EMAIL PROTECTED] >>> On Behalf Of Sam Lee >>> Sent: Monday, January 29, 2007 5:20 PM >>> To: Howard Tang >>> Cc: [email protected] >>> Subject: RE: [Users] Hijack 'Move Temporarily' >>> >>> Sad thing is , I do the billing via the PSTN gateway. >>> So I definitely have to make the subscriber show up on the >>> callingpartynumber. >>> Any way of manipulating the calling party number ? >>> >>> -----Original Message----- >>> From: Howard Tang [mailto:[EMAIL PROTECTED] >>> Sent: Monday, January 29, 2007 5:16 PM >>> To: Sam Lee >>> Cc: Atle Samuelsen; [email protected] >>> Subject: Re: [Users] Hijack 'Move Temporarily' >>> >>> Hi Sam >>> >>> I have similar setup , you need muilt call leg accounting in order >>> to do proper billing. >>> >>> Regards, >>> Howard >>> >>> >>> On 1/29/07, Sam Lee <[EMAIL PROTECTED]> wrote: >>> >>> >>> >>> >>>> Hey Guys, >>>> >>>> Will I be able to manipulate the FROM header inside the failure >>>> route >>>> >>>> >>>> >>>> >>> ? >>> >>> >>> >>> >>>> I tried to use UAC_replace_from() but seems like there's an error. >>>> >>>> Yes, the call forwarding is causing problem. Now it appears as >>>> though > >>>> the initial caller (PSTN) called the final called party (PSTN) and >>>> I can't bill the subscriber ! >>>> >>>> Regards, >>>> Sam >>>> >>>> -----Original Message----- >>>> From: Atle Samuelsen [mailto:[EMAIL PROTECTED] >>>> Sent: Monday, January 29, 2007 3:00 PM >>>> To: Sam Lee >>>> Cc: Carsten Bock; [email protected] >>>> Subject: Re: [Users] Hijack 'Move Temporarily' >>>> >>>> Did you do a append_branch(); >>>> >>>> -atle >>>> >>>> * Sam Lee <[EMAIL PROTECTED]> [070129 04:57]: >>>> >>>> >>>> >>>> >>>>> Hey Carsten, >>>>> >>>>> Thanks for the info. >>>>> The example you've provided shows t_relay , which will generate a >>>>> INVITE and relays it back to the UA. >>>>> How do I get it to relay to the gateway I wanted ? >>>>> I've tried rewritehostport("x.x.x.x:5060") before t_relay but >>>>> doesn't >>>>> >>>>> >> >> >> >>>>> help. >>>>> >>>>> Any clue ? >>>>> >>>>> Regards, >>>>> Sam >>>>> >>>>> -----Original Message----- >>>>> From: Carsten Bock [mailto:[EMAIL PROTECTED] >>>>> Sent: Friday, January 26, 2007 5:35 PM >>>>> To: Sam Lee >>>>> Cc: [email protected] >>>>> Subject: Re: [Users] Hijack 'Move Temporarily' >>>>> >>>>> Hi Sam, >>>>> >>>>> Take a look at the uac_redirect-Module. This does exactly, what >>>>> you want to. >>>>> Here are the docs: >>>>> http://openser.org/docs/modules/1.1.x/uac_redirect.html >>>>> >>>>> In the routing-logic, you just have to define the following >>>>> failure-route: >>>>> >>>>> failure_route[1] { >>>>> if (t_check_status("3[0-9][0-9]")) { >>>>> get_redirects("*"); >>>>> t_relay(); >>>>> exit; >>>>> } >>>>> } >>>>> >>>>> An of course, in the route to the forwarder a "t_on_failure >>>>> ("1");". >>>>> >>>>> Carsten >>>>> >>>>> Am Freitag, den 26.01.2007, 12:02 +0800 schrieb Sam Lee: >>>>> >>>>> >>>>> >>>>> >>>>>> Hey Guys, >>>>>> >>>>>> Normally if the SIP-UA is call-forwarded to a different number , >>>>>> it > >>>>>> will send a 'Move Temporarily' to the proxy , which in turn relay >>>>>> this >>>>>> >>>>>> >>>>>> message to the originating gateway. >>>>>> >>>>>> The problem is , if they call forward to a number which the >>>>>> originating gateway doesn't know what to do with it , it will >>>>>> just >>>>>> >>>>>> >>>>>> >>>>>> >>> >>> >>> >>> >>>>>> kill the call. >>>>>> >>>>>> Can i hijack 'Move Temporarily' directly in the proxy and sending >>>>>> this >>>>>> >>>>>> >>>>>> call to a different gateway rather than relaying it to the >>>>>> originating >>>>>> >>>>>> >>>>>> gateway ? >>>>>> >>>>>> Please let me know if you can't understand me. >>>>>> Thanks! >>>>>> >>>>>> >>>>>> > > > _______________________________________________ > Users mailing list > [email protected] > http://openser.org/cgi-bin/mailman/listinfo/users > > _______________________________________________ > Users mailing list > [email protected] > http://openser.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://openser.org/cgi-bin/mailman/listinfo/users
