[Asterisk-Users] Strange Sip (FWD, SipGate and such) problem

Karl Brose khb at brose.com
Wed May 19 14:23:04 MST 2004


I think when you have this setup you need to keep the media path going 
through Asterisk at all times.
Your SIP is binding to both ports, internal and external, but that 
doesn't correctly set it up for either scenario, localnet calls and 
external calls. It won't keep the addresses straight for the RTP channels.
Try setting CANREINVITE=NO for peers (FWD,..) and for your local SIP 
phones. When a channel is created in asterisk the media path is going 
through Asterisk, but during a call the endpoints can issue reinvites 
which switches the media path directly between the endpoints. You need 
to prevent that.
Other solutions are to run IAX to/from FWD and SIP locally, or SIP to 
the external peers and IAX to a local IAX phone (or another protocol).
Or you should be able to create your own NAT using the iptables and bind 
asterisk only on one port either outside or inside and set the right 
corresponding parameters. The RTP will still bind on all ports 
currently, but that will be fixed in a matter of days.

Also, sipgate.net should be sipgate.de (works ok though since they don't 
care)
fromdomain is meant to be realm not a hostname.


Thomas Gallaway wrote:

> Hi all
>
> I use sipgate and FWD but seem not to get it going. I do not have NAT 
> on the asterisk box (static ip).
> The asterisk box has 2 network interfaces. One internal and one external.
>
> Now when I make an call to a FWD or SipGate number all I get is
>    -- Executing NoOp("SIP/113-6d2e", "") in new stack
>    -- Executing Goto("SIP/113-6d2e", "intern-post|714551|1") in new stack
>    -- Goto (intern-post,714551,1)
>    -- Executing SetCallerID("SIP/113-6d2e", "270002") in new stack
>    -- Executing SetCIDName("SIP/113-6d2e", "Thomas Gallaway") in new 
> stack
>    -- Executing Dial("SIP/113-6d2e", "SIP/14551 at fwd270002") in new stack
>    -- Called 14551 at fwd270002
>    -- SIP/fwd270002-6ee7 answered SIP/113-6d2e
>    -- Attempting native bridge of SIP/113-6d2e and SIP/fwd270002-6ee7
>  == Spawn extension (intern-post, 714551, 3) exited non-zero on 
> 'SIP/113-6d2e'
>
> But either I get 1/2 second of audio or no audio. No matter how long I 
> wait there is just no audio or just a short snippet of audio at the 
> beginning.
>
> Here is parts of my sip.conf;
> [general]
> port = 5060                     ; Port to bind to
> localnet = 192.168.1.0         ; Internal NETWORK address
> localmask = 255.255.255.0      ; Internal netmask
> externip = 206.40.161.235
> context = intern                ; Default for incoming calls
> maxexpirey=3600
> defaultexpirey=300
> disallow=all                    ; Disallow all codecsa
> allow=gsm
> allow=alaw
> allow=ulaw
> tos=reliability
> register => xxx:xxx at sipgate.de/150
> register => xxx:xxx at fwd.pulver.com/151
>
>
> [sipgate1]
> type=friend
> username=xxx
> secret=xxx
> host=sipgate.de
> fromuser=xxx
> fromdomain=sipgate.net
> nat=no
> context=incoming-sipgate
> canreinvite=yes
>
> [fwd270002]
> allow=ulaw
> type=friend
> context=incoming-fwd
> secret=xxx
> username=xxx
> host=fwd.pulver.com
>
> Any ideas?
> When I put nat=yes I actually will get 1 second of audio, then it dies.
> I have been googling for a while now and not seem to find any 
> sollution to this.
>
> -- Thomas
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list