Asterisk vs. Mercury Instruments

Hi there,

we’ve changed our PABX by Asterisk recently.
It’s is working for phone calls, fax and all these phone’s stuff.

But, we have a gas measurer from Mercury Instruments sending data through a analogic line. http://www.mercury-instruments.com/en-Mercury_Instruments_Products_UT_3000.html
When we try to get data through Asterisk, the Mercury Instruments Software (called MasterLink32) closes the connection due data errors.

We sniffed the serial port and we realized when connected through Asterisk, there are some “trash” in data packets witch are read by the software.

We (already) tried to force codec ulaw on the ATA, sip.conf and our external board (Khomp EBS-E1 SPX).

If someone could help we’ll be greatfull.

If you’re running E1, you want alaw, not ulaw.

I’ve tried with alaw (and ulaw, gsm, g729…) but it doesn’t work.
Maybe the codec is NOT the problem …

Neither gsm nor g.729 will work with modems.

david55, thanks.
When I tried ulaw and alaw the connection has been established but data transmission still doesn’t work.

Sip log:

[code]<------------->
— (10 headers 0 lines) —
asterisk-server*CLI>
<— SIP read from UDP:172.#.#.#
INVITE sip:0YYYY-YYYY@172.#.#.#
Via: SIP/2.0/UDP 172.#.#.#
From: “3904” <sip:3904@172.#.#.#
To: <sip:0YYYY-YYYY@172.#.#.#
Remote-Party-ID: “3904” <sip:3904@172.#.#.#
Call-ID: 251aef42-c64d3a09@172.#.#.#
CSeq: 102 INVITE
Max-Forwards: 70
Authorization: Digest username=“3904”,realm=“asterisk”,nonce=“731785ae”,uri="sip:0YYYY-YYYY@172.#.#.#
Contact: “3904” <sip:3904@172.#.#.#
Expires: 240
User-Agent: Cisco/SPA112-1.0.2(006)
Content-Length: 329
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp

v=0
o=- 64996 64996 IN IP4 172.#.#.#
s=-
c=IN IP4 172.#.#.#
t=0 0
m=audio 16404 RTP/AVP 0 2 8 18 100 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729a/8000
a=rtpmap:100 NSE/8000
a=fmtp:100 192-193
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv

