Hi,
This is my problem: I'm trying to implement a "hunt group" using t_on_failure directive and an external script. The script gets the current URI and return the next URI in the group. The problem is that after the second INVITE, SER adds some characters before the INVITE message, and some devices don't understand this "XX INVITES".
Has anyone done something similar? or had a similar poblem?
I'm using: OS: Redhat Linux 9 Kernel: 2.4.20-16.9 SER: ser 0.8.12 (i386/linux)
For testing I'm using a couple Cisco ATAs, according to the diagram:
______ Line 1 ---/ \ | | ATA1 |---| ____ _ _ _ _ ____ _ _ _ Line 2 ---______/ | / \ / / / / \ / \ / / / \ ______ |---| FW |---| IP Net |---| GW |---| PSTN | Line 3 ---/ \ | ____/ _/_/_/_/ ____/ _/_/_/ | ATA2 |---| | | | Line 4 ---______/ | | | | | | | --- --- --- / \ / \ / O \ |NAT| |SER| /_\ |-T | | | ___/ ___/ Phone
My config file is attached to this mail.
Next is a signaling diagram of a failed call. Lines 1 and 2 of the above diagram were busy at the time of this trace. The malformed INVITEs are shown as "XX INVITE".
Gateway SER NAT-T ATA1 ATA2 X.X.81.67 X.X.81.94 X.X.81.92 Y.Y.1.2 Y.Y.1.3 | | | | | |-- INVITE -------->| | | | |<-- trying --------| | | | | |-- INVITE -------->| | | | |<-- Trying --------| | | | | |-- INVITE -------->| | | | |<-- Trying --------| | | | |<-- Busy ----------| | | |<-- Busy ----------| | | | |-- ACK ----------->| | | | | |-- ACK ----------->| | | |-- INVITE -------->| | | | |<-- Trying --------| | | | | |-- INVITE -------->| | | | |<-- Trying --------| | | | |<-- Busy ----------| | | |<-- Busy ----------| | | | |-- ACK ----------->| | | | | |-- ACK ----------->| | | |-- XX INVITE ----->| | | | |<-- Trying --------| | | | | |-- XX INVITE ------------->| | | |-- XX INVITE ------------->| | | |-- XX INVITE ------------->| | | |-- XX INVITE ------------->| | | |-- XX INVITE ------------->| | |<-- Req. Timeout --| | | | | |-- CANCEL ---------------->| | |-- ACK ----------->| | | | | |-- ACK ------------------->| | | |<-- 481 CL/TDNE -----------| | |<-- 481 CL/TDNE ---| | | | |-- XX INVITE ----->| | | | | |-- XX INVITE ------------->| | |-- XX INVITE ----->| | | | | |-- XX INVITE ------------->| | | |<-- Trying ----------------| | |<-- Trying --------| | | | | |<-- Trying ----------------| | |<-- Trying --------| | | |-- CANCEL -------->| | | | |<-- cancelling ----| | | | |<- Req. Candelled -| | | | |-- ACK ----------->| | | | | |-- CANCEL -------->| | | | | |-- CANCEL ---------------->| | |-- CANCEL -------->| | | | | |-- CANCEL ---------------->| | | |<-- 481 CL/TDNE -----------| | |<-- 481 CL/TDNE ---| | |
Following I pasted the INVITE messages. Those were taken using ngrep.
The malformed INVITE looks like: (notice the extra spaces ath the begining)
# U X.X.81.94:5060 -> X.X.81.92:5063 31525@0:1480
.`INVITE sip:5559853977*sip.mcm.net.mx=200.52.71.2+24225@X.X.81.92:5063 SIP/2.0 Record-Route: sip:5559853977@X.X.81.94;ftag=5D03E50C-1912;lr Record-Route: sip:5559853979@X.X.81.94;ftag=5D03E50C-1912;lr Record-Route: sip:5559853978@X.X.81.94;ftag=5D03E50C-1912;lr Via: SIP/2.0/UDP X.X.81.94;branch=z9hG4bKf78b.baa0d9c3.0 Via: SIP/2.0/UDP X.X.81.94;branch=z9hG4bKf78b.aaa0d9c3.1 Via: SIP/2.0/UDP X.X.81.94;branch=z9hG4bKf78b.9aa0d9c3.1 Via: SIP/2.0/UDP X.X.81.67:5060 From: sip:5553500000@X.X.81.67;tag=5D03E50C-1912 To: sip:5559853978@X.X.81.94 Date: Thu, 27 Apr 2000 11:34:27 GMT Call-ID: 9F4D4C1D-1B6611D4-BFD5E894-B9E38BE3@X.X.81.67 Supported: timer,100rel Min-SE: 1800 Cisco-Guid: 2672603125-459674068-3218270356-3118697443 User-Agent: Cisco-SIPGateway/IOS-12.x Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK,COMET, REFER, SUBSCRIBE, NOTIFY, INFO CSeq: 101 INVITE Max-Forwards: 3 Remote-Party-ID: sip:5553500000@X.X.81.67;party=calling;screen=yes;privacy=off Timestamp: 956835267 Contact: sip:5553500000@X.X.81.67:5060 Expires: 180 Allow-Events: telephone-event Content-Type: application/sdp Content-Length: 324
v=0 o=CiscoSystemsSIP-GW-UserAgent 8289 4267 IN IP4 X.X.81.67 s=SIP Call c=IN IP4 X.X.81.67 t=0 0 m=audio 18280 RTP/AVP 8 0 18 100 19 c=IN IP4 X.X.81.67 a=rtpmap:8 PCMA/8000 a=rtpmap:0PCMU/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=yes a=rtpmap:100 X-N
While the first INVITE looks like: # U X.X.81.67:56763 -> X.X.81.94:5060
INVITE sip:5559853978@X.X.81.94:5060 SIP/2.0 Via: SIP/2.0/UDP X.X.81.67:5060 From: sip:5553500000@X.X.81.67;tag=5D03A270-1598 To: sip:5559853978@X.X.81.94 Date: Thu, 27 Apr 2000 11:34:10 GMT Call-ID: 9523FA8C-1B6611D4-BFC2E894-B9E38BE3@X.X.81.67 Supported: timer,100rel Min-SE: 1800 Cisco-Guid: 2502123108-459674068-3217025172-3118697443 User-Agent: Cisco-SIPGateway/IOS-12.x Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO CSeq: 101 INVITE Max-Forwards: 6 Remote-Party-ID: sip:5553500000@X.X.81.67;party=calling;screen=yes;privacy=off Timestamp: 956835250 Contact: sip:5553500000@X.X.81.67:5060 Expires: 180 Allow-Events: telephone-event Content-Type: application/sdp Content-Length: 324
v=0 o=CiscoSystemsSIP-GW-UserAgent 8099 5647 IN IP4 X.X.81.67 s=SIP Call c=IN IP4 X.X.81.67 t=0 0 m=audio 17162 RTP/AVP 8 0 18 100 19 c=IN IP4 X.X.81.67 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=yes a=rtpmap:100 X-NSE/8000 a=fmtp:100 192-194 a=rtpmap:19 CN/8000
Jesus