[Asterisk-Users] Re: getting callerid from spa3k to asterisk

Kevin Walsh kevin at cursor.biz
Sun Nov 14 16:57:43 MST 2004


Randy Bush [randy at psg.com] wrote:
> > if i have two sip contexts for my spa3k, on inbound and
> > one outbound, e.g.
> > 
> >     [spa3k-in]
> >     type=friend
> >     host=dynamic
> >     port=5061
> >     auth=md5
> >     secret=pfui
> >     qualify=1000
> >     canreinvite=yes
> >     context=ext-in42
> > 
> >     [spa3k-out]
> >     type=peer
> >     auth=md5
> >     secret=pfui
> >     username=outpass
> >     fromuser=outpass
> >     host=spa3k.bogus.com
> >     port=5061
> >     nat=no
> >     canreinvite=yes
> >     context=ext-in42
> > 
> > and the spa3k's PSTN / Subscriber Information / User ID: = spack-in,
> > 
> > the incoming connection from spa3k to * is being routed to the
> > spa3k-out context, not the spa3-in context.  see appended.
> > 
> > i suspect this is a bug in * 1.0.1.
> >
> i found the problem, or at least a work-around.
> 
> if i reverse the order of the above two sip contexts, the incoming
> call is properly routed to the spa3k-in sip context as opposed to the
> wrong one, spa3k-out. 
> 
> my guess is that * is traversing a list and taking the first
> context which has the ip address and port it wants without
> checking the context name against the name which was received
> over the wire.  so it depends on what order the contexts are inserted in
> the list. 
> 
Yes, but it's not a bug. :-)

You have type=friend and type=peer.  Change "friend" to "user" for the
incoming definition.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/




More information about the asterisk-users mailing list