<------------->
— (16 headers 16 lines) —
Sending to 172.#.#.#
Using INVITE request as basis request - 251aef42-c64d3a09@172.#.#.#
Found peer ‘3904’ for ‘3904’ from 172.#.#.#
Found RTP audio format 0
Found RTP audio format 2
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 100
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format G726-32 for ID 2
Found audio description format PCMA for ID 8
Found audio description format G729a for ID 18
Found audio description format NSE for ID 100
Found audio description format telephone-event for ID 101
Capabilities: us - 0x4 (ulaw), peer - audio=0x90c (ulaw|alaw|g726|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 172.#.#.#
Looking for 0YYYY-YYYY in default (domain 172.#.#.#
list_route: hop: <sip:3904@172.#.#.#
asterisk-server*CLI>
<— Transmitting (no NAT) to 172.#.#.#
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.#.#.#
From: “3904” <sip:3904@172.#.#.#
To: <sip:0YYYY-YYYY@172.#.#.#
Call-ID: 251aef42-c64d3a09@172.#.#.#
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:0YYYY-YYYY@172.#.#.#
Content-Length: 0

<------------>
– Executing [0YYYY-YYYY@default:1] Dial(“SIP/3904-00000007”, “Khomp/b0L0/YYYY-YYYY,90”) in new stack
– Called b0L0/YYYY-YYYY
– Khomp/B0C0-0.0 is ringing
asterisk-server*CLI>
<— Transmitting (no NAT) to 172.#.#.#
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 172.#.#.#
From: “3904” <sip:3904@172.#.#.#
To: <sip:0YYYY-YYYY@172.#.#.#
Call-ID: 251aef42-c64d3a09@172.#.#.#
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:0YYYY-YYYY@172.#.#.#
Content-Length: 0

<------------>
– Khomp/B0C0-0.0 is making progress passing it to SIP/3904-00000007
Audio is at 172.#.#.#
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Transmitting (no NAT) to 172.#.#.#
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 172.#.#.#
From: “3904” <sip:3904@172.#.#.#
To: <sip:0YYYY-YYYY@172.#.#.#
Call-ID: 251aef42-c64d3a09@172.#.#.#
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:0YYYY-YYYY@172.#.#.#
Content-Type: application/sdp
Content-Length: 261

v=0
o=root 1608850785 1608850785 IN IP4 172.#.#.#
s=Asterisk PBX 1.6.2.6
c=IN IP4 172.#.#.#
t=0 0
m=audio 14152 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
– Khomp/B0C0-0.0 answered SIP/3904-00000007
Audio is at 172.#.#.#
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (no NAT) to 172.#.#.#
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.#.#.#
From: “3904” <sip:3904@172.#.#.#
To: <sip:0YYYY-YYYY@172.#.#.#
Call-ID: 251aef42-c64d3a09@172.#.#.#
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:0YYYY-YYYY@172.#.#.#
Content-Type: application/sdp
Content-Length: 261

v=0
o=root 1608850785 1608850786 IN IP4 172.#.#.#
s=Asterisk PBX 1.6.2.6
c=IN IP4 172.#.#.#
t=0 0
m=audio 14152 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
asterisk-server*CLI>
<— SIP read from UDP:172.#.#.#
ACK sip:0YYYY-YYYY@172.#.#.#
Via: SIP/2.0/UDP 172.#.#.#
From: “3904” <sip:3904@172.#.#.#
To: <sip:0YYYY-YYYY@172.#.#.#
Call-ID: 251aef42-c64d3a09@172.#.#.#
CSeq: 102 ACK
Max-Forwards: 70
Authorization: Digest username=“3904”,realm=“asterisk”,nonce=“731785ae”,uri="sip:0YYYY-YYYY@172.#.#.#
Contact: “3904” <sip:3904@172.#.#.#
User-Agent: Cisco/SPA112-1.0.2(006)
Content-Length: 0

<------------->
— (11 headers 0 lines) —
[13-03-11 14:08:11] chan_khomp: <EV_LINK_STATUS> (d=00,l=000).
[13-03-11 14:08:31] chan_khomp: <EV_LINK_STATUS> (d=00,l=000).
Reliably Transmitting (no NAT) to 172.#.#.#
OPTIONS sip:3904@172.#.#.#
Via: SIP/2.0/UDP 172.#.#.#
Max-Forwards: 70
From: “asterisk” <sip:asterisk@172.#.#.#
To: <sip:3904@172.#.#.#
Contact: <sip:asterisk@172.#.#.#
Call-ID: 1e110083006d94152ac72453188b312e@172.#.#.#
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.6
Date: Mon, 11 Mar 2013 17:08:34 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


asterisk-server*CLI>
<— SIP read from UDP:172.#.#.#
SIP/2.0 486 Busy Here
To: <sip:3904@172.#.#.#
From: “asterisk” <sip:asterisk@172.#.#.#
Call-ID: 1e110083006d94152ac72453188b312e@172.#.#.#
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 172.#.#.#
Server: Cisco/SPA112-1.0.2(006)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces

<------------->
— (10 headers 0 lines) —
Really destroying SIP dialog '1e110083006d94152ac72453188b312e@172.#.#.#
[13-03-11 14:08:46] chan_khomp: <EV_LINK_STATUS> (d=00,l=000).
asterisk-server*CLI>
<— SIP read from UDP:172.#.#.#
BYE sip:0YYYY-YYYY@172.#.#.#
Via: SIP/2.0/UDP 172.#.#.#
From: “3904” <sip:3904@172.#.#.#
To: <sip:0YYYY-YYYY@172.#.#.#
Call-ID: 251aef42-c64d3a09@172.#.#.#
CSeq: 103 BYE
Max-Forwards: 70
Authorization: Digest username=“3904”,realm=“asterisk”,nonce=“731785ae”,uri="sip:0YYYY-YYYY@172.#.#.#
User-Agent: Cisco/SPA112-1.0.2(006)
P-RTP-Stat: PS=2219,OS=355040,PR=2221,OR=355360,PL=0,JI=0,LA=0,DU=44,EN=G711u,DE=G711u
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Sending to 172.#.#.#
asterisk-server*CLI>
<— Transmitting (no NAT) to 172.#.#.#
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.#.#.#
From: “3904” <sip:3904@172.#.#.#
To: <sip:0YYYY-YYYY@172.#.#.#
Call-ID: 251aef42-c64d3a09@172.#.#.#
CSeq: 103 BYE
Server: Asterisk PBX 1.6.2.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

<------------>
== Spawn extension (default, 0YYYY-YYYY, 1) exited non-zero on 'SIP/3904-00000007’
Really destroying SIP dialog '251aef42-c64d3a09@172.#.#.#
[13-03-11 14:09:06] chan_khomp: <EV_LINK_STATUS> (d=00,l=000).
Reliably Transmitting (no NAT) to 172.#.#.#
OPTIONS sip:3904@172.#.#.#
Via: SIP/2.0/UDP 172.#.#.#
Max-Forwards: 70
From: “asterisk” <sip:asterisk@172.#.#.#
To: <sip:3904@172.#.#.#
Contact: <sip:asterisk@172.#.#.#
Call-ID: 38e8d42936827cd10f0c62b72ee9c8d6@172.#.#.#
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.6
Date: Mon, 11 Mar 2013 17:09:34 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


asterisk-server*CLI>
<— SIP read from UDP:172.#.#.#
SIP/2.0 200 OK
To: <sip:3904@172.#.#.#
From: “asterisk” <sip:asterisk@172.#.#.#
Call-ID: 38e8d42936827cd10f0c62b72ee9c8d6@172.#.#.#
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 172.#.#.#
Server: Cisco/SPA112-1.0.2(006)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces

<------------->
— (10 headers 0 lines) —
Really destroying SIP dialog '38e8d42936827cd10f0c62b72ee9c8d6@172.#.#.#
[13-03-11 14:09:46] chan_khomp: <EV_LINK_STATUS> (d=00,l=000).
[/code]

*0YYYYYYYY is the number I’m calling
**172.#.#.# are IPs from our network