Modify To:'s field and forward

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Modify To:'s field and forward

Spady#7
Hi all, I was wondering if OpenSIPS can help me with scenario explained below;

I have a Fax Server SIP and T38 based. It use a SIP based Pbx as PSTN Gateway, so requested external fax number are sent from Fax server toward PBX and then forwarded to Pstn.

Here there's a full SIP trace:
NOTE:
172.16.52.7 = Fax Server
10.9.6.3= PBX


INVITE sip:00522375568@10.9.6.3:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 172.16.52.7:5061
From: Fax Alcatel <sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
To: sip:00522375568@10.9.6.3:5060
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 101 INVITE
Max-Forwards: 70
Contact: <sip:+390522375507@172.16.52.7:5061;user=phone>
User-Agent: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
P-Alcatel-CSBU: charging=sip:2542@ucalcatel.sedoc.locale
Content-Type: application/sdp
Content-Length: 235

v=0
o=XMedius-Fax-Gateway 79844629 629 IN IP4 172.16.52.7
s=SIP Fax Call
c=IN IP4 172.16.52.7
t=0 0
m=audio 62186 RTP/AVP 18 8 4
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=ptime:20
SIP/2.0 100 Trying
To: sip:00522375568@10.9.6.3:5060
From: Fax Alcatel <sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 101 INVITE
Via: SIP/2.0/UDP 172.16.52.7:5061
Content-Length: 0

SIP/2.0 180 Ringing
Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS, UPDATE
Contact: sip:10.9.6.3
User-Agent: OmniPCX Enterprise R9.0 h1.301.50
P-Alcatel-CSBU: categparty=external
Content-Type: application/sdp
To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
From: Fax Alcatel <sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 101 INVITE
Via: SIP/2.0/UDP 172.16.52.7:5061
Content-Length: 229

v=0
o=OXE 1322519520 1322519520 IN IP4 10.9.6.3
s=abs
c=IN IP4 10.9.6.8
t=0 0
m=audio 32600 RTP/AVP 18 96
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:30
a=maxptime:40
a=rtpmap:96 telephone-event/8000
a=sendrecv
SIP/2.0 200 OK
Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS, UPDATE
Contact: sip:10.9.6.3
Supported: replaces,timer,100rel
User-Agent: OmniPCX Enterprise R9.0 h1.301.50
Session-Expires: 1800;refresher=uas
P-Alcatel-CSBU: categparty=external
P-Asserted-Identity: "Lw RE" <sip:05223755@10.9.6.3;user=phone>
Content-Type: application/sdp
To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
From: Fax Alcatel <sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 101 INVITE
Via: SIP/2.0/UDP 172.16.52.7:5061
Content-Length: 229

v=0
o=OXE 1322519520 1322519521 IN IP4 10.9.6.3
s=abs
c=IN IP4 10.9.6.8
t=0 0
m=audio 32600 RTP/AVP 18 96
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:30
a=maxptime:40
a=rtpmap:96 telephone-event/8000
a=sendrecv
ACK sip:10.9.6.3 SIP/2.0
Via: SIP/2.0/UDP 172.16.52.7:5061
From: Fax Alcatel <sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
Max-Forwards: 70
CSeq: 101 ACK
Contact: <sip:+390522375507@172.16.52.7:5061;user=phone>
Content-Length: 0

INVITE sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS, UPDATE
Contact: sip:10.9.6.3
Supported: replaces,timer,100rel
User-Agent: OmniPCX Enterprise R9.0 h1.301.50
Session-Expires: 1800;refresher=uac
Min-SE: 900
Content-Type: application/sdp
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886164 INVITE
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK3dec7cf801610f04d0d388ebc2906678
Max-Forwards: 70
Content-Length: 268

v=0
o=OXE 1322519520 1322519522 IN IP4 10.9.6.3
s=abs
c=IN IP4 10.9.6.8
t=0 0
m=image 32603 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:9600
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:256
a=T38FaxMaxDatagram:512
a=T38FaxUdpEC:t38UDPRedundancy
INVITE sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS, UPDATE
Contact: sip:10.9.6.3
Supported: replaces,timer,100rel
User-Agent: OmniPCX Enterprise R9.0 h1.301.50
Session-Expires: 1800;refresher=uac
Min-SE: 900
Content-Type: application/sdp
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886164 INVITE
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK3dec7cf801610f04d0d388ebc2906678
Max-Forwards: 70
Content-Length: 268

v=0
o=OXE 1322519520 1322519522 IN IP4 10.9.6.3
s=abs
c=IN IP4 10.9.6.8
t=0 0
m=image 32603 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:9600
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:256
a=T38FaxMaxDatagram:512
a=T38FaxUdpEC:t38UDPRedundancy
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK3dec7cf801610f04d0d388ebc2906678
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886164 INVITE
Allow: INVITE, ACK, BYE, CANCEL
Contact: <sip:+390522375507@172.16.52.7:5061;user=phone>
Server: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
Content-Type: application/sdp
Content-Length: 284

v=0
o=XMedius-Fax-Gateway 79844629 630 IN IP4 172.16.52.7
s=abs
c=IN IP4 172.16.52.7
t=0 0
m=image 61169 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:8192
a=T38FaxMaxDatagram:1008
a=T38FaxUdpEC:t38UDPRedundancy
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK3dec7cf801610f04d0d388ebc2906678
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886164 INVITE
Allow: INVITE, ACK, BYE, CANCEL
Contact: <sip:+390522375507@172.16.52.7:5061;user=phone>
Server: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
Content-Type: application/sdp
Content-Length: 284

v=0
o=XMedius-Fax-Gateway 79844629 630 IN IP4 172.16.52.7
s=abs
c=IN IP4 172.16.52.7
t=0 0
m=image 61169 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:8192
a=T38FaxMaxDatagram:1008
a=T38FaxUdpEC:t38UDPRedundancy
ACK sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
Contact: sip:10.9.6.3
User-Agent: OmniPCX Enterprise R9.0 h1.301.50
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886164 ACK
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKdbe117b38c900fdd1e039c6cd7b7ebe8
Max-Forwards: 70
Content-Length: 0

UPDATE sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
Supported: replaces,timer,100rel
Session-Expires: 1800;refresher=uac
Min-SE: 900
Content-Type: application/sdp
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886165 UPDATE
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKd2a9e02beb6049cbdd09da806b6fb0a4
Contact: sip:10.9.6.3
Max-Forwards: 70
Content-Length: 268

v=0
o=OXE 1322519520 1322519522 IN IP4 10.9.6.3
s=abs
c=IN IP4 10.9.6.8
t=0 0
m=image 32603 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:9600
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:256
a=T38FaxMaxDatagram:512
a=T38FaxUdpEC:t38UDPRedundancy
SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKd2a9e02beb6049cbdd09da806b6fb0a4
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886165 UPDATE
Allow: INVITE, ACK, BYE, CANCEL
Contact: <sip:+390522375507@172.16.52.7:5061;user=phone>
Server: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
Content-Length: 0

