Discussion:
[Asterisk-Users] Dial via sip gateway?
Rich Adamson
2004-02-01 02:39:55 UTC
Permalink
I'm having a brain fart....

What's the proper syntax for dialing out via a sip g/w (Mediatrix)?

Been trying stuff similar to:
exten => _6X.,1,Dial(SIP/***@205.22.93.1/${EXTEN-1})
where 3091 is alias for the port on the Mediatrix. Sniffer indicates * did
even try the IP.

Rich
Greg Hill
2004-02-01 03:56:41 UTC
Permalink
Post by Rich Adamson
I'm having a brain fart....
What's the proper syntax for dialing out via a sip g/w (Mediatrix)?
where 3091 is alias for the port on the Mediatrix. Sniffer indicates * did
even try the IP.
should you say ${EXTEN:1} rather than ${EXTEN-1} to drop that 6 off the
front of the extension?

Greg
Bob Knight
2004-02-01 04:22:01 UTC
Permalink
Post by Rich Adamson
I'm having a brain fart....
What's the proper syntax for dialing out via a sip g/w (Mediatrix)?
where 3091 is alias for the port on the Mediatrix. Sniffer indicates * did
even try the IP.
Rich
from my extensions.conf:

;******************************************************
[trunk-local]
;******************************************************
exten => _9NXXXXXX,1,Dial(SIP/${EXTEN:1}@mediatrix-1204)
exten => _9NXXXXXX,2,Congestion

[trunk-toll]
exten => _91NXXNXXXXXX,1,Dial(SIP/${EXTEN:1}@mediatrix-1204)
exten => _91NXXNXXXXXX,2,Congestion
--
Bob Knight
[-w] the work option
***@minusw.com
925-449-9163
Mike Machado
2004-02-01 05:53:16 UTC
Permalink
Bob, I have a question into mediatrix for this, but maybe you have
figured it out. I am trying to map a SIP user to a specific PSTN line. I
have my extensions.conf file as you show below, but on the 1204, it just
grabs whatever line is available, whereas I want extension 101 to always
be port1 on 1204, and extension 102 to be port 2 and so on. I noticed a
NetToPstnSourceFilter MIB per port, and their docs hint at using this,
but the example in the docs describes their FXS to FXO, so I am not sure
what I would put in that MIB. CallerID info? * calling sip extension
number? Have you been able to make this work?
Post by Bob Knight
Post by Rich Adamson
I'm having a brain fart....
What's the proper syntax for dialing out via a sip g/w (Mediatrix)?
where 3091 is alias for the port on the Mediatrix. Sniffer indicates * did
even try the IP.
Rich
;******************************************************
[trunk-local]
;******************************************************
exten => _9NXXXXXX,2,Congestion
[trunk-toll]
exten => _91NXXNXXXXXX,2,Congestion
--
Rich Adamson
2004-02-01 13:00:26 UTC
Permalink
Mike,
I'm hoping one can specify a particular mediatrix "port" in the Dial Sip
command, but haven't found any Dial syntax that would allow passing a
userid/password to the gateway. Since the 1204 provides a AuthUsrPwd on
a per port basis, my guess would be that we either have to pass the Alias
defined for that port or the AuthUsrPwd in the Dial command.

When I attempt
exten => _9NXXXXXX,1,Dial(SIP/${EXTEN:1}@205.22.93.1)
I get an immediate "407 Proxy Authentication Required" back. However, with
a packet sniffer running, * isn't even sending a packet to the mediatrix.
I'd have to guess and assume * is doing this because the mediatrix isn't
'registered' with *, but the mediatrix was not designed to register anyway.

I'm stuck in the Dial syntax, and can't seem to find any google reference
as to how to pass the needed parameters.

Rich

------------------------
Post by Mike Machado
Bob, I have a question into mediatrix for this, but maybe you have
figured it out. I am trying to map a SIP user to a specific PSTN line. I
have my extensions.conf file as you show below, but on the 1204, it just
grabs whatever line is available, whereas I want extension 101 to always
be port1 on 1204, and extension 102 to be port 2 and so on. I noticed a
NetToPstnSourceFilter MIB per port, and their docs hint at using this,
but the example in the docs describes their FXS to FXO, so I am not sure
what I would put in that MIB. CallerID info? * calling sip extension
number? Have you been able to make this work?
Post by Bob Knight
Post by Rich Adamson
I'm having a brain fart....
What's the proper syntax for dialing out via a sip g/w (Mediatrix)?
where 3091 is alias for the port on the Mediatrix. Sniffer indicates * did
even try the IP.
Rich
;******************************************************
[trunk-local]
;******************************************************
exten => _9NXXXXXX,2,Congestion
[trunk-toll]
exten => _91NXXNXXXXXX,2,Congestion
--
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
http://lists.digium.com/mailman/listinfo/asterisk-users
---------------End of Original Message-----------------
Rich Adamson
2004-02-01 13:36:58 UTC
Permalink
Post by Bob Knight
Post by Rich Adamson
What's the proper syntax for dialing out via a sip g/w (Mediatrix)?
where 3091 is alias for the port on the Mediatrix. Sniffer indicates * did
even try the IP.
Rich
;******************************************************
[trunk-local]
;******************************************************
The above does not seem to work either. Since the mediatrix has four pstn
ports, there must be a way to construct a Dial command that would embed
a userid:password, port alias name, or something like that. Just can't find
any reference to what that syntax would look like. (The gateway is properly
handling incoming pstn calls, just not the outgoing pstn attempts.)

Really need to the sip dial command to include...
- the string of digits to be called
- either a userid:password, or, port alias name (or both)
- ip address of the gateway

Anybody have a clue what that dial sip syntax would look like????

Rich
Olle E. Johansson
2004-02-01 14:02:33 UTC
Permalink
Post by Rich Adamson
Post by Bob Knight
Post by Rich Adamson
What's the proper syntax for dialing out via a sip g/w (Mediatrix)?
where 3091 is alias for the port on the Mediatrix. Sniffer indicates * did
even try the IP.
Rich
;******************************************************
[trunk-local]
;******************************************************
The above does not seem to work either. Since the mediatrix has four pstn
ports, there must be a way to construct a Dial command that would embed
a userid:password, port alias name, or something like that. Just can't find
any reference to what that syntax would look like. (The gateway is properly
handling incoming pstn calls, just not the outgoing pstn attempts.)
Really need to the sip dial command to include...
- the string of digits to be called
- either a userid:password, or, port alias name (or both)
- ip address of the gateway
Anybody have a clue what that dial sip syntax would look like????
Yes, it's
SIP/***@host
There's no 'sub-extension'.

So SIP/***@mediatrix is the proper way to go, where extension is
the string of digits to be called. If the box acts as a SIP proxy, you
might need to register with a register=> in sip.conf beforehand.

This is like calling any FWD extension. First, register, then place
a call with
DIAL(SIP/fwd-***@fwd.pulver.com)

Any pointer to the manual?

/O
Rich Adamson
2004-02-01 14:21:55 UTC
Permalink
Post by Olle E. Johansson
Post by Rich Adamson
Post by Bob Knight
Post by Rich Adamson
What's the proper syntax for dialing out via a sip g/w (Mediatrix)?
where 3091 is alias for the port on the Mediatrix. Sniffer indicates * did
even try the IP.
Rich
;******************************************************
[trunk-local]
;******************************************************
The above does not seem to work either. Since the mediatrix has four pstn
ports, there must be a way to construct a Dial command that would embed
a userid:password, port alias name, or something like that. Just can't find
any reference to what that syntax would look like. (The gateway is properly
handling incoming pstn calls, just not the outgoing pstn attempts.)
Really need to the sip dial command to include...
- the string of digits to be called
- either a userid:password, or, port alias name (or both)
- ip address of the gateway
Anybody have a clue what that dial sip syntax would look like????
Yes, it's
There's no 'sub-extension'.
the string of digits to be called. If the box acts as a SIP proxy, you
might need to register with a register=> in sip.conf beforehand.
This is like calling any FWD extension. First, register, then place
a call with
Any pointer to the manual?
No, the manual is very verbose but no * examples at all. The box sells as
either a 323 or sip, with different images (sort of like C7960's) and
different manuals.

The box does not support the "register" function in either direction. I just
tried the * sip register, and got a "501 Not Implemented" with sniffer.
Grzegorz Nosek
2004-02-01 21:10:37 UTC
Permalink
On Sun, 1 Feb 2004 08:21:55 -0600, Rich Adamson wrote

[long snip]
Post by Rich Adamson
No, the manual is very verbose but no * examples at all. The
box sells as either a 323 or sip, with different images
(sort of like C7960's) and different manuals.
The box does not support the "register" function in either
direction. I just tried the * sip register, and got a "501
Not Implemented" with sniffer.
Rich Adamson
2004-02-01 22:50:46 UTC
Permalink
Greg Hill
2004-02-01 19:41:57 UTC
Permalink
Post by Rich Adamson
The above does not seem to work either. Since the mediatrix has four pstn
ports, there must be a way to construct a Dial command that would embed
a userid:password, port alias name, or something like that. Just can't find
any reference to what that syntax would look like. (The gateway is properly
handling incoming pstn calls, just not the outgoing pstn attempts.)
Really need to the sip dial command to include...
- the string of digits to be called
- either a userid:password, or, port alias name (or both)
- ip address of the gateway
Anybody have a clue what that dial sip syntax would look like????
I have only recently begun actually playing with *, but I'll venture a
guess.. You (or somebody else) mentioned that you can force a call to go
out a particular port on the Mediatrix by using the username/password pair
which corresponds to that port, and this guess is based on that
assumption. (I hope it's a valid assumption!)

At http://www.voip-info.org/wiki-Asterisk+SIP+channels, under "Using a SIP
channel in extensions.conf," we read that the dial string format is either
SIP/<exten>@<peer> or SIP/peer/exten. <peer> may be a hostname of a SIP
proxy server, a domain where * should look for a SRV record, or a service
defined in sip.conf.

So try something like this in extensions.conf:
exten => 101,1,Dial(SIP/<number>@mediatrixport1)
exten => 102,1,Dial(SIP/<number>@mediatrixport2)
exten => 103,1,Dial(SIP/<number>@mediatrixport3)
exten => 104,1,Dial(SIP/<number>@mediatrixport4)

and then define those services in sip.conf:
[mediatrixport1]
username=<username for access to port1>
password=
host=<mediatrix IP/name>

[mediatrixport2]
username=<username for access to port2>
password=
host=<same mediatrix IP/name>

and so on for ports 3 and 4. I think a setup like this will allow you to
use distinct username/password pairs for connections to the same SIP
proxy.

Greg
Greg Hill
2004-02-01 19:48:57 UTC
Permalink
On Sun, 1 Feb 2004, Greg Hill wrote:
<snip>
Oops, maybe I should have written these extensions to be more like this:
exten => _9NXXXXXX,1,Dial(SIP/${EXTEN:1}@mediatrixport1)
exten => _8NXXXXXX,1,Dial(SIP/${EXTEN:1}@mediatrixport2)
exten => _7NXXXXXX,1,Dial(SIP/${EXTEN:1}@mediatrixport3)
exten => _6NXXXXXX,1,Dial(SIP/${EXTEN:1}@mediatrixport4)

so that you can choose which port you'll dial out on by prefixing your
number with 9/8/7/6.

Greg
Rich Adamson
2004-02-01 20:14:12 UTC
Permalink
Greg,
Post by Greg Hill
so that you can choose which port you'll dial out on by prefixing your
number with 9/8/7/6.
I don't believe the above will work. There is only one IP address for the box,
and no way that I've found to send a sip packet to the box with "additional"
information that would suggest using port 1 vs port 2.
Greg Hill
2004-02-01 21:00:49 UTC
Permalink
Post by Rich Adamson
I don't believe the above will work. There is only one IP address for
the box, and no way that I've found to send a sip packet to the box with
"additional" information that would suggest using port 1 vs port 2. From
what others have hinted at (and it seems the majority of us are limited
either to what's printed or experimentation), the 1204 has an internal
function that kind of resembles a trunk group. "It" decides which port
to use.
As mentioned previously, the sip "register" function in the box is inop
in both directions, therefore there does not seem to be a way to address
the ports through contexts or anything else. Mediatrix has provided the
mib variables where one can enter a different password for each port,
but that has no value either since the register function doesn't work.
What happens if you don't use a register => line in sip.conf, but do
include a section like:
[mediatrixport1]
username=
password=
host=

Just to check my theory, I did some testing via fwd. I discovered that if
I include a register => line with my fwd info, then when I call my fwd
number (outbound through iaxtel) it rings in. But I can't call out via
fwd. So then I put in my [fwd] service definition, removed the register
line, and waited for the old registration to expire. Then I tried calling
my fwd number (again through iaxtel). This time I got the message about
the user being offline. But now I can call out via fwd, even though calls
wouldn't come in. This demonstrates that the [fwd] section is used by
Dial() when I try to place a call out through that service, and that the
register line isn't needed for the outbound call.

Somebody mentioned that the mediatrix lets you set a unique
username/password for each of its ports. It seems that you could set up
four service definitions, each using a different user/pwd pair. Then *
will use a different user/pwd pair to log in to the mediatrix, depending
upon which service definition was called for by the Dial() statement.

Or does the mediatrix not really have a distinct user/pwd pair for
accessing each port?

Greg
Rich Adamson
2004-02-01 21:42:35 UTC
Permalink
Post by Greg Hill
Post by Rich Adamson
I don't believe the above will work. There is only one IP address for
the box, and no way that I've found to send a sip packet to the box with
"additional" information that would suggest using port 1 vs port 2. From
what others have hinted at (and it seems the majority of us are limited
either to what's printed or experimentation), the 1204 has an internal
function that kind of resembles a trunk group. "It" decides which port
to use.
As mentioned previously, the sip "register" function in the box is inop
in both directions, therefore there does not seem to be a way to address
the ports through contexts or anything else. Mediatrix has provided the
mib variables where one can enter a different password for each port,
but that has no value either since the register function doesn't work.
What happens if you don't use a register => line in sip.conf, but do
[mediatrixport1]
username=
password=
host=
The above is basically what I did, however since the 1204 never attempts
to register, the username and password have no value. The host= is the only
statement above that has value, and its the "only" thing that can be used
to associate a context with the gateway.

Attempts to use a register statement within * (and watching packets with a
sniffer), the register attempt is greated with "501 Not Implemented" from
the 1204.
Post by Greg Hill
Just to check my theory, I did some testing via fwd. I discovered that if
I include a register => line with my fwd info, then when I call my fwd
number (outbound through iaxtel) it rings in. But I can't call out via
fwd. So then I put in my [fwd] service definition, removed the register
line, and waited for the old registration to expire. Then I tried calling
my fwd number (again through iaxtel). This time I got the message about
the user being offline. But now I can call out via fwd, even though calls
wouldn't come in. This demonstrates that the [fwd] section is used by
Dial() when I try to place a call out through that service, and that the
register line isn't needed for the outbound call.
Sure, but fwd and your asterisk both understand the register function. The
1204 does not.
Post by Greg Hill
Somebody mentioned that the mediatrix lets you set a unique
username/password for each of its ports.
That was me that said it in an earlier email attempting to find out if it
was "me" or the "1204" that didn't understand what was going on. Turned
out to be the 1204.
Post by Greg Hill
It seems that you could set up
four service definitions, each using a different user/pwd pair. Then *
will use a different user/pwd pair to log in to the mediatrix, depending
upon which service definition was called for by the Dial() statement.
which, again, all depends on the register function working.
Post by Greg Hill
Or does the mediatrix not really have a distinct user/pwd pair for
accessing each port?
It has the mib variables and one can set them, the 1204 just doesn't do
anything with them.

The bottom line really is "501 Not Implemented", period. Until that's implemented
there really isn't anyway to address individual ports in any form that is reasonable.

For what its worth, it would appear from the Mediatrix web site (takes a little
digging) the group behind writing the sip code must have had some financial
problems. They received some funding in November along with apparently some
senior management changes.

Rich
Dawid Mielnik
2004-02-02 10:01:02 UTC
Permalink
The mediatrix does have unique username/passwd for each port. At least the
1104 FXS does. Each port can be registered separately with *. I assume other
way round should work as well then.

regards,

Dave

-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com]On Behalf Of Greg Hill
Sent: Sunday, February 01, 2004 10:01 PM
To: asterisk-***@lists.digium.com
Subject: Re: [Asterisk-Users] Dial via sip gateway?
Post by Rich Adamson
I don't believe the above will work. There is only one IP address for
the box, and no way that I've found to send a sip packet to the box with
"additional" information that would suggest using port 1 vs port 2. From
what others have hinted at (and it seems the majority of us are limited
either to what's printed or experimentation), the 1204 has an internal
function that kind of resembles a trunk group. "It" decides which port
to use.
As mentioned previously, the sip "register" function in the box is inop
in both directions, therefore there does not seem to be a way to address
the ports through contexts or anything else. Mediatrix has provided the
mib variables where one can enter a different password for each port,
but that has no value either since the register function doesn't work.
What happens if you don't use a register => line in sip.conf, but do
include a section like:
[mediatrixport1]
username=
password=
host=

Just to check my theory, I did some testing via fwd. I discovered that if
I include a register => line with my fwd info, then when I call my fwd
number (outbound through iaxtel) it rings in. But I can't call out via
fwd. So then I put in my [fwd] service definition, removed the register
line, and waited for the old registration to expire. Then I tried calling
my fwd number (again through iaxtel). This time I got the message about
the user being offline. But now I can call out via fwd, even though calls
wouldn't come in. This demonstrates that the [fwd] section is used by
Dial() when I try to place a call out through that service, and that the
register line isn't needed for the outbound call.

Somebody mentioned that the mediatrix lets you set a unique
username/password for each of its ports. It seems that you could set up
four service definitions, each using a different user/pwd pair. Then *
will use a different user/pwd pair to log in to the mediatrix, depending
upon which service definition was called for by the Dial() statement.

Or does the mediatrix not really have a distinct user/pwd pair for
accessing each port?

Greg


_______________________________________________
Asterisk-Users mailing list
Asterisk-***@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
Rich Adamson
2004-02-02 13:24:19 UTC
Permalink
That makes a lot of sense. It would appear the Mediatrix marketing target
was for the 1104 (FXS) and 1204 (FXO) to be used in pairs as a toll bypass
mechanism across the Internet (mostly in a standalone form without a sip
proxy). That is exactly how their extensive documentation is written as well.

Looking at it from that perspective, the originating end (1104 fxs) is
where we'd place the 'register' function if we were designing the product,
and the 1204-fxo is just considered "a bunch of pstn CO lines" that ordinarily
would not need the register function (that it doesn't have it now).

Given the software authors probably shared common libraries across the two
products, it also suggests why the 1204 has the snmp mib variables for
entering the username:password on a per-port basis even though they do
nothing with them today.

If they can get the 1204 enhanced a little more and drop the retail price by
a little, looks like it would make a good 4-port pstn box that really isn't
addressed very well in the market today.

Rich

------------------------
Post by Dawid Mielnik
The mediatrix does have unique username/passwd for each port. At least the
1104 FXS does. Each port can be registered separately with *. I assume other
way round should work as well then.
regards,
Dave
-----Original Message-----
Post by Rich Adamson
I don't believe the above will work. There is only one IP address for
the box, and no way that I've found to send a sip packet to the box with
"additional" information that would suggest using port 1 vs port 2. From
what others have hinted at (and it seems the majority of us are limited
either to what's printed or experimentation), the 1204 has an internal
function that kind of resembles a trunk group. "It" decides which port
to use.
As mentioned previously, the sip "register" function in the box is inop
in both directions, therefore there does not seem to be a way to address
the ports through contexts or anything else. Mediatrix has provided the
mib variables where one can enter a different password for each port,
but that has no value either since the register function doesn't work.
What happens if you don't use a register => line in sip.conf, but do
[mediatrixport1]
username=
password=
host=
Just to check my theory, I did some testing via fwd. I discovered that if
I include a register => line with my fwd info, then when I call my fwd
number (outbound through iaxtel) it rings in. But I can't call out via
fwd. So then I put in my [fwd] service definition, removed the register
line, and waited for the old registration to expire. Then I tried calling
my fwd number (again through iaxtel). This time I got the message about
the user being offline. But now I can call out via fwd, even though calls
wouldn't come in. This demonstrates that the [fwd] section is used by
Dial() when I try to place a call out through that service, and that the
register line isn't needed for the outbound call.
Somebody mentioned that the mediatrix lets you set a unique
username/password for each of its ports. It seems that you could set up
four service definitions, each using a different user/pwd pair. Then *
will use a different user/pwd pair to log in to the mediatrix, depending
upon which service definition was called for by the Dial() statement.
Or does the mediatrix not really have a distinct user/pwd pair for
accessing each port?
Greg
Loading...