Gene,

subst() works only on the header, so the first line is not covered by this function. subst_uri() works only on the RURI (from the first line).

so try:
   subst_uri("/sip:(.*)$/[EMAIL PROTECTED]/")

To header is not recommended to be changed since it's used to transaction matching - anyhow it has no purpose in routing.

regards,
bogdan


Gene Cohen wrote:

Bogdan,

I have no problem changing to To:  but the INVITE doesn't match evn though I
use the same code.
I tried subst and subst_uri  - here is the code:


        if (subst("/^INVITE(.*)$/INVITE sip:[EMAIL PROTECTED];/") )

        {
                log("URISUBSTITUTED");
                
        }
        else
        {
                log("INVITE NOTSUBSTITUTED");

        }


        if (subst("/^To(.*)$/To: sip:[EMAIL PROTECTED];/") )

        {
                log("TO SUBSTITUTED");
                
        }
        else
        {
        log("TO NOT SUBSTITUTED");

        }



Thanks,
Gene


-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 12:39 PM
To: Gene Cohen
Cc: [email protected]
Subject: Re: [Users] SIP Invite Header Modification


Hi Gene,

As I see, you actually want to change the first line of INVITE and not the headers..for changing the ruri you have the subst_uri() function (regexp based) in textops module:
   http://openser.org/docs/modules/1.0.x/textops.html#AEN141
make a regexp to get rid of the ruri params.

regards,
bogdan

Gene Cohen wrote:

I am working with a VoiceGenie SIP VXML server which is very sensitive
to SIP headers on INVITE - if the format is not just so, it cannot handle the calls.

I want to use openser to mask this problem by sending a consistent SIP
INVITE that the VoiceGenie can handle.

Does anyone have any advice on how to do this?


This (simple) INVITE header works :

       INVITE sip:[EMAIL PROTECTED]:5060 SIP/2.0

none of these work :

     INVITE sip:[EMAIL PROTECTED]:5060;dtg=SIP SIP/2.0
     INVITE sip:7035470041;npdi=yes;@69.60.182.155:5060;dtg=SIP SIP/2.0
     INVITE sip:7035470041;cic=5119;@69.60.182.155:5060;dtg=SIP SIP/2.0
     INVITE
     sip:7035470041;cic=5119;npdi=yes;@69.60.182.155:5060;dtg=SIP
     SIP/2.0

     thanks,

     gene

-----------------------------------------------------------------------
-

_______________________________________________
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

Reply via email to