INVITE sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
Contact: sip:10.9.6.3
Supported: replaces,timer,100rel
Session-Expires: 1800;refresher=uac
Min-SE: 900
P-Asserted-Identity: "Lw RE" <sip:05223755@10.9.6.3;user=phone>
Content-Type: application/sdp
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886166 INVITE
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKacbd9d6325236ef926050d307c0cbf7c
Max-Forwards: 70
Content-Length: 268

v=0
o=OXE 1322519520 1322519522 IN IP4 10.9.6.3
s=abs
c=IN IP4 10.9.6.8
t=0 0
m=image 32603 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:9600
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:256
a=T38FaxMaxDatagram:512
a=T38FaxUdpEC:t38UDPRedundancy
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKacbd9d6325236ef926050d307c0cbf7c
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886166 INVITE
Allow: INVITE, ACK, BYE, CANCEL
Contact: <sip:+390522375507@172.16.52.7:5061;user=phone>
Server: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
Content-Type: application/sdp
Content-Length: 284

v=0
o=XMedius-Fax-Gateway 79844629 631 IN IP4 172.16.52.7
s=abs
c=IN IP4 172.16.52.7
t=0 0
m=image 61169 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:8192
a=T38FaxMaxDatagram:1008
a=T38FaxUdpEC:t38UDPRedundancy
ACK sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
Contact: sip:10.9.6.3
User-Agent: OmniPCX Enterprise R9.0 h1.301.50
To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 2033886166 ACK
Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK892a68e34cf81bf95ff183b4fed740eb
Max-Forwards: 70
Content-Length: 0

BYE sip:10.9.6.3 SIP/2.0
Via: SIP/2.0/UDP 172.16.52.7:5061
From: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 102 BYE
Max-Forwards: 70
Contact: <sip:+390522375507@10.9.6.3:5060;user=phone>
User-Agent: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
Content-Length: 0

SIP/2.0 200 OK
Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS, UPDATE
Supported: replaces,timer,100rel
User-Agent: OmniPCX Enterprise R9.0 h1.301.50
To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
From: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 102 BYE
Via: SIP/2.0/UDP 172.16.52.7:5061
Content-Length: 0


So, what I would like that OpenSIPS do for me is analyze "FROM" header into first INVITE message than query a DB and if query matches then modify the "TO:" header.

Example:

From: Fax Alcatel <sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2

Here OPENSIPS should analyze "+390522375507" then if query is ok modify

To: sip:00522375568@10.9.6.3:5060

into

To: sip:870190522375568@10.9.6.3:5060

Is this possible????
Naturally I will put OpenSIPS in the middle between Fax server and PBX and fax server, as SIP PEER, will points to OpenSIPS ( OpenSIPS then will be in charge of forward everything to PBX ).

What do you think???

Thanks a lot for your replies.
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

osiris123d
I don't totally follow why you would want to change the "To:" field to just prepend "870190" and also remove a "0" from "00522375568", but what you want to do is possible. You could use AVP's and add an AVP like this
opensipsctl avp add -T usr_preferences [hidden email] is_FAX 0 y

Then in the opensips config do

if (avp_db_load("$fu/username","$avp(is_FAX)"))
{
if (avp_check("$avp(is_FAX)", "eq/y/i"))
{
DO WHAT YOU WANT
}
}




On , spady <[hidden email]> wrote:

