[Users] rewrite contact field
Norman Brandinger
norm at goes.com
Thu Nov 24 06:47:06 CET 2005
I took a look at the configuration you attached. It looks like you are
executing fix_nated_contact just before the save("location"). This
might be where your problem is. Try removing the fix_nated_contact().
There has been considerable discussion on the mailing lists in regard to
fix_nated_contact(). A result of this discussion was the creation of
the fix_nated_registere() function. Please review the mailing lists.
For example, enter "fix_nated_register site:mail.iptel.org" into a
google search.
I provided an example of a REGISTER block in a document about Scripting
using M4. The example can be located at:
http://openser.org/docs/scripting.html#id2428967
The key point about the example is that fix_nated_contact() is NOT being
used during REGISTER processing.
I think that your second question is more along the lines of "how to get
(Open)SER and Asterisk to work together to provide music-on-hold,
voicemail, ivr, etc". I would suggest that you review the mailing lists
because these topics have been discussed quite a lot. I think that a
good starting point may also be to visit the onsip.org web site and
review their documentation and example configurations.
Regards,
Norm
harry gaillac wrote:
>> 1) Perhaps if you post your complete .cfg file,
>> someone on the list
>> will be able to assist you. There is a very good
>> discussion of NAT
>> registrations at the onsip.org web site. Are you
>> 100% positive that
>> your code snippet is being executed during a
>> REGISTER message ? You
>> might want to put some xlog() statements in your
>> configuration file to
>> make sure that the fix_nated_register() is being
>> executed correctly.
>>
>
> I post my ser.cfg
>
>
>> 2) I use a flag called FLAG_NAT_CALLER so that the
>> rest of the
>> configuration file can test the flag to determine if
>> the CALLER is
>> behind a NAT and take appropriate actions if that is
>> the case. In the
>> code snippet you sent to me, you are using
>> setflag(7). I have no idea
>> what this is, but I'll bet that it serves a similar
>> purpose to my
>> FLAG_NAT_CALLER.
>>
>
> # -- registrar params --
> modparam("registrar", "nat_flag", 7)
> modparam("registrar", "use_domain", 1)
>
> I don't understand how this flag could help to rewrite
> th sip contact header.
>
>
>> 3) Music-on-hold works for us in the situations
>> where it is needed.
>>
>
> Can you explain me ?
> SER is not a PBX what about IVR ACD VOICEMAIL and more
> that's why I whish using asterisk for telephony
> features and SER as sip router .
>
> Harry
>
>
>
>> Norman Brandinger wrote:
>>
>>> Perhaps you are using fix_nat_contact() when you
>>>
>> should be using
>>
>>> fix_nat_register().
>>> Note that fix_nat_register() should ONLY be called
>>>
>> when a REGISTER
>>
>>> method has been received.
>>>
>>> The example below uses a couple of M4 defines, but
>>>
>> otherwise might
>>
>>> work for you. If you have any questions about the
>>>
>> statements below,
>>
>>> please review the documentation available online
>>>
>> at openser.org,
>>
>>> onsip.org or iptel.org
>>>
>>>
>>>
> #----------------------------------------------------------------------
>
>>> # NAT Detection
>>>
>>>
> #----------------------------------------------------------------------
>
>>> if (!search("^Contact:[ ]*\*") &&
>>>
>> nat_uac_test("19")) {
>>
>>> setflag(FLAG_NAT_CALLER);
>>> setflag(FLAG_NAT_PING);
>>> fix_nated_register();
>>> force_rport();
>>> };
>>>
>>> Regards,
>>> Norm
>>>
>>> p.s. In regard to your previous problems with
>>>
>> devices registered to
>>
>>> Asterisk, I found that it is a much better idea to
>>>
>> have all of the SIP
>>
>>> devices register with (Open)SER instead of
>>>
>> Asterisk. This solution
>>
>>> may not be right for you, but it's the way we
>>>
>> prefer to do things.
>>
>>>
>>> harry gaillac wrote:
>>>
>>>> I try to rewrite contact field in sip hf because
>>>>
>> of
>>
>>>> fix_nat_contact() fail with this diagram
>>>>
>>>> -----ppp0[ ser/nathelper ] eth0----private
>>>>
>> network
>>
>>>> debian 3.1
>>>>
>>>> when agents send INVITE or REGISTER to ser which
>>>> listen on ppp0 the ip address in contact sip hf
>>>>
>> stay a
>>
>>>> private ip address, why ?
>>>>
>>>> I try siproxd which rewrite it .
>>>> how can i build a ser.cfg in order to contact in
>>>>
>> sip
>>
>>>> hf will be rewritte
>>>>
>>>> Harry
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
> ___________________________________________________________________________
>
>>>> Appel audio GRATUIT partout dans le monde avec le
>>>>
>> nouveau Yahoo!
>>
>>>> Messenger Téléchargez cette version sur
>>>>
>> http://fr.messenger.yahoo.com
>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at openser.org
>>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openser.org
>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>
>
>
>
>
>
>
> ___________________________________________________________________________
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
> Téléchargez cette version sur http://fr.messenger.yahoo.com
More information about the Users
mailing list