[Users] Differentiate INVITEs

Klaus Darilion klaus.mailinglists at pernau.at
Fri May 11 12:42:40 CEST 2007


Hi Kristian!

It is easy to catch a on-hold reINVITE: has_totag() and search for 
0.0.0.0 in the SDP. But the problem is the whole logic behind it.

Example A calls B. Then B put A on hold. What do you want to achive - 
music on hold for A or B? For B IMO it is not necessary as B probably 
does something else now. Usually you want MOH for A.

Thus, how to get MOH for A? if A has no built in support for MOH, you 
have to:
1. tell you MOH server to send RTP to A
2. make A to accept RTP from the MOH server.

For 1. you have to send an INVITE to the MOH server with the SDP of A - 
triggered by a reINVITE from B - quite difficult

For 2. (if A is behind NAT) you have to make A to send RTP to the MOH 
server to open the pinhole in the NAT. Thus send a reINVITE to A with 
the SDP of the MOH server.

I have no clue how this can be done with openser. For this you need a 
B2BUA - like asterisk and sems and the call must be routed from the 
beginning via the B2BUA.

regards
klaus

Kristian Kielhofner wrote:
> On 5/10/07, Klaus Darilion <klaus.mailinglists at pernau.at> wrote:
>> Hi!
>>
>> You cant do MOH in openser. MOH is an endpoint feature. Some phones
>> allow to configure a MOH URI (SNOM) which I guess is used for reINVITEs.
>>
>> Maybe you can implement it with sems - catch the on-hold reINVITE and
>> "tell" sems to stream RTP to the other party - ask the sems guys.
>>
>> regards
>> klaus
>>
> 
> klaus,
> 
> Thanks for the reply.  I'm not looking to do anything too special in
> openser.  If anything, all I need to do is add a check for the address
> in the SDP for an INVITE.
> 
> Some phones do allow you to configure a MOH URL but not all do.  I'd
> like to come up with something that will work for me and other people
> in the community on any phone.  Plain 'ol generic SIP is probably the
> only way (this is how Asterisk does it so seamlessly).
> 
> If I implement this with SEMS I will have the same problem.  As you
> said, I still need to "catch" the on-hold re-INVITE from the phone and
> send it to SEMS.  I already have Asterisk servers (and I'm much more
> familiar with Asterisk than SEMS), I might as well try to send the
> intercepted (for lack of a better term) re-INVITE to Asterisk (and
> have Asterisk process it as a normal call) - not to SEMS (although it
> would probably also work for SEMS in place of Asterisk).
> 
>  It looks like textops might be able to do this in a hack-ish sort of
> way...  I'll try it and see what happens but I would certainly like
> something cleaner.
> 
> What would need to be added to OpenSER to support checking for this?
> Even exposing a few of the values (perhaps as pseudo-variables) from
> the SDP on an INVITE would be a great start.  I'm sure that this is
> more of a dev list question but I thought that I would ask here
> first...
> 
> Thanks again for the reply!
> 




More information about the Users mailing list