[Asterisk-Users] Registering multiple FWD accounts

Philipp von Klitzing klitzing at pool.informatik.rwth-aachen.de
Sun Jan 18 08:18:06 MST 2004


Hi!

> Can multiple FWD accounts be registered?

Yes.

> I have the following output in my sip.conf file:
> 
> register=74928:xxx at fwd.pulver.com/74928
> register=75160:xxx at fwd.pulver.com/75160
> register=74573:xxx at fwd.pulver.com/74573

Ok so far. Now consider this:

1. you register in order to be called: FWD must know where at which IP 
address to to find you. That is all that the register does, nothing else.
2. you need to set up a SIP user to treat incoming FWD calls so that you 
can at least set a context for those
3. finally you need SIP user accounts for dialing out via FWD

If you would like to dial out to FWD with always the same FWD account 
when users are connected to Asterisk, then you can combine [fwd-74928] 
and [FreeWorldDialup] under the section name [fwd-74928] by merging the 
entries and using type=friend instead.


--- extensions.conf ---

[fwd-in]
; here we treat incoming FWD calls
; we arrive here because we defined host=fwd.pulver.com 
; for the peer [FreeWorldDialup] that has this context [fwd-in]
exten => s,1,Hangup
exten => 74928,1,Answer
exten => 74928,2,Goto(voicemenu,s,1)
exten => 74928,3,Hangup
exten => 75160,1,Dial(SIP/john,20,rt)
exten => 75160,2,Hangup

[default]
; dialing out to FWD
; prefix 1 for calling as user 74928, prefix 2 for ...
; we might also insert a SetCallerID() statement here
exten => _1X.,1,Dial(SIP/${EXTEN:1}@fwd-74928)
exten => _2X.,1,Dial(SIP/${EXTEN:1}@fwd-75160)

[sip-john]
; dialing out to FWD
; alternative: have a personal context for each SIP user, 
; this way we don't need to add a dial prefix like above
; and we don't need to offer FWD dialout with our private
; accounts to everyone that has access to [default]
include => default
exten => _X.,1,Dial(SIP/${EXTEN:1}@fwd-74573)


--- sip.conf ---

[FreeWorldDialup]
; we don't do any authentication for calls coming from FWD
context=fwd-in
type=user
hostname=fwd.pulver.com

> [fwd-74928]
; fwd alias for this Asterisk PBX
; as you can see this is for outgoing calls only
> type=peer
> secret=xxx
auth=md5
> username=74928
fromuser=74928
> host=fwd.pulver.com
> 
> [fwd-75160]
; fwd alias for john
> type=peer
> secret=xxx
auth=md5
> username=75160
fromuser=75160
> host=fwd.pulver.com
> 
> [fwd-74573]
; fwd alias for mary
> type=peer
auth=md5
> secret=xxx
> username=74573
fromuser=74573
> host=fwd.pulver.com

[john]
context=sip-john
type=friend
secret=xxxx
host=dynamic
disallow=all
allow=ualw
allow=gsm
...

[mary]
context=default
...

> FWD working? I notice in online examples that people use
> [fwd.pulver.com] 

If you can avoid it don't use sip.conf usernames in [] that are identical 
to a FQDN hostname. It works, but it is usually cause for a lot of 
confusion, makes your setup much harder to understand.

Cheers, Philipp





More information about the asterisk-users mailing list