Hi!
I have some challenges with alias_db_lookup and hope someone here can help.
I have a PBX that has registered 111@xxx with my OpenSER. I want to attach 222@xxx and 333@xxx to that registration and alias_db_lookup does that fine.
If a call comes to 111 the sip header looks like this
INVITE 111@xxx .... To: 111 111@xxx ...
And everything works fine.
But if a call comes to 222 the sip header looks like this:
INVITE 111@xxx .... To: 222 222@xxx ...
But now the PBX thinks that the call is for 111 and not 222.
On Asterisk I can do something like this to solve the problem:
exten => _X.,1,goto(from-siptrunk,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1) [from-siptrunk] exten => 111,1,dial(SIP/1010) exten => 222,1,dial(SIP/1020)
But a lot of SIP enabled PBX's cannot do that sort of thing.
One solution is the force the PBX to register with OpenSER for every number, but I would prefer not to do that. Another solution is to manually populate the alias tables but this is not very elegant.
On Wednesday 12 March 2008, Morten Isaksen wrote:
I have a PBX that has registered 111@xxx with my OpenSER. I want to>
attach 222@xxx and 333@xxx to that registration and alias_db_lookup
does that fine.
If a call comes to 111 the sip header looks like this
INVITE 111@xxx .... To: 111 111@xxx ...
And everything works fine.
But if a call comes to 222 the sip header looks like this:
INVITE 111@xxx .... To: 222 222@xxx ...
But now the PBX thinks that the call is for 111 and not 222.
You can save the $rU in an avp before the lookup and restore it afterwards. This is assuming that the pbx will accept any $rU thrown at it (Asterisk will).
Alex.
On Thu, Mar 13, 2008 at 8:26 AM, Alex alex@speakup.nl wrote:
On Wednesday 12 March 2008, Morten Isaksen wrote:
I have a PBX that has registered 111@xxx with my OpenSER. I want to>
attach 222@xxx and 333@xxx to that registration and alias_db_lookup
does that fine.
If a call comes to 111 the sip header looks like this
INVITE 111@xxx .... To: 111 111@xxx ...
And everything works fine.
But if a call comes to 222 the sip header looks like this:
INVITE 111@xxx .... To: 222 222@xxx ...
But now the PBX thinks that the call is for 111 and not 222.
You can save the $rU in an avp before the lookup and restore it afterwards. This is assuming that the pbx will accept any $rU thrown at it (Asterisk will).
Thanks. It is working now.