Outbound SIP Issues


#1

Hey Guys,

Have a really odd issue.

So I’m given a VoIP connection that runs over SIP with my internet connection. I’ve got the following details:

Username: +617388994xx
Password: secret=d4Vxxxxx
Host: ims01.ipphone.optus.com.au
Proxy: 210.49.225.100

So if i take this directly to X-Lite (Softphone) it works fine and connections in and out are perfect.

When I add the following to asterisk, I get inbound calls fine, but calling out has a blank line for about 3 seconds and then places it on hold.

The trunk settings i have are as follows:

type=peer
secret=d4Vxxxxx
username=+617388994xx
fromuser=+617388994xx
fromdomain=ims01.ipphone.optus.com.au
host=ims01.ipphone.optus.com.au
usereqphone=yes
call-limit=5
outboundproxy=210.49.225.100
disallow=all
allow=g729
insecure=invite,port
qualify=yes
context=from-pstn-toheader

Any ideas on what the problem is?

Thanks,
Matt


#2

The proxy sounds like an inbound proxy of the ITSP, not an outbound one.

Going on hold is strange. You definitely need to provide the protocol logs.

Why do you have insecure=port?


#3

Hey David,

Sorry I’m pretty new to this.

So what’s the best way to define an inbound proxy?

Would I be correct in saying that 210.49.225.100 is an edge proxy and ims01.ipphone.optus.com.au is within their internal network, hence the lack of public DNS entry.

My registration string seems to work fine, as well as inbound, but the outbound is another story.

Any help on this would be awesome!


#4

You still need to provide the logs.

I think there is too much variability in remote inbound proxies, and I don’t have enough experience of them, for me to really answer the question, and your hold symptom is strange.

In the more common cases, you treat the proxy as thought it was the server, and define additional peers for incoming calls from the addresses of all the real servers behind the proxy, but I’m not convinced that is right in your case.


#5

Here is the packet header for the invite from the softphone with direct host specified

Frame 1: 1025 bytes on wire (8200 bits), 1025 bytes captured (8200 bits)
Ethernet II, Src: Microsof_32:89:04 (00:15:5d:32:89:04), Dst: Microsof_32:74:01 (00:15:5d:32:74:01)
Internet Protocol Version 4, Src: 192.168.50.30, Dst: 210.49.225.100
0100 … = Version: 4
… 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0xa0 (DSCP: CS5, ECN: Not-ECT)
Total Length: 1011
Identification: 0x6337 (25399)
Flags: 0x00
Fragment offset: 0
Time to live: 128
Protocol: UDP (17)
Header checksum: 0x0000 [validation disabled]
[Header checksum status: Unverified]
Source: 192.168.50.30
Destination: 210.49.225.100
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
User Datagram Protocol, Src Port: 52766, Dst Port: 5060
Source Port: 52766
Destination Port: 5060
Length: 991
Checksum: 0xaa4d [unverified]
[Checksum Status: Unverified]
[Stream index: 0]
Session Initiation Protocol (INVITE)
Request-Line: INVITE sip:042085xxxx@ims01.ipphone.optus.com.au SIP/2.0
Method: INVITE
Request-URI: sip:042085xxxx@ims01.ipphone.optus.com.au
Request-URI User Part: 042085xxxx
Request-URI Host Part: ims01.ipphone.optus.com.au
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 192.168.50.30:52766;branch=z9hG4bK-524287-1—01f1226ea797381c;rport
Max-Forwards: 70
Contact: sip:+6173889xxxx@outbound_ip:64317;transport=tcp;rinstance=4b6757b43647dde5
To: sip:0420858871@ims01.ipphone.optus.com.au
SIP to address: sip:0420858871@ims01.ipphone.optus.com.au
SIP to address User Part: 042085xxxx
SIP to address Host Part: ims01.ipphone.optus.com.au
From: sip:+6173889xxxx@ims01.ipphone.optus.com.au;tag=07eeca07
SIP from address: sip:+6173889xxxx@ims01.ipphone.optus.com.au
SIP from address User Part: +6173889xxxx
E.164 number (MSISDN): 6173889xxxx
SIP from address Host Part: ims01.ipphone.optus.com.au
SIP from tag: 07eeca07
Call-ID: 84253MjMzNTY1YzE5YzQyYWJkMTYwZmVjZmEzZWI2Njg3ODU
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.8 stamp 84253
Content-Length: 336
Message Body

You can then see that the sip invite is different from asterisk with the following trunk settings

– Called SIP/optus/042085xxxx
Retransmitting #1 (no NAT) to 210.49.225.100:5060:
INVITE sip:042085xxxx@210.49.225.100 SIP/2.0
Via: SIP/2.0/UDP outbound_ip:5060;branch=z9hG4bK07456467
Max-Forwards: 70
From: “+6173889xxxx” sip:+6173889xxxx@ims01.ipphone.optus.com.au;tag=as4e7fe49 d
To: sip:042085xxxx@210.49.225.100
Contact: sip:+6173889xxxx@outbound_ip:5060
Call-ID: 194d5f1d758e73a84c27ac7559e5b780@ims01.ipphone.optus.com.au
CSeq: 102 INVITE
User-Agent: FPBX-2.10.1(1.8.19.1)
Date: Sun, 16 Jul 2017 15:04:44 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS H
Supported: replaces, timer
Remote-Party-ID: “+617388xxxx” sip:+6173889xxxx@ims01.ipphone.optus.com.au;pa rty=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 306

v=0
o=root 79054921 79054921 IN IP4 outbound_ip
s=Asterisk PBX 1.8.19.1
c=IN IP4 outbound_ip
t=0 0
m=audio 21682 RTP/AVP 0 18 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


You can see that the requests go to the actual end host with the destination being the proxy.

Though when i try to accomplish this with asterisk I get DNS errors, naturally as the DNS is not publicly listed.

This has had me stumped for a good 3 days too, so I hope this isn’t a rookie error :confused:


#6

Define the address in /etc/hosts.


#7

Hey David, trying to wrap my head around this one.

From my understanding I wouldn’t be able to define a host entry as I don’t know the IP for that domain as it would be internal at the ITSP, correct?


#8

I got it to work my defining ims01.ipphone.optus.com.au as the proxy IP