> Hi all, I was wondering if OpenSIPS can help me with scenario explained
>
> below;
>
>
>
> I have a Fax Server SIP and T38 based. It use a SIP based Pbx as PSTN
>
> Gateway, so requested external fax number are sent from Fax server toward
>
> PBX and then forwarded to Pstn.
>
>
>
> Here there's a full SIP trace:
>
> NOTE:
>
> 172.16.52.7 = Fax Server
>
> 10.9.6.3= PBX
>
>
>
>
>
> INVITE sip:00522375568@10.9.6.3:5060;user=phone SIP/2.0
>
> Via: SIP/2.0/UDP 172.16.52.7:5061
>
> *From: Fax Alcatel sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2*
>
> To: sip:00522375568@10.9.6.3:5060
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 101 INVITE
>
> Max-Forwards: 70
>
> Contact:
>
> User-Agent: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
>
> P-Alcatel-CSBU: charging=sip:[hidden email]
>
> Content-Type: application/sdp
>
> Content-Length: 235
>
>
>
> v=0
>
> o=XMedius-Fax-Gateway 79844629 629 IN IP4 172.16.52.7
>
> s=SIP Fax Call
>
> c=IN IP4 172.16.52.7
>
> t=0 0
>
> m=audio 62186 RTP/AVP 18 8 4
>
> a=rtpmap:18 G729/8000
>
> a=fmtp:18 annexb=no
>
> a=rtpmap:8 PCMA/8000
>
> a=rtpmap:4 G723/8000
>
> a=ptime:20
>
> SIP/2.0 100 Trying
>
> To: sip:00522375568@10.9.6.3:5060
>
> From: Fax Alcatel sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 101 INVITE
>
> Via: SIP/2.0/UDP 172.16.52.7:5061
>
> Content-Length: 0
>
>
>
> SIP/2.0 180 Ringing
>
> Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS,
>
> UPDATE
>
> Contact: sip:10.9.6.3
>
> User-Agent: OmniPCX Enterprise R9.0 h1.301.50
>
> P-Alcatel-CSBU: categparty=external
>
> Content-Type: application/sdp
>
> To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> From: Fax Alcatel sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 101 INVITE
>
> Via: SIP/2.0/UDP 172.16.52.7:5061
>
> Content-Length: 229
>
>
>
> v=0
>
> o=OXE 1322519520 1322519520 IN IP4 10.9.6.3
>
> s=abs
>
> c=IN IP4 10.9.6.8
>
> t=0 0
>
> m=audio 32600 RTP/AVP 18 96
>
> a=rtpmap:18 G729/8000
>
> a=fmtp:18 annexb=no
>
> a=ptime:30
>
> a=maxptime:40
>
> a=rtpmap:96 telephone-event/8000
>
> a=sendrecv
>
> SIP/2.0 200 OK
>
> Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS,
>
> UPDATE
>
> Contact: sip:10.9.6.3
>
> Supported: replaces,timer,100rel
>
> User-Agent: OmniPCX Enterprise R9.0 h1.301.50
>
> Session-Expires: 1800;refresher=uas
>
> P-Alcatel-CSBU: categparty=external
>
> P-Asserted-Identity: "Lw RE" sip:05223755@10.9.6.3;user=phone>
>
> Content-Type: application/sdp
>
> To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> From: Fax Alcatel sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 101 INVITE
>
> Via: SIP/2.0/UDP 172.16.52.7:5061
>
> Content-Length: 229
>
>
>
> v=0
>
> o=OXE 1322519520 1322519521 IN IP4 10.9.6.3
>
> s=abs
>
> c=IN IP4 10.9.6.8
>
> t=0 0
>
> m=audio 32600 RTP/AVP 18 96
>
> a=rtpmap:18 G729/8000
>
> a=fmtp:18 annexb=no
>
> a=ptime:30
>
> a=maxptime:40
>
> a=rtpmap:96 telephone-event/8000
>
> a=sendrecv
>
> ACK sip:10.9.6.3 SIP/2.0
>
> Via: SIP/2.0/UDP 172.16.52.7:5061
>
> From: Fax Alcatel sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
>
> To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> Max-Forwards: 70
>
> CSeq: 101 ACK
>
> Contact:
>
> Content-Length: 0
>
>
>
> INVITE sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
>
> Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS,
>
> UPDATE
>
> Contact: sip:10.9.6.3
>
> Supported: replaces,timer,100rel
>
> User-Agent: OmniPCX Enterprise R9.0 h1.301.50
>
> Session-Expires: 1800;refresher=uac
>
> Min-SE: 900
>
> Content-Type: application/sdp
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886164 INVITE
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK3dec7cf801610f04d0d388ebc2906678
>
> Max-Forwards: 70
>
> Content-Length: 268
>
>
>
> v=0
>
> o=OXE 1322519520 1322519522 IN IP4 10.9.6.3
>
> s=abs
>
> c=IN IP4 10.9.6.8
>
> t=0 0
>
> m=image 32603 udptl t38
>
> a=T38FaxVersion:0
>
> a=T38MaxBitRate:9600
>
> a=T38FaxRateManagement:transferredTCF
>
> a=T38FaxMaxBuffer:256
>
> a=T38FaxMaxDatagram:512
>
> a=T38FaxUdpEC:t38UDPRedundancy
>
> INVITE sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
>
> Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS,
>
> UPDATE
>
> Contact: sip:10.9.6.3
>
> Supported: replaces,timer,100rel
>
> User-Agent: OmniPCX Enterprise R9.0 h1.301.50
>
> Session-Expires: 1800;refresher=uac
>
> Min-SE: 900
>
> Content-Type: application/sdp
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886164 INVITE
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK3dec7cf801610f04d0d388ebc2906678
>
> Max-Forwards: 70
>
> Content-Length: 268
>
>
>
> v=0
>
> o=OXE 1322519520 1322519522 IN IP4 10.9.6.3
>
> s=abs
>
> c=IN IP4 10.9.6.8
>
> t=0 0
>
> m=image 32603 udptl t38
>
> a=T38FaxVersion:0
>
> a=T38MaxBitRate:9600
>
> a=T38FaxRateManagement:transferredTCF
>
> a=T38FaxMaxBuffer:256
>
> a=T38FaxMaxDatagram:512
>
> a=T38FaxUdpEC:t38UDPRedundancy
>
> SIP/2.0 200 OK
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK3dec7cf801610f04d0d388ebc2906678
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886164 INVITE
>
> Allow: INVITE, ACK, BYE, CANCEL
>
> Contact:
>
> Server: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
>
> Content-Type: application/sdp
>
> Content-Length: 284
>
>
>
> v=0
>
> o=XMedius-Fax-Gateway 79844629 630 IN IP4 172.16.52.7
>
> s=abs
>
> c=IN IP4 172.16.52.7
>
> t=0 0
>
> m=image 61169 udptl t38
>
> a=T38FaxVersion:0
>
> a=T38MaxBitRate:14400
>
> a=T38FaxRateManagement:transferredTCF
>
> a=T38FaxMaxBuffer:8192
>
> a=T38FaxMaxDatagram:1008
>
> a=T38FaxUdpEC:t38UDPRedundancy
>
> SIP/2.0 200 OK
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK3dec7cf801610f04d0d388ebc2906678
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886164 INVITE
>
> Allow: INVITE, ACK, BYE, CANCEL
>
> Contact:
>
> Server: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
>
> Content-Type: application/sdp
>
> Content-Length: 284
>
>
>
> v=0
>
> o=XMedius-Fax-Gateway 79844629 630 IN IP4 172.16.52.7
>
> s=abs
>
> c=IN IP4 172.16.52.7
>
> t=0 0
>
> m=image 61169 udptl t38
>
> a=T38FaxVersion:0
>
> a=T38MaxBitRate:14400
>
> a=T38FaxRateManagement:transferredTCF
>
> a=T38FaxMaxBuffer:8192
>
> a=T38FaxMaxDatagram:1008
>
> a=T38FaxUdpEC:t38UDPRedundancy
>
> ACK sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
>
> Contact: sip:10.9.6.3
>
> User-Agent: OmniPCX Enterprise R9.0 h1.301.50
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886164 ACK
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKdbe117b38c900fdd1e039c6cd7b7ebe8
>
> Max-Forwards: 70
>
> Content-Length: 0
>
>
>
> UPDATE sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
>
> Supported: replaces,timer,100rel
>
> Session-Expires: 1800;refresher=uac
>
> Min-SE: 900
>
> Content-Type: application/sdp
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886165 UPDATE
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKd2a9e02beb6049cbdd09da806b6fb0a4
>
> Contact: sip:10.9.6.3
>
> Max-Forwards: 70
>
> Content-Length: 268
>
>
>
> v=0
>
> o=OXE 1322519520 1322519522 IN IP4 10.9.6.3
>
> s=abs
>
> c=IN IP4 10.9.6.8
>
> t=0 0
>
> m=image 32603 udptl t38
>
> a=T38FaxVersion:0
>
> a=T38MaxBitRate:9600
>
> a=T38FaxRateManagement:transferredTCF
>
> a=T38FaxMaxBuffer:256
>
> a=T38FaxMaxDatagram:512
>
> a=T38FaxUdpEC:t38UDPRedundancy
>
> SIP/2.0 405 Method Not Allowed
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKd2a9e02beb6049cbdd09da806b6fb0a4
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886165 UPDATE
>
> Allow: INVITE, ACK, BYE, CANCEL
>
> Contact:
>
> Server: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
>
> Content-Length: 0
>
>
>
> INVITE sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
>
> Contact: sip:10.9.6.3
>
> Supported: replaces,timer,100rel
>
> Session-Expires: 1800;refresher=uac
>
> Min-SE: 900
>
> P-Asserted-Identity: "Lw RE" sip:05223755@10.9.6.3;user=phone>
>
> Content-Type: application/sdp
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886166 INVITE
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKacbd9d6325236ef926050d307c0cbf7c
>
> Max-Forwards: 70
>
> Content-Length: 268
>
>
>
> v=0
>
> o=OXE 1322519520 1322519522 IN IP4 10.9.6.3
>
> s=abs
>
> c=IN IP4 10.9.6.8
>
> t=0 0
>
> m=image 32603 udptl t38
>
> a=T38FaxVersion:0
>
> a=T38MaxBitRate:9600
>
> a=T38FaxRateManagement:transferredTCF
>
> a=T38FaxMaxBuffer:256
>
> a=T38FaxMaxDatagram:512
>
> a=T38FaxUdpEC:t38UDPRedundancy
>
> SIP/2.0 200 OK
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bKacbd9d6325236ef926050d307c0cbf7c
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886166 INVITE
>
> Allow: INVITE, ACK, BYE, CANCEL
>
> Contact:
>
> Server: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
>
> Content-Type: application/sdp
>
> Content-Length: 284
>
>
>
> v=0
>
> o=XMedius-Fax-Gateway 79844629 631 IN IP4 172.16.52.7
>
> s=abs
>
> c=IN IP4 172.16.52.7
>
> t=0 0
>
> m=image 61169 udptl t38
>
> a=T38FaxVersion:0
>
> a=T38MaxBitRate:14400
>
> a=T38FaxRateManagement:transferredTCF
>
> a=T38FaxMaxBuffer:8192
>
> a=T38FaxMaxDatagram:1008
>
> a=T38FaxUdpEC:t38UDPRedundancy
>
> ACK sip:+390522375507@172.16.52.7:5061;user=phone SIP/2.0
>
> Contact: sip:10.9.6.3
>
> User-Agent: OmniPCX Enterprise R9.0 h1.301.50
>
> To: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> From: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 2033886166 ACK
>
> Via: SIP/2.0/UDP 10.9.6.3;branch=z9hG4bK892a68e34cf81bf95ff183b4fed740eb
>
> Max-Forwards: 70
>
> Content-Length: 0
>
>
>
> BYE sip:10.9.6.3 SIP/2.0
>
> Via: SIP/2.0/UDP 172.16.52.7:5061
>
> From: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 102 BYE
>
> Max-Forwards: 70
>
> Contact:
>
> User-Agent: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
>
> Content-Length: 0
>
>
>
> SIP/2.0 200 OK
>
> Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS,
>
> UPDATE
>
> Supported: replaces,timer,100rel
>
> User-Agent: OmniPCX Enterprise R9.0 h1.301.50
>
> To: sip:00522375568@10.9.6.3:5060;tag=4d23b434bddc6d2bbdcdeb5b281baf8e
>
> From: sip:+390522375507@172.16.52.7:5061;tag=B0A3C63723A2
>
> Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
>
> CSeq: 102 BYE
>
> Via: SIP/2.0/UDP 172.16.52.7:5061
>
> Content-Length: 0
>
>
>
>
>
> So, what I would like that OpenSIPS do for me is analyze "FROM" header into
>
> first INVITE message than query a DB and if query matches then modify the
>
> "TO:" header.
>
>
>
> Example:
>
>
>
> From: Fax Alcatel sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
>
>
>
> Here OPENSIPS should analyze "+390522375507" then if query is ok modify
>
>
>
> To: sip:00522375568@10.9.6.3:5060
>
>
>
> into
>
>
>
> To: sip:870190522375568@10.9.6.3:5060
>
>
>
> Is this possible????
>
> Naturally I will put OpenSIPS in the middle between Fax server and PBX and
>
> fax server, as SIP PEER, will points to OpenSIPS ( OpenSIPS then will be in
>
> charge of forward everything to PBX ).
>
>
>
> What do you think???
>
>
>
> Thanks a lot for your replies.
>
>
>
>
>
> --
>
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Modify-To-s-field-and-forward-tp7040781p7040781.html
>
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
>
>
> _______________________________________________
>
> Users mailing list
>
> [hidden email]
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Spady#7
Hi Osiris, thanks for reply.
I need to modify TO field because this Fax Server has to be used by several companies. Each company should use own lines. This Fax server cannot do that for example by setting a profile and assign to that profile a specific outbound lines.. So, what i should do, is pass to PBX a prefix ( es: 87019 ) that is specific for a outbound line. ( "0" is a common prefix for all... so I cannot pass it to PBX. In this case will be used always same lines. Hope it's more clear now ).

Btw  what [hidden mail] stand for?
So done this, I will have a new INVITE with TO modified, right?
Mmmm I realized right now that the real SIP trace will not be like posted.
What I posted is taken without OPENSIPS. In my scenario, into TO filed there will be,for istance,
To: sip:00522375568@10.9.6.3:5060 but " 10.9.6.3" is OpenSIPS server, and not PBX.
Can I also change it with PBX's IP???? because at the end the fax call has to be processed by PBX ( T38 stream ).

Best regards
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

osiris123d

So what I first sent will analyze the from header.  Problem 1 solved for you.  Next you will want to look at opensips documentation and then click on the version of opensips you are using and then click in the transformation or manipulation functions link to figure out how to manipulate the To: RURI.

What you want to do is possible.

On Nov 28, 2011 5:41 PM, "spady" <[hidden email]> wrote:
Hi Osiris, thanks for reply.
I need to modify TO field because this Fax Server has to be used by several
companies. Each company should use own lines. This Fax server cannot do that
for example by setting a profile and assign to that profile a specific
outbound lines.. So, what i should do, is pass to PBX a prefix ( es: 87019 )
that is specific for a outbound line. ( "0" is a common prefix for all... so
I cannot pass it to PBX. In this case will be used always same lines. Hope
it's more clear now ).

Btw  what [hidden mail] stand for?
So done this, I will have a new INVITE with TO modified, right?
Mmmm I realized right now that the real SIP trace will not be like posted.
What I posted is taken without OPENSIPS. In my scenario, into TO filed there
will be,for istance,
To: sip:00522375568@10.9.6.3:5060 but " 10.9.6.3" is OpenSIPS server, and
not PBX.
Can I also change it with PBX's IP???? because at the end the fax call has
to be processed by PBX ( T38 stream ).

Best regards

--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Modify-To-s-field-and-forward-tp7040781p7040886.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Spady#7
Thanks osiris.. To know that What I want to acomplish is possible is a good answer.. Now I will study more deeper OpenSIPS to realized my scenario.

Thanks.
 
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Bogdan-Andrei Iancu-2
Hi,

See the uac module, with the uac_replace_from() and uac_replace_to()
functions:
     http://www.opensips.org/html/docs/modules/1.7.x/uac.html#id250475
     http://www.opensips.org/html/docs/modules/1.7.x/uac.html#id292749

The functions allows you independently change the display or/and the URI
part of the TO/FROM headers.

As important note, if sufficient for you, try to change only the display
part as this is much lighter from processing point of view.

Regards,
Bogdan

On 11/29/2011 02:09 AM, spady wrote:

> Thanks osiris.. To know that What I want to acomplish is possible is a good
> answer.. Now I will study more deeper OpenSIPS to realized my scenario.
>
> Thanks.
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Modify-To-s-field-and-forward-tp7040781p7040966.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Spady#7
Hi Bogdan, thanks for your advice.
I was wondering what will happen to real RTP stream. I mean: as I sayd, for Fax server point of view, OpenSIPS acts as Sip Proxy to direct the T38 flow, after correct fax's handshake.
OpenSIPS, after analyzed/changed the INVITE, should redirect all stream to IP PBX. Can OpenSIPS do that? or I have to install rtpproxy module? or something like that?

Sorry for "dummy" question but I am really new with OpenSIPS.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Spady#7
Hi List,
I searched into Forum and i am reading about AVP module and UAC module but it's hard to write my first OpenSIPS's script :-(
As I sayd i am trying to modify the following INVITE message:

INVITE sip:00522375568@10.9.101.166:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 172.16.52.7:5061
From: Fax Alcatel <sip:+390522375507@172.16.52.7:5061>;tag=B0A3C63723A2
To: sip:00522375568@10.9.101.166:5060
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a@172.16.52.7
CSeq: 101 INVITE
Max-Forwards: 70
Contact: <sip:+390522375507@172.16.52.7:5061;user=phone>
User-Agent: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
P-Alcatel-CSBU: charging=sip:2542@ucalcatel.sedoc.locale
Content-Type: application/sdp
Content-Length: 235

v=0
o=XMedius-Fax-Gateway 79844629 629 IN IP4 172.16.52.7
s=SIP Fax Call
c=IN IP4 172.16.52.7
t=0 0
m=audio 62186 RTP/AVP 18 8 4
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=ptime:20

As Osiris sayd I started to write into usr_preferences table the following:

opensipsctl avp add -T usr_preferences +390522375507@172.16.52.7 is_FAX 0 y

+------+---------------+-------------+-----------+------+-------+
| uuid | username      | domain      | attribute | type | value           |
+------+---------------+-------------+-----------+------+-------+
|       | +390522375507 | 172.16.52.7 | is_FAX    |    0        | y       |
+------+---------------+-------------+-----------+------+-------+

then I should use AVP to delete first "0" from INVITE field and TO field and change "10.9.101.166 (is OpenSIPS)" with "10.9.6.3 (is PBX's ip)"

INVITE sip:00522375568@10.9.101.166:5060;user=phone SIP/2.0
and
To: sip:00522375568@10.9.101.166:5060

and repleace them with 87019; so my new FROM and To will should became:

INVITE sip:870190522375568@10.9.6.3:5060;user=phone SIP/2.0
and
To: sip:870190522375568@10.9.6.3:5060

Please, can you help me to write this script/route logic ????
I would really appreciate it.

Thanks in advance

Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Spady#7
Hi Again, i am tryng to do, as sayd, my first script.
I setted up the following:



 if (avp_db_load("$fu/username","$avp(Linea-LW)"))
        {
                xlog("L_DBG",
                "AVP_DB_LOAD Invocato!!!!!!!!!!!!!!\n");
                if (avp_check("$avp(Linea-LW)","eq/y/i"));
                if ($rU=~"^sip:0[0-9]{11}@")
                {
                xlog("L_DBG",
                "URI modificato per FAX SEVER\n");
                strip(1);
                prefix("87019");
                rewritehostport("10.9.6.3:5060");
                route(1);
                exit;
                }
        }

But it does not work.

What's wrong?
Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Spady#7
Hi, i am gonna step by step closer but..it still not working.
This a log from opensips.log:



tail -f /var/log/opensips.log
Dec  5 16:42:06 opensips /sbin/opensips[22222]: DBG:tm:timer_routine: timer routine:2,tl=0xaf3edca0 next=(nil), timeout=237
Dec  5 16:42:06 opensips /sbin/opensips[22222]: DBG:tm:wait_handler: removing 0xaf3edc58 from table
Dec  5 16:42:06 opensips /sbin/opensips[22222]: DBG:tm:delete_cell: delete transaction 0xaf3edc58
Dec  5 16:42:06 opensips /sbin/opensips[22222]: DBG:tm:wait_handler: done
Dec  5 16:42:08 opensips /sbin/opensips[22216]: DBG:core:udp_rcv_loop: probing packet received len = 4
Dec  5 16:42:38 opensips /sbin/opensips[22217]: DBG:core:udp_rcv_loop: probing packet received len = 4
Dec  5 16:43:01 opensips /sbin/opensips[22211]: DBG:mi_fifo:mi_parse_tree: adding node <> ; val <all>
Dec  5 16:43:01 opensips /sbin/opensips[22211]: DBG:mi_fifo:mi_parse_node: end of input tree
Dec  5 16:43:01 opensips /sbin/opensips[22211]: DBG:mi_fifo:mi_fifo_server: done parsing the mi tree
Dec  5 16:43:08 opensips /sbin/opensips[22216]: DBG:core:udp_rcv_loop: probing packet received len = 4
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_msg: SIP Request:
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_msg:  method:  <INVITE>
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_msg:  uri:     <sip:00522375568@10.9.101.166:5060;user=phone>
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_msg:  version: <SIP/2.0>
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=2
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_via: end of header reached, state=5
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: via found, flags=2
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: this is the first via
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:receive_msg: After parse_msg...
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:receive_msg: preparing to run routing scripts...
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:siptrace:sip_trace: nothing to trace...
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=100
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_to: end of header reached, state=9
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_to: display={}, ruri={sip:00522375568@10.9.101.166:5060}
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: <To> [35]; uri=[sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: to body [sip:00522375568@10.9.101.166:5060#015#012]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: cseq <CSeq>: <101> <INVITE>
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:maxfwd:is_maxfwd_present: value = 70
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:uri:has_totag: no totag
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=78
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:t_lookup_request: start searching: hash=58302, isACK=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:t_lookup_request: proceeding to pre-RFC3261 transaction matching
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:t_lookup_request: no transaction found
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_to_param: tag=B080AAD539C5
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_to: end of header reached, state=29
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_to: display={}, ruri={sip:+390522375507@172.16.52.7:5061}
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if host==us: 11==9 &&  [172.16.52.7] == [127.0.0.1]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if port 5060 matches port 5061
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if host==us: 11==12 &&  [172.16.52.7] == [10.9.101.166]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if port 5060 matches port 5061
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if host==us: 11==9 &&  [172.16.52.7] == [127.0.0.1]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if port 5060 matches port 5061
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if host==us: 11==12 &&  [172.16.52.7] == [10.9.101.166]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if port 5060 matches port 5061
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:check_self: host != me
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=200
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: content_length=188
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: found end of header
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:rr:find_first_route: No Route headers found
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:rr:loose_route: There is no Route HF
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if host==us: 12==9 &&  [10.9.101.166] == [127.0.0.1]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if port 5060 matches port 5060
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if host==us: 12==12 &&  [10.9.101.166] == [10.9.101.166]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:grep_sock_info: checking if port 5060 matches port 5060
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:avpops:ops_dbload_avps: attr dbp Linea-LW
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_new_result: allocate 28 bytes for result set at 0x81d6744
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: 3 columns returned from the query
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_allocate_columns: allocate 48 bytes for result columns at 0x81d70c0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81d70cc)[0]=[value]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81d70d4)[1]=[attribute]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81d70dc)[2]=[type]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: use DB_INT result type
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_allocate_rows: allocate 68 bytes for result rows and values at 0x81d70fc
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_str2val: converting STRING [y]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_str2val: converting STRING [Linea-LW]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_str2val: converting INT [0]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:avpops:db_close_query: close avp query
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_free_columns: freeing result columns at 0x81d70c0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_free_rows: freeing 1 rows
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_free_row: freeing row values at 0x81d7104
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_free_rows: freeing rows at 0x81d70fc
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_free_result: freeing result set at 0x81d6744
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:avpops:ops_dbload_avps: loaded avps = 1
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:buf_init: initializing...
Dec  5 16:43:24 opensips /sbin/opensips[22217]: AVP_DB_LOAD Invocato!!!!!!!!!!!!!!sip:+390522375507@172.16.52.7:5061
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:avpops:ops_check_avp: check <y> against <y> as str /33554433
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_new_result: allocate 28 bytes for result set at 0x81d6744
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: 2 columns returned from the query
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_allocate_columns: allocate 32 bytes for result columns at 0x81d70c0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81d70c8)[0]=[username]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81d70d0)[1]=[domain]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_convert_rows: no rows returned from the query
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:alias_db:alias_db_query: no alias found for R-URI
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_free_columns: freeing result columns at 0x81d70c0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_free_rows: freeing 0 rows
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:db_free_result: freeing result set at 0x81d6744
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:registrar:lookup: '00522375568' Not found in usrloc
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:t_newtran: transaction on entrance=(nil)
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=ffffffffffffffff
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=78
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:t_lookup_request: start searching: hash=58302, isACK=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:t_lookup_request: proceeding to pre-RFC3261 transaction matching
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:t_lookup_request: no transaction found
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:run_reqin_callbacks: trans=0xaf3edc58, callback type 1, id 2 entered
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=40
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:run_reqin_callbacks: trans=0xaf3edc58, callback type 1, id 1 entered
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:run_reqin_callbacks: trans=0xaf3edc58, callback type 1, id 0 entered
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=78
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=ffffffffffffffff
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:check_ip_address: params 172.16.52.7, 172.16.52.7, 0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:_shm_resize: resize(0) called
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:cleanup_uac_timers: RETR/FR timers reset
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:set_timer: relative timeout is 500000
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:insert_timer_unsafe: [4]: 0xaf3edd20 (316600000)
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:set_timer: relative timeout is 30
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:insert_timer_unsafe: [0]: 0xaf3edd3c (346)
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:_reply_light: reply sent out. buf=0x81d863c: SIP/2.0 4..., shmem=0xaf3efa90: SIP/2.0 4
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:run_trans_callbacks: trans=0xaf3edc58, callback type 128, id 3 entered
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:run_trans_callbacks: trans=0xaf3edc58, callback type 128, id 2 entered
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=40
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:siptrace:trace_onreply_out: dest [udp:172.16.52.7:5061]
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:siptrace:trace_onreply_out: storing info 10...
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:has_stmt_ctx: ctx found for sip_trace
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x81d3ffc (tail=136132840) MC=0x81d391c
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (0): len=323; type=252; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (1): len=48; type=254; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (2): len=6; type=254; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (3): len=3; type=254; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (4): len=21; type=254; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (5): len=20; type=254; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (6): len=36; type=12; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (7): len=3; type=254; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (8): len=12; type=254; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_val2bind: added val (9): len=0; type=254; is_null=0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:db_mysql:db_mysql_do_prepared_query: doing BIND_PARAM in...
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_msg: SIP Request:
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_msg:  method:  <ACK>
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_msg:  uri:     <sip:00522375568@10.9.101.166:5060>
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_msg:  version: <SIP/2.0>
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_headers: flags=2
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_via: end of header reached, state=5
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_headers: via found, flags=2
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_headers: this is the first via
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:receive_msg: After parse_msg...
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:receive_msg: preparing to run routing scripts...
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:sl:sl_filter_ACK: to late to be a local ACK!
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:siptrace:sip_trace: nothing to trace...
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_headers: flags=100
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_to_param: tag=155c340f586c28d0300cf5a6ccf90d99-de38
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_to: end of header reached, state=29
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_to: display={}, ruri={sip:00522375568@10.9.101.166:5060}
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: <To> [77]; uri=[sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: to body [sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:maxfwd:is_maxfwd_present: value = 70
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:uri:has_totag: totag found
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_headers: flags=200
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: cseq <CSeq>: <101> <ACK>
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: content_length=0
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: found end of header
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:rr:find_first_route: No Route headers found
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:rr:loose_route: There is no Route HF
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:parse_headers: flags=78
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:tm:t_lookup_request: start searching: hash=58302, isACK=1
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:tm:t_lookup_request: proceeding to pre-RFC3261 transaction matching
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:tm:t_lookup_request: no transaction found
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:destroy_avp_list: destroying list (nil)
Dec  5 16:43:24 opensips /sbin/opensips[22218]: DBG:core:receive_msg: cleaning up
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:_reply_light: finished
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:tm:t_unref: UNREF_UNSAFE: [0xaf3edc58] after is 0
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:destroy_avp_list: destroying list (nil)
Dec  5 16:43:24 opensips /sbin/opensips[22217]: DBG:core:receive_msg: cleaning up
Dec  5 16:43:24 opensips /sbin/opensips[22222]: DBG:tm:utimer_routine: timer routine:4,tl=0xaf3edd20 next=(nil), timeout=316600000
Dec  5 16:43:24 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : reply resending (t=0xaf3edc58, SIP/2.0 4 ... )
Dec  5 16:43:24 opensips /sbin/opensips[22222]: DBG:tm:t_retransmit_reply: buf=0xb74345a0: SIP/2.0 4..., shmem=0xaf3efa90: SIP/2.0 4
Dec  5 16:43:24 opensips /sbin/opensips[22222]: DBG:tm:set_timer: relative timeout is 1000000
Dec  5 16:43:24 opensips /sbin/opensips[22222]: DBG:tm:insert_timer_unsafe: [5]: 0xaf3edd20 (317600000)
Dec  5 16:43:24 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : done
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_msg: SIP Request:
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_msg:  method:  <ACK>
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_msg:  uri:     <sip:00522375568@10.9.101.166:5060>
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_msg:  version: <SIP/2.0>
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_headers: flags=2
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_via: end of header reached, state=5
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_headers: via found, flags=2
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_headers: this is the first via
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:receive_msg: After parse_msg...
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:receive_msg: preparing to run routing scripts...
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:sl:sl_filter_ACK: to late to be a local ACK!
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:siptrace:sip_trace: nothing to trace...
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_headers: flags=100
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_to_param: tag=155c340f586c28d0300cf5a6ccf90d99-de38
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_to: end of header reached, state=29
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_to: display={}, ruri={sip:00522375568@10.9.101.166:5060}
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: <To> [77]; uri=[sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: to body [sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:maxfwd:is_maxfwd_present: value = 70
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:uri:has_totag: totag found
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_headers: flags=200
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: cseq <CSeq>: <101> <ACK>
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: content_length=0
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: found end of header
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:rr:find_first_route: No Route headers found
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:rr:loose_route: There is no Route HF
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:parse_headers: flags=78
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:tm:t_lookup_request: start searching: hash=58302, isACK=1
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:tm:t_lookup_request: proceeding to pre-RFC3261 transaction matching
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:tm:t_lookup_request: no transaction found
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:destroy_avp_list: destroying list (nil)
Dec  5 16:43:24 opensips /sbin/opensips[22219]: DBG:core:receive_msg: cleaning up
Dec  5 16:43:25 opensips /sbin/opensips[22222]: DBG:tm:utimer_routine: timer routine:5,tl=0xaf3edd20 next=(nil), timeout=317600000
Dec  5 16:43:25 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : reply resending (t=0xaf3edc58, SIP/2.0 4 ... )
Dec  5 16:43:25 opensips /sbin/opensips[22222]: DBG:tm:t_retransmit_reply: buf=0xb74345a0: SIP/2.0 4..., shmem=0xaf3efa90: SIP/2.0 4
Dec  5 16:43:25 opensips /sbin/opensips[22222]: DBG:tm:set_timer: relative timeout is 2000000
Dec  5 16:43:25 opensips /sbin/opensips[22222]: DBG:tm:insert_timer_unsafe: [6]: 0xaf3edd20 (319600000)
Dec  5 16:43:25 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : done
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_msg: SIP Request:
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_msg:  method:  <ACK>
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_msg:  uri:     <sip:00522375568@10.9.101.166:5060>
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_msg:  version: <SIP/2.0>
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_headers: flags=2
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_via: end of header reached, state=5
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_headers: via found, flags=2
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_headers: this is the first via
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:receive_msg: After parse_msg...
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:receive_msg: preparing to run routing scripts...
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:sl:sl_filter_ACK: to late to be a local ACK!
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:siptrace:sip_trace: nothing to trace...
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_headers: flags=100
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_to_param: tag=155c340f586c28d0300cf5a6ccf90d99-de38
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_to: end of header reached, state=29
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_to: display={}, ruri={sip:00522375568@10.9.101.166:5060}
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:get_hdr_field: <To> [77]; uri=[sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:get_hdr_field: to body [sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:maxfwd:is_maxfwd_present: value = 70
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:uri:has_totag: totag found
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_headers: flags=200
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:get_hdr_field: cseq <CSeq>: <101> <ACK>
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:get_hdr_field: content_length=0
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:get_hdr_field: found end of header
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:rr:find_first_route: No Route headers found
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:rr:loose_route: There is no Route HF
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:parse_headers: flags=78
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:tm:t_lookup_request: start searching: hash=58302, isACK=1
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:tm:t_lookup_request: proceeding to pre-RFC3261 transaction matching
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:tm:t_lookup_request: no transaction found
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:destroy_avp_list: destroying list (nil)
Dec  5 16:43:25 opensips /sbin/opensips[22216]: DBG:core:receive_msg: cleaning up
Dec  5 16:43:27 opensips /sbin/opensips[22222]: DBG:tm:utimer_routine: timer routine:6,tl=0xaf3edd20 next=(nil), timeout=319600000
Dec  5 16:43:27 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : reply resending (t=0xaf3edc58, SIP/2.0 4 ... )
Dec  5 16:43:27 opensips /sbin/opensips[22222]: DBG:tm:t_retransmit_reply: buf=0xb74345a0: SIP/2.0 4..., shmem=0xaf3efa90: SIP/2.0 4
Dec  5 16:43:27 opensips /sbin/opensips[22222]: DBG:tm:set_timer: relative timeout is 4000000
Dec  5 16:43:27 opensips /sbin/opensips[22222]: DBG:tm:insert_timer_unsafe: [7]: 0xaf3edd20 (323600000)
Dec  5 16:43:27 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : done
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_msg: SIP Request:
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_msg:  method:  <ACK>
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_msg:  uri:     <sip:00522375568@10.9.101.166:5060>
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_msg:  version: <SIP/2.0>
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_headers: flags=2
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_via: end of header reached, state=5
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_headers: via found, flags=2
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_headers: this is the first via
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:receive_msg: After parse_msg...
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:receive_msg: preparing to run routing scripts...
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:sl:sl_filter_ACK: to late to be a local ACK!
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:siptrace:sip_trace: nothing to trace...
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_headers: flags=100
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_to_param: tag=155c340f586c28d0300cf5a6ccf90d99-de38
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_to: end of header reached, state=29
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_to: display={}, ruri={sip:00522375568@10.9.101.166:5060}
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: <To> [77]; uri=[sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: to body [sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:maxfwd:is_maxfwd_present: value = 70
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:uri:has_totag: totag found
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_headers: flags=200
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: cseq <CSeq>: <101> <ACK>
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: content_length=0
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:get_hdr_field: found end of header
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:rr:find_first_route: No Route headers found
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:rr:loose_route: There is no Route HF
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:parse_headers: flags=78
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:tm:t_lookup_request: start searching: hash=58302, isACK=1
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:tm:t_lookup_request: proceeding to pre-RFC3261 transaction matching
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:tm:t_lookup_request: no transaction found
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:destroy_avp_list: destroying list (nil)
Dec  5 16:43:27 opensips /sbin/opensips[22218]: DBG:core:receive_msg: cleaning up
Dec  5 16:43:31 opensips /sbin/opensips[22222]: DBG:tm:utimer_routine: timer routine:7,tl=0xaf3edd20 next=(nil), timeout=323600000
Dec  5 16:43:31 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : reply resending (t=0xaf3edc58, SIP/2.0 4 ... )
Dec  5 16:43:31 opensips /sbin/opensips[22222]: DBG:tm:t_retransmit_reply: buf=0xb74345a0: SIP/2.0 4..., shmem=0xaf3efa90: SIP/2.0 4
Dec  5 16:43:31 opensips /sbin/opensips[22222]: DBG:tm:set_timer: relative timeout is 4000000
Dec  5 16:43:31 opensips /sbin/opensips[22222]: DBG:tm:insert_timer_unsafe: [7]: 0xaf3edd20 (327600000)
Dec  5 16:43:31 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : done
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_msg: SIP Request:
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_msg:  method:  <ACK>
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_msg:  uri:     <sip:00522375568@10.9.101.166:5060>
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_msg:  version: <SIP/2.0>
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=2
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_via: end of header reached, state=5
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_headers: via found, flags=2
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_headers: this is the first via
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:receive_msg: After parse_msg...
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:receive_msg: preparing to run routing scripts...
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:sl:sl_filter_ACK: to late to be a local ACK!
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:siptrace:sip_trace: nothing to trace...
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=100
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_to_param: tag=155c340f586c28d0300cf5a6ccf90d99-de38
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_to: end of header reached, state=29
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_to: display={}, ruri={sip:00522375568@10.9.101.166:5060}
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: <To> [77]; uri=[sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: to body [sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:maxfwd:is_maxfwd_present: value = 70
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:uri:has_totag: totag found
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=200
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: cseq <CSeq>: <101> <ACK>
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: content_length=0
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:get_hdr_field: found end of header
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:rr:find_first_route: No Route headers found
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:rr:loose_route: There is no Route HF
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:parse_headers: flags=78
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:tm:t_lookup_request: start searching: hash=58302, isACK=1
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:tm:t_lookup_request: proceeding to pre-RFC3261 transaction matching
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:tm:t_lookup_request: no transaction found
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:destroy_avp_list: destroying list (nil)
Dec  5 16:43:31 opensips /sbin/opensips[22217]: DBG:core:receive_msg: cleaning up
Dec  5 16:43:35 opensips /sbin/opensips[22222]: DBG:tm:utimer_routine: timer routine:7,tl=0xaf3edd20 next=(nil), timeout=327600000
Dec  5 16:43:35 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : reply resending (t=0xaf3edc58, SIP/2.0 4 ... )
Dec  5 16:43:35 opensips /sbin/opensips[22222]: DBG:tm:t_retransmit_reply: buf=0xb74345a0: SIP/2.0 4..., shmem=0xaf3efa90: SIP/2.0 4
Dec  5 16:43:35 opensips /sbin/opensips[22222]: DBG:tm:set_timer: relative timeout is 4000000
Dec  5 16:43:35 opensips /sbin/opensips[22222]: DBG:tm:insert_timer_unsafe: [7]: 0xaf3edd20 (331600000)
Dec  5 16:43:35 opensips /sbin/opensips[22222]: DBG:tm:retransmission_handler: retransmission_handler : done
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_msg: SIP Request:
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_msg:  method:  <ACK>
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_msg:  uri:     <sip:00522375568@10.9.101.166:5060>
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_msg:  version: <SIP/2.0>
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_headers: flags=2
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_via: end of header reached, state=5
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_headers: via found, flags=2
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_headers: this is the first via
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:receive_msg: After parse_msg...
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:receive_msg: preparing to run routing scripts...
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:sl:sl_filter_ACK: to late to be a local ACK!
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:siptrace:sip_trace: nothing to trace...
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_headers: flags=100
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_to_param: tag=155c340f586c28d0300cf5a6ccf90d99-de38
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_to: end of header reached, state=29
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_to: display={}, ruri={sip:00522375568@10.9.101.166:5060}
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: <To> [77]; uri=[sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: to body [sip:00522375568@10.9.101.166:5060]
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:maxfwd:is_maxfwd_present: value = 70
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:uri:has_totag: totag found
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_headers: flags=200
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: cseq <CSeq>: <101> <ACK>
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: content_length=0
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:get_hdr_field: found end of header
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:rr:find_first_route: No Route headers found
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:rr:loose_route: There is no Route HF
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:parse_headers: flags=78
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:tm:t_lookup_request: start searching: hash=58302, isACK=1
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:tm:t_lookup_request: proceeding to pre-RFC3261 transaction matching
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:tm:t_lookup_request: no transaction found
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:destroy_avp_list: destroying list (nil)
Dec  5 16:43:35 opensips /sbin/opensips[22219]: DBG:core:receive_msg: cleaning up

So, no USERNAME nor DOMAIN match... but the avp_table is filled up:


opensipsctl avp list
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
Query: SELECT uuid,username,domain,attribute,type,value FROM usr_preferences ;
Dumping AVPs

+------+---------------+------------------+-----------+------+-------+
| uuid | username      | domain           | attribute | type | value |
+------+---------------+------------------+-----------+------+-------+
|      | +390522375507 | 172.16.52.7:5061 | Linea-LW  |    0 | y     |
+------+---------------+------------------+-----------+------+-------+


Can anyone help me?
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Bogdan-Andrei Iancu-2
In reply to this post by Spady#7
Hi Spandy,

Your script is a bit wrong, and the "if" for "avp_check" does not do
anything (there is no "then" or "else" branch),. Better try:

  if (avp_db_load("$fu/username","$avp(Linea-LW)"))
         {
                 xlog("L_DBG",
                 "AVP_DB_LOAD Invocato!!!!!!!!!!!!!!\n");
                 if (avp_check("$avp(Linea-LW)","eq/y/i")) {
                if ($rU=~"^sip:0[0-9]{11}@")
                  {
                xlog("L_DBG",
                  "URI modificato per FAX SEVER\n");
                  strip(1);
                  prefix("87019");
                rewritehostport("10.9.6.3:5060");
                          route(1);
                          exit;
                         }
                }
         }


At least the above code will take care of the RURI part.

Regards,
Bogdan

On 12/05/2011 05:09 PM, spady wrote:

> Hi Again, i am tryng to do, as sayd, my first script.
> I setted up the following:
>
>
>
>   if (avp_db_load("$fu/username","$avp(Linea-LW)"))
>          {
>                  xlog("L_DBG",
>                  "AVP_DB_LOAD Invocato!!!!!!!!!!!!!!\n");
>                  if (avp_check("$avp(Linea-LW)","eq/y/i"));
>                  if ($rU=~"^sip:0[0-9]{11}@")
>                  {
>                  xlog("L_DBG",
>                  "URI modificato per FAX SEVER\n");
>                  strip(1);
>                  prefix("87019");
>                  rewritehostport("10.9.6.3:5060");
>                  route(1);
>                  exit;
>                  }
>          }
>
> But it does not work.
>
> What's wrong?
> Thanks in advance
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Modify-To-s-field-and-forward-tp7040781p7063178.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Spady#7
Hi Bogdan, thank you for your reply and your time.

I did as you sayd and it worked in part.
I had to modify this statement  if ($rU=~"^sip:0[0-9]{11}@")    with if ($rU=~"^0[0-9]+")

I don't really understood why. I really thought that regex " ~"^sip:0[0-9]{11}@ " was correct.

Anyway, thank you for your advise.
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Spady#7
I am trying to improve my script:

Now I would like that if avp_check fails, Opensips simply rewrite host and port and keep ruri as recived.
I wrote the following but seems it's wrong....

if (avp_db_load("$fu/username","$avp(Linea-LW)"))
         {
                xlog("L_DBG",
                "AVP_DB_LOAD Invocato!!!!!!!!!!!!!!\n");
        if (avp_check("$avp(Linea-LW)","eq/lw/i"))
                {
                if ($rU=~"^0[0-9]+")
                        {
                                xlog("L_DBG",
                                "URI modificato per invio verso OXE\n");
                        strip(1);
                        prefix("87019");
                        rewritehostport("10.9.6.3:5060");
                        route(1);
                        exit;
                        }
                        else {
                                rewritehostport("10.9.6.3:5060");
                                route(1);
                                exit;

                                }
                }
        }          

Can you drive me into right way?
Regards          
Reply | Threaded
Open this post in threaded view
|

Re: Modify To:'s field and forward

Spady#7
Hi list, I would share with you all what i reached about my script. Hope this would be helpfull for someone of you.


        if (avp_db_load("$fu/username","$avp(ARS-OFS)"))
         {
        if (avp_check("$avp(ARS-OFS)","eq/lw-re/i"))
                {
                if ($rU=~"^0[0-9]+")
                        {
                        strip(1);
                        prefix("87019");
                        rewritehostport("10.9.6.3:5060");
                        route(1);
                        exit;
                        }
                 }
                  else
                      {
                         if (avp_check("$avp(ARS-OFS)","eq/lw-mo/i"))
                         {
                           if ($rU=~"^0[0-9]+")
                             {
                               strip(1);
                               prefix("87070");
                               rewritehostport("10.9.6.3:5060);
                               route(1);
                               exit;
                             }
                          }
                      }
          else {
                 rewritehostport("10.9.6.3:5060");
                 route(1);
                 exit;
                }

Thank you all for your help.
Regards