On Thu, May 14, 2009 at 10:04 AM, mayamatakeshi <[email protected]> wrote:
> On Wed, May 13, 2009 at 9:58 PM, Murray Hooper <[email protected]> wrote:
>> Hi
>>
>> What is proper way to handle branching on multiple values in same recv?
>>
>> I have
>> < recv request="INVITE"
>>  <action>
>>     <ereg regexp="486" search_in="hdr" header="To:" assign_to="busy" >
>>  </action>
>> </recv>
>>
>> If I want to check for To = 503 and return 503 back does another ereg go in
>> this INVITE section or do I build another separate the 503?
>
> Hello,
> it seems you want to use the username received as the response code to
> be sent to the client.
> If so, you could capture the username like this:
>
> <ereg regexp="sip:([...@])@" search_in="hdr" header="To:"
> assign_to="whole_thing,username" >

Well,
actually, it should be:

<ereg regexp="sip:([...@]+)@" search_in="hdr" header="To:"
assign_to="whole_thing,username" >

>
> Then you could use username in the response to be sent
>
>  <send>
>    <![CDATA[
>
> SIP/2.0 [$username] No No No
> [last_To:]
> [last_From:]
> [last_Call-ID:]
> [last_CSeq:]
> [last_Via:]
> Content-Length: 0
>
>    ]]>
>  </send>
>
> Now, you might need to change the Response text to something different
> for each response code. If that's the case, you could get it from an
> injection file.
>
> regards,
> takeshi
>